dcm4che on boot (startup / bootup) - Ubuntu script - reboot or shutdown

1,077 views
Skip to first unread message

Cristiano Albiero Berni

unread,
Jun 26, 2013, 4:53:03 PM6/26/13
to dcm...@googlegroups.com
in dcm4chee-2.17.3-mysql.zip for example we have:
dcm4chee_init_redhat.sh
dcm4chee_init_suse.sh

I put these scripts to run on Ubuntu 12.04 LTS Server. With the command "update-rc.d dcm4chee_init_redhat.sh defaults" we put it to the traditional sysvinit and the dcm4chee runs OK when the system is starting.

BUT the problem is when is given reboot or shutdown command (when the system is shutting down). The mysql is stopping first and we got the bellow error.

So I tried do understand how the Ubuntu bootup woks (https://help.ubuntu.com/community/UbuntuBootupHowto) and I learned that mysql is working at the "/etc/init" (Upstart) and not "/etc/init.d" (traditional sysvinit) and the the "init" stops first than "init.d".

How could we solve the problem that mysql is stopping first than dcm4chee??

Don't have any script to start dcm4chee especially for Ubuntu Upstart (/etc/init)?


----- error -----------

Stopping pacsException in thread "main" java.lang.SecurityException: Failed to authenticate principal=admin, securityDomain=jmx-console
        at org.jboss.jmx.connector.invoker.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:97)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:818)
        at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:419)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
        at sun.rmi.transport.Transport$1.run(Transport.java:177)
        at sun.rmi.transport.Transport$1.run(Transport.java:174)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:273)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:251)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:160)
        at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
        at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:133)
        at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)
        at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:197)
        at org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor.invoke(InvokerAdaptorClientInterceptor.java:66)
        at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
        at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
        at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
        at $Proxy0.invoke(Unknown Source)
        at org.jboss.Shutdown$ServerProxyHandler.invoke(Shutdown.java:266)
        at $Proxy1.shutdown(Unknown Source)
        at org.jboss.Shutdown.main(Shutdown.java:237)
   ...done.

SUKRAM

unread,
Jun 27, 2013, 4:38:29 AM6/27/13
to dcm...@googlegroups.com
I don't know the details in Ubuntu, but in Red Hat Enterprise Linux / CentOS you could use Startup and Shutdown scripts in /etc/rc.d/rc3.d.

Create a link "S50mysql" to the MySQL startup script, and a "S99dcm4chee" link to the dcm4chee startup script. This means that mysql is started prior to dcm4chee. To kill dcm4chee first and then MySQL, use "K50dcm4chee" and "K99mysql", for example. "K" stands for "Kill". Maybe this helps on Ubuntu, too (don't know).

Cristiano Albiero Berni

unread,
Jun 27, 2013, 9:28:32 AM6/27/13
to dcm...@googlegroups.com
that's the problem. You can't use for example "S50mysql" in the new ubuntu bootup (/etc/init) (https://help.ubuntu.com/community/UbuntuBootupHowto)
They use a new concept of dependencies instead who will start first.


2013/6/27 SUKRAM <marku...@h-net.ch>
I don't know the details in Ubuntu, but in Red Hat Enterprise Linux / CentOS you could use Startup and Shutdown scripts in /etc/rc.d/rc3.d.

Create a link "S50mysql" to the MySQL startup script, and a "S99dcm4chee" link to the dcm4chee startup script. This means that mysql is started prior to dcm4chee. To kill dcm4chee first and then MySQL, use "K50dcm4chee" and "K99mysql", for example. "K" stands for "Kill". Maybe this helps on Ubuntu, too (don't know).

--
You received this message because you are subscribed to a topic in the Google Groups "dcm4che" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dcm4che/Ihf7LpKUQ5c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dcm4che+u...@googlegroups.com.
To post to this group, send email to dcm...@googlegroups.com.
Visit this group at http://groups.google.com/group/dcm4che.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages