Weblogic Server Unexpectedly Shuts Down
Running an Oracle SOA Weblogic deployment on a development Linux server, our team was confronted with an unexpected forced shutdown problem with no apparent trigger. At first, I even thought it could be one of the developers that got access to the machine and was shutting it down for some reason. After a quick look at the command and log history, it was evident that it was an automatic behavior of some sort. And it was triggered by the logoff or session timeout of the remote shell used to issue the command to start the server.Doing some research on the Web I got to this official Oracle documentation where it’s stated that the JVM listens to the following inputs from the host operating system:
- CTRL_C_EVENT
- CTRL_CLOSE_EVENT
- CTRL_LOGOFF_EVENT
- CTRL_SHUTDOWN_EVENT
The solution to prevent the Weblogic server from shutting down is to reduce the use of operating system signals by the JVM. This is done by adding the “-Xrs” option to the JAVA_OPTIONS variable on your script to start the Weblogic server.
In our case, using Weblogic 10.3 on a RHEL server, we modified the domain script “startWebLogic.sh” to include the “-Xrs” option:
JAVA_OPTIONS = “${JAVA_OPTIONS} –Xrs”
Afterwards, we stopped the Weblogic domain, restarted it and it stopped forcing the shutdown, even after the user logoff.
Subscribe to:
Post Comments
(
Atom
)
A better way is to use nohup and keep the signals so you can do things like kill -3 to generate thread dumps.
ReplyDeleteThanks for the thoughtful input John. You are absolutely right. The only value added of the solution I suggest is that it suits both linux and windows.
Delete