I'm a WebLogic Newbie and have the following problem with stopping a Managed server with NodeManager.
When I try to stop the managed server WLS_FORMS1 (or WLS_REPORTS1) with NodeManager using the command nmKill() I don't get any response apart from the message "Killing server WLS_FORMS1 ...". From that point on nothing happens any further. The command execution seems to be stuck.
The only message displayed in the log file WLS_FORMS1.out following the nmKill command is
<FINEST> <NodeManager> <Waiting for the process to die: null>
The Server WLS_FORMS1 is part of the cluster CLUSTER_FORMS but resides on another machine than the AdminServer. Using nmStart works fine for this managed server. Only nmKill doesn't seem to work. If I use nmKill to stop managed servers that reside on the same machine as the AdminServer like WLS_FORMS this works fine too. Also starting and stopping the server WLS_FORMS1 through the WebLogic Console works without any problems, so the NodeManager is apparently working.
I'm using WebLogicServer 10.3.5 with Oracle Froms and Reports 11g Release 2 on Windows Server 2008 R2 64bit.
The problem I have with the start/stopManagedWebLogic scripts is that they require an AdminServer to be up and running (well, at least stopManagedWebLogic does). Another thing is that they result in an open command prompt window (at least in windows environments), that mustn't be closed as it contains the java-process..
I want to be as independant as possible from the AdminServer cause it may be shut down, which unfotunately istn't possible with these scripts.
NodeManager offers solutions for my requirements so I consider it obvious to use ist. It just isn't working. Maybe it's just a configuration problem, but I don't know how to figure that out.
To come back to my initial question: Why is the nmKill command not working for my managed server?
Thanks for the suggestions, WLS runs on a windows system, so I can't apply them without changes. I used netstat -a | findstr WAIT but don't know what to do with the output information. There isn't any change before or after invoking nmKill, anyway.
I found out that the alternative with the shutdown command is working even without admin server if I connect directly to the managed server:
I have seen the IBM AIX Unix OS 'kill -9" command fail to kill a managed server process. It tends to happen when an application running on the managed server is connecting to another object outside of WebLogic. It looks like the outside process doesn't handle the kill well and a child process is spawned. Maybe the samething is happening with the nmKill() command?
Also, you can try encrypting your user name and password. You would still need to hard code the values but it won't be clear text.
Here is one of our connect string examples:
To encrypt I used the storeUserConfig() bean in WLST.
We used another option in WLST to connect to the admin server. We created a new method in the 'WL_HOME/common/wlst/sample.py' script. The steps are defined as follows:
This sample script demonstrates how to define a new WLST command.
print 'Sample wlst home command'
Within this script, the wlstHomeSample() command is defined, which prints a String, as follows:
Sample wlst home command