I'm trying to shut down the controller through JMX calls and the application
never exits.
I start the controller with the batch file included with Sequoia. When we're
shutting down our application, we wish to shut down the controller. I have a
VirtualDatabaseMBean called virtualDB and a ControllerMBean called controller.
The code goes something like this:
virtualDB.shutdown(Constants.SHUTDOWN_SAFE);
waitForVirtualDBShutdownJMXMessage();
controller.shutdown();
There's a bit more code in there, but that's the core.
I get a response from the VirtualDB shutdown that it's complete and then it
proceeds to shutdown the controller. Everything appears fine, but I get an
exception near the end of the log output. Here's the sequence I get:
09:29:50,059 INFO controller.virtualdatabase.VDB Shutting down virtual
database VDB in safe mode : waiting for all current transactions to complete
09:29:50,059 INFO controller.virtualdatabase.VDB Waiting for virtual database
VDB shutdown
09:29:50,059 INFO controller.RequestManager.VDB Setting new virtual database
schema.
09:29:50,059 INFO sequoia.controller.connection 5 connections freed on
"jdbc:derby://susd4m3865:1527/VDB"
09:29:50,152 INFO controller.RequestManager.VDB Backend primary is now disabled
09:29:50,152 INFO sequoia.controller.shutdown Waiting for 0 virtual database
worker threads to terminate.
09:29:50,168 INFO controller.virtualdatabase.VDB The virtual database VDB has
been successfully shut down
Sequoia Virtual Database has been shut down
09:29:50,277 INFO controller.core.Controller Shutting down controller
172.24.25.235:25322
09:29:50,277 INFO controller.core.Controller Waiting for controller shutdown
09:29:50,277 INFO sequoia.controller.shutdown Starting controller shutdown
09:29:50,699 INFO sequoia.controller.shutdown A report has been generated
C:\Swisslog\DB\Sequoia\log\sequoia.report
09:29:50,699 INFO sequoia.controller.shutdown Shutting down Jmx Agent
09:29:50,699 INFO controller.core.Controller ControllerServerThread terminating
Sep 30, 2008 9:29:50 AM ClientCommunicatorAdmin restart
WARNING: Failed to restart: java.io.IOException: Failed to get a RMI stub:
javax.naming.CommunicationException [Root exception is
java.rmi.NoSuchObjectException: no such object in table]
09:29:51,699 INFO controller.core.PingResponder Ping responder ended
09:29:51,699 INFO sequoia.controller.shutdown Waiting for controller thread
termination.
09:29:51,699 INFO sequoia.controller.shutdown Controller shutdown completed
09:29:51,699 INFO controller.core.Controller Shutdown of controller
172.24.25.235:25322 completed
It looks like everything is ok except for the RMI problem (I'm assuming that
has to do with shutting down the Jmx Agent), however, the application doesn't
exit. The controller is still sitting there. If I try to add in a
System.exit(0) command at the end of the shutdown() method in the controller, I
get the following (which hangs my application):
09:34:45,038 INFO controller.virtualdatabase.VDB Shutting down virtual
database VDB in safe mode : waiting for all current transactions to complete
09:34:45,038 INFO controller.virtualdatabase.VDB Waiting for virtual database
VDB shutdown
09:34:45,054 INFO controller.RequestManager.VDB Setting new virtual database
schema.
09:34:45,054 INFO sequoia.controller.connection 5 connections freed on
"jdbc:derby://susd4m3865:1527/VDB"
09:34:45,163 INFO controller.RequestManager.VDB Backend primary is now disabled
09:34:45,163 INFO sequoia.controller.shutdown Waiting for 0 virtual database
worker threads to terminate.
09:34:45,163 INFO controller.virtualdatabase.VDB The virtual database VDB has
been successfully shut down
09:34:45,288 INFO controller.core.Controller Shutting down controller
172.24.25.235:25322
09:34:45,288 INFO controller.core.Controller Waiting for controller shutdown
09:34:45,288 INFO sequoia.controller.shutdown Starting controller shutdown
09:34:45,616 INFO sequoia.controller.shutdown A report has been generated
C:\Swisslog\DB\Sequoia\log\sequoia.report
09:34:45,616 INFO sequoia.controller.shutdown Shutting down Jmx Agent
09:34:45,616 INFO controller.core.Controller ControllerServerThread terminating
Sep 30, 2008 9:34:45 AM ClientCommunicatorAdmin restart
WARNING: Failed to restart: java.io.IOException: Failed to get a RMI stub:
javax.naming.CommunicationException [Root exception is
java.rmi.NoSuchObjectException: no such object in table]
09:34:46,616 INFO controller.core.PingResponder Ping responder ended
09:34:46,616 INFO sequoia.controller.shutdown Waiting for controller thread
termination.
09:34:46,616 INFO sequoia.controller.shutdown Controller shutdown completed
09:34:46,616 INFO controller.core.Controller Shutdown of controller
172.24.25.235:25322 completed
java.lang.reflect.UndeclaredThrowableException
at $Proxy1.shutdown(Unknown Source)
at
com.translogiccorp.tlcappmgr.apps.sequoia.JmxClient.orderlyShutdownController(JmxClient.java:285)
at
com.translogiccorp.tlcappmgr.apps.sequoia.JmxClient.shutdownController(JmxClient.java:238)
at
com.translogiccorp.tlcappmgrarbitrator.AppMgrArbitrator.shutDownSwisslogSequoia(AppMgrArbitrator.java:586)
at
com.translogiccorp.tlcappmgrarbitrator.AppMgrArbitrator.transitionTo(AppMgrArbitrator.java:309)
at
com.translogiccorp.tlcappmgrarbitrator.AppMgrArbitrator.update(AppMgrArbitrator.java:1424)
at java.util.Observable.notifyObservers(Observable.java:142)
at
com.translogiccorp.tlcappmgr.apps.tools.ObserverVector.update(ObserverVector.java:45)
at java.util.Observable.notifyObservers(Observable.java:142)
at
com.translogiccorp.tlcappmgr.apps.AppHandler.dispose(AppHandler.java:260)
at
com.translogiccorp.tlcappmgr.apps.AppHandler$ProcessHandler.handleProcess(AppHandler.java:204)
at
com.translogiccorp.tlcappmgr.apps.AppHandler$ProcessHandler.run(AppHandler.java:187)
Caused by: java.rmi.UnmarshalException: Error unmarshaling return header;
nested exception is:
java.net.SocketException: Connection reset
at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:203)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke(Unknown
Source)
at
javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:972)
at
javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:201)
... 12 more
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
at java.io.DataInputStream.readByte(DataInputStream.java:241)
at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:189)
... 17 more
How do I get the application to exit after shutting down the controller?
Jonathan Stockho
Software Developer
Swisslog Healthcare Solutions
10825 E. 47th Avenue
Denver, CO 80239
Phone: 303-373-7814
FAX: 303-373-7872
e-mail: [EMAIL PROTECTED]
Internet: www.swisslog.com
------------------------------------------------------------------------------------
About Swisslog
Swisslog designs solutions in logistics automation that greatly reduce the
manual flow of materials and associated information within healthcare
facilities.
This message may contain legally privileged or confidential information and is
therefore addressed to the named persons only. The recipient should inform the
sender and delete this message, if he/she is not named as addressee.
The sender disclaims any and all liability for the integrity and punctuality of
this message. The sender has activated an automatic virus scanning, but does
not guarantee the virus free transmission of this message.
_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia