WebSphere Restart for Software Deployments
WebSphere restarts are often used in software deployments. A few of our DeployHub customers ran into issues in restarting a stand-alone server for their development environment.
WebSphere Exception Received
Stopping the server via wsadmin or the stop script worked but the start would fail. The failure from wsadmin for the start was:
WASX7017E: Exception received while running file "/tmp/deployws.py"; exception information: com.ibm.websphere.management.exception.ConnectorNotAvailableException * org.apache.soap.SOAPException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: java.net.ConnectException: Connection refused; targetException=java.lang.IllegalArgumentException: Error opening socket: java.net.ConnectException: Connection refused]
Root of the Problem
This restart exception was thrown due to the server being stopped and the SOAP connection terminated.
The failure from the running the stop server shell script was:
* Mar 15, 2017 7:55:19 PM com.ibm.ws.postinstall.runConfigActions.RunConfigActions setLogFile * SEVERE: IOException java.io.FileNotFoundException: /herramientas/btt/IBM/WebSphere/AppServer/profiles/AppSrv01/properties/service/productDir/logs/runConfigActions.log.lck (Permission denied) * * java.io.FileNotFoundException: /herramientas/btt/IBM/WebSphere/AppServer/profiles/AppSrv01/properties/service/productDir/logs/runConfigActions.log.lck (Permission denied) * at java.io.FileOutputStream.open(Native Method) * at java.io.FileOutputStream.(FileOutputStream.java:204) * at java.io.FileOutputStream.(FileOutputStream.java:94) * at java.util.logging.FileHandler.initOutputFiles(FileHandler.java:225) * at java.util.logging.FileHandler.init(FileHandler.java:195) * at java.util.logging.FileHandler.(FileHandler.java:445) * at com.ibm.ws.postinstall.runConfigActions.RunConfigActions.setLogFile(RunConfigActions.java:409) * at com.ibm.ws.postinstall.runConfigActions.RunConfigActions.main(RunConfigActions.java:77)This exception was thrown due to permission issue with the AIX user id and the owner of the Websphere install.
The way to get around the restart issue was to change the Stand-alone Server into a Networked Node Server with one node. The Networked install adds another Java process called the deployment manager. The deployment manager is what wsadmin jython and jacl scripts will talk to, so the connection is never broken when the server is stopped. The shell script would no longer be used, instead wsadmin is where everything would be done in. Using wsadmin and a networked install enables you to have full access to the AdminConfig and AdminControl objects even against a stopped server.
Here is a link from IBM that describes the differences between stand-alone and networked: IBM Documentation
In conclusion, you may not run into this with larger deployments. Websphere restart for a stand alone server offers a bit different challenge.