Hi Jonathan,

Could you get a thread dump to see what threads remain in the controller VM? If you started the controller in a shell just press Ctrl+\ to get the thread dump from the JVM. I am not sure how the RMI registry terminates when there are still pending JMX calls, that might be the problem.

Keep us posted with your findings,
Emmanuel

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 <http://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.

--
Emmanuel Cecchet
FTO @ Frog Thinker Open Source Development & Consulting
--
Web: http://www.frogthinker.org
email: [EMAIL PROTECTED]
Skype: emmanuel_cecchet

_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia

Reply via email to