3 Replies Latest reply on Jul 11, 2007 3:56 AM by dimitris

    JBoss AS - shutdown.sh -S fails

    konstandinos

      hello

      i get the following error when executing shutdown.sh -S

      --

      Exception in thread "main" java.lang.SecurityException: Failed to authenticate principal=null, securityDomain=jmx-console

      --

      i have installed jboss (4.0.5ga) on ubuntu linux (dapper drake 6.06 server edition), with jdk1.6 (update2).

      also, jboss is installed under it's own user 'jboss' as recommended in the installation guide. all the file access permissions are set correctly. i doubt this has anything to do with it anyway.

      note: jboss starts up perfectly when using run.sh. if i start jboss in an active console, and let it load (which works), and then press ctrl+c, it shuts itself down perfectly too. thus it is only shutdown.sh -S that is breaking; but i need this functionality so that shutting down my server gracefully shuts down jboss too.

      also please note that i am using 'sudo -u jboss /home/jboss/bin/run.sh' and 'sudo -u jboss /home/jboss/bin/shutdown.sh -S' to startup and shutdown down jboss respectively. these commands are recommended by the jboss documentation for init.d startup (and shutdown) scripts.

      below is a full print-out of the error. please help. thanks.

      --


      Stopping jboss..
      kosta@Plato:~$ Exception in thread "main" java.lang.SecurityException: Failed to authenticate principal=null, 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:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       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:819)
       at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:420)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
       at sun.rmi.transport.Transport$1.run(Transport.java:159)
       at java.security.AccessController.doPrivileged(Native Method)
       at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
       at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
       at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
       at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
       at java.lang.Thread.run(Thread.java:619)
       at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
       at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
       at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
       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)
      
      


        • 1. Re: JBoss AS - shutdown.sh -S fails
          dimitris

          You must have protected remote access of the server with a user name and password, so you'd have to use:

          shutdown -S -u -p

          • 2. Re: JBoss AS - shutdown.sh -S fails
            konstandinos

            hi dimitri

            i wasn't sure which username and password you were referring to at first so i did some research and it seems these are retrieved from '$JBOSS_HOME/server/default/conf/props/jmx-console-users.properties'

            now how is it that my run-level (rc) startup/shutdown scripts which execute my jboss start/stop scripts imply 'protected remote access' and what is the best practise in using 'jmx-console-users.properties' ?

            i am chiefly concerned about the default setting of 'admin=admin' inside this file, and the fact that the password isn't encrypted.

            on another note, milas ellinika? vlepo oti eise ap tin ellada. ego meno sto cape town, south africa.

            cheers.

            • 3. Re: JBoss AS - shutdown.sh -S fails
              dimitris

              You could store usernames/passwords on LDAP or a DB (or a file). By default no passwords are enabled if you use the .zip distro, but it seems you are using the installer.

              PS
              Milao Ellinika, alla oli i douleia ginetai sta Agglika.