Weblogic AdminServer status is showing as UNKNOWN when calling through WLST scripts
<p>I have written following python script that return status of weblogic server. AdminServer is up and running. But when I run the script it is returning UNKNOWN status. Same script returns the status of other servers correctly. Is there anything wrong with this script?</p>

<pre><code>import sys;
import os;
import socket

ucf='/opt/userconfig.sec'
ukf='/opt/userkey.sec'
host = socket.gethostname()
port = '9556'
domain_name = 'WLS_Domain'
domain_dir = '/opt/domains/WLS_Domain'
nm_type = 'SSL'

def status():
  try:
    nmConnect(userConfigFile=ucf,userKeyFile=ukf,host=host,port=port,domainName=domain_name,domainDir=domain_dir,nmType=nm_type)

    server_state = nmServerStatus('AdminServer')
    print 'AdminServer is in state: ' + server_state
</code></pre>