In Connections, you can have a lot of individual jvm’s running on a node. To have these all start automatically when the system starts, you have basically 2 options:

  • create services for the nodeagent, and every individual server you want to start.
  • create a service for the nodeagent, and have the nodeagent start these for you (AUTOSTART).

I prefer the latter solution, because that way I only have a single service on the OS level. There is a problem with that, however.
This works fine for starting the system, but not so for stopping the system : since there is only a service for the nodeagent, the nodeagent will stop, but the servers will remain running

Create a file by copying , in the /bin directory (eg. /opt/IBM/WebSphere/AppServer/profiles/AppServer01/bin).
Create a copy from and add following lines :

binDir=`dirname ${0}`  
. ${binDir}/  
echo "Stopping all servers on the node"
${binDir}/ -lang jython -c "AdminServerManagement.stopAllServers(\"${WAS_NODE}\")"
${WAS_HOME}/bin/ "$@"  

Create the service, using the script , for the nodeagent :

cd /opt/IBM/WebSphere/AppServer/bin  
./ -add nodeagent -serverName nodeagent -profilePath /opt/IBM/WebSphere/AppServer/profiles/AppServer01 -wasHome /opt/IBM/WebSphere/AppServer -userid  

Then, in the service file /etc/init.d/nodeagent_was.init that’s created, replace the line  


(I don’t know how to do this in Windows, but I’m sure there’s a way :-) )

In Linux, you could use this :

sed -i 's/' /etc/init.d/nodeagent_was.init  

Now, if you use the service to stop your nodeagent, first all servers running on it will be stopped (this does require your dmgr to be up and running, btw).


When you use the registered service you can parse options to|bat, so when you add -stopArgs "-stopservers" to the wasservice command, the servers will shutdown with the nodeagent and no additional scripts are needed (thanks Christoph Stoettner).