Bug 777710 (SOA-226)

Summary: jboss_init_redhat.sh - fails to shutdown service
Product: [JBoss] JBoss Enterprise SOA Platform 4 Reporter: Len DiMaggio <ldimaggi>
Component: ToolingAssignee: Julian Coleman <jcoleman>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.2 CP01   
Target Milestone: ---   
Target Release: 4.3 CR1   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-226
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
soa-4.2.0-IR8.0.zip
Last Closed: 2008-10-15 19:49:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
SOAP_43_jboss_init_redhat.sh
none
EAP_43_jboss_init_redhat.sh none

Description Len DiMaggio 2007-12-11 20:26:56 UTC
Date of First Response: 2007-12-13 14:45:26
project_key: SOA

Description of problem:
jboss_init_redhat.sh - fails to shutdown service - Failed to authenticate principal=null, securityDomain=jmx-console

Version-Release number of selected component (IR or RC #, component ver)
soa-4.2.0-IR8.0.zip

How reproducible:
100%

Steps to Reproduce: 
1.  Copy jboss_init_redhat.sh to /etc/init.d/jboss and run /sbin/service jboss start - or from in jboss-soa-p.4.2.0/jboss-as/bin run sh ./jboss_init_redhat.sh start

2. Try sbin/service jboss stop - or from in jboss-soa-p.4.2.0/jboss-as/bin run sh ./jboss_init_redhat.sh stop

Actual results:

These errors are written to the server log:
2007-12-11 14:42:33,623 DEBUG [org.jboss.security.auth.spi.UsersRolesLoginModule] Loaded properties, users=[admin]
2007-12-11 14:42:33,624 DEBUG [org.jboss.security.auth.spi.UsersRolesLoginModule] Loaded properties, users=[admin]
2007-12-11 14:42:33,624 DEBUG [org.jboss.security.auth.spi.UsersRolesLoginModule] Bad password for username=null

And the server is not stopped.

If you run the command from the CLI - this exception is displayed:

+ su - jboss -c 'java -classpath /opt/IR8/jboss-soa-p.4.2.0/jboss-as/bin/shutdown.jar:/opt/IR8/jboss-soa-p.4.2.0/jboss-as/client/jnet.jar org.jboss.Shutdown --shutdown'
Password:
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)

2007-12-11 14:42:33,623 DEBUG [org.jboss.security.auth.spi.UsersRolesLoginModule] Loaded properties, users=[admin, root, jboss]
2007-12-11 14:42:33,624 DEBUG [org.jboss.security.auth.spi.UsersRolesLoginModule] Loaded properties, users=[admin]
2007-12-11 14:42:33,624 DEBUG [org.jboss.security.auth.spi.UsersRolesLoginModule] Bad password for username=null

Expected results:
The server should be stopped.

Additional info:
I tried adding both root and the user used to start the jboss server to jboss-soa-p.4.2.0/jboss-as/server/production/conf/props/soa-users.properties - but this didn't help. What user definition is needed here?

Comment 1 Len DiMaggio 2007-12-11 20:27:32 UTC
The same problem is seen with the jboss-soa-p.4.2.0/jboss-as/bin/shutdown.sh script

Comment 2 Mike Brock 2007-12-13 19:45:26 UTC
The security principles it needs here are the same principles for the platform on the console.  This is an interesting limitation of how AS ties all of these operations to that of the jmx-console.

I'm not sure how we can work around this.

Comment 4 Mike Brock 2007-12-18 06:09:42 UTC
Using the shutdown.sh script with the --user and --password attributes with the SSO credentials works now.

[localhost:bin]$ ./shutdown.sh --shutdown --user=admin --password=admin
Shutdown message has been posted to the server.
Server shutdown may take a while - check logfiles for completion



Comment 5 Len DiMaggio 2007-12-20 17:29:40 UTC
The shutdown.sh script does work correctly with the -user=admin --password=admin attributes (in the Beta1 build).

But - this error is raised stopping the server if it is running as a service:
 
[jboss@stacks4 bin]$ sh ./jboss_init_redhat.sh stop
JBOSS_CMD_START = cd /opt/Beta1/EAP/jboss-soa-p.4.2.0/jboss-as/bin; /opt/Beta1/EAP/jboss-soa-p.4.2.0/jboss-as/bin/run.sh -c production
Password: 
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:585)
        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:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
        at java.lang.Thread.run(Thread.java:595)
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
        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)


Comment 6 Len DiMaggio 2007-12-20 17:30:08 UTC
[root@stacks4 bin]# /sbin/service jboss stop
JBOSS_CMD_START = cd /opt/Beta1/EAP/jboss-soa-p.4.2.0/jboss-as/bin; /opt/Beta1/EAP/jboss-soa-p.4.2.0/jboss-as/bin/run.sh -c production
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:585)
        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:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
        at java.lang.Thread.run(Thread.java:595)
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
        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)


Comment 7 Mike Brock 2008-01-08 00:36:13 UTC
okay, i might need to escalate this to get help from the EAP or AS guys.  this stuff is chiefly from them, we don't change it.

Comment 8 Mike Brock 2008-01-14 15:53:31 UTC
Link: Added: This issue depends JBPAPP-539


Comment 9 Len DiMaggio 2008-02-14 02:08:05 UTC
Link: Added: This issue related SOA-426


Comment 10 Deepak Bhole 2008-03-19 21:47:26 UTC
SuSE scripts will be affected by this as well. I have fixed both, Red Hat and SuSE scripts.

Comment 11 Len DiMaggio 2008-04-01 18:58:09 UTC
Still a problem in CP01:

[ldimaggi@ldimaggi bin]$ sh ./jboss_init_redhat.sh stop
JBOSS_CMD_START = cd /opt/CP01/jboss-soa-p-standalone.4.2.0/jboss-as/bin; /opt/CP01/jboss-soa-p-standalone.4.2.0/jboss-as/bin/run.sh -c default -D java.awt.headless=true
Password: 
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:585)
        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:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
        at java.lang.Thread.run(Thread.java:595)
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
        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)
[ldimaggi@ldimaggi bin]$ 



Comment 12 Deepak Bhole 2008-04-01 19:02:18 UTC
CP01 has not been built yet for 4.3. Did you build it from source?

Comment 13 ryan.campbell 2008-04-01 21:13:00 UTC
I think the fix-for-version is wrong on this bug.  It should be 4.2.0.CP02 since that is the version that will consume EAP 4.3.0.CP01.  Len, can you confirm and update the fix version?  The issue can then be marked as resolved again.

Comment 15 Deepak Bhole 2008-06-27 13:55:48 UTC
Issue remains resolved in EAP 4.3 CP01. Should be resolved in SOA 4.2 CP02, as it will be using EAP 4.3 CP01.

Comment 16 Len DiMaggio 2008-06-29 22:59:29 UTC
This is still an issue in SOA-P CP02 build CR4:


[ldimaggi@ldimaggi bin]$ sh ./jboss_init_redhat.sh stop
JBOSS_CMD_START = cd /opt/CP02_CR4/jboss-soa-p-standalone.4.2.0/jboss-as/bin; /opt/CP02_CR4/jboss-soa-p-standalone.4.2.0/jboss-as/bin/run.sh -c default -D java.awt.headless=true
Password: 
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:585)
        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:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
        at java.lang.Thread.run(Thread.java:595)
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
        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)
[ldimaggi@ldimaggi bin]$ 


Comment 17 Len DiMaggio 2008-06-29 23:02:06 UTC
See the resolution here:

      http://jira.jboss.com/jira/browse/SOA-426#action_12399433

Where the username/password are specified on the CLI:

       --user=username --password=password 

Can we do a similar fix here?


Comment 18 Deepak Bhole 2008-06-30 17:03:40 UTC
Password should not be needed at all. The new shutdown method sends a SIGQUIT to the process, bypassing JMX altogether. The fact that it is using JMX means that this is an older version of the script. What version of EAP does SOA CP02 use? The issue is fixed in EAP 4.3 CP01.

Comment 19 Len DiMaggio 2008-08-14 20:48:21 UTC
Still a problem in SOA-P 4.3 IR1:

[ldimaggi@ldimaggi bin]$ sh ./jboss_init_redhat.sh stop
JBOSS_CMD_START = cd /opt/43_IR1/jboss-soa-p-standalone.4.3.0/jboss-esb/bin; /opt/43_IR1/jboss-soa-p-standalone.4.3.0/jboss-esb/bin/run.sh -c default -D java.awt.headless=true
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:585)
        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:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
        at java.lang.Thread.run(Thread.java:595)
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
        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)
[ldimaggi@ldimaggi bin]$ 



Comment 20 Len DiMaggio 2008-08-15 19:30:01 UTC
From Rajesh:

Verified this on the current release. EAP 4.3.CP02
Both jboss_init_redhat.sh start and stop works fine without having to pass any parameters.


Comment 21 Len DiMaggio 2008-10-03 17:50:13 UTC
Still a problem in IR5:



[ldimaggi@ldimaggi bin]$ export JBOSSCP=${JBOSSCP:-"$JBOSS_HOME/bin/shutdown.jar:$JBOSS_HOME/client/jnet.jar"}
[ldimaggi@ldimaggi bin]$ echo $JBOSS_HOME
/opt/43_IR5/jboss-soa-p-standalone.4.3.0/jboss-esb/
[ldimaggi@ldimaggi bin]$ export JBOSS_HOME=${JBOSS_HOME:-"/opt/43_IR5/jboss-soa-p-standalone.4.3.0/jboss-esb/"}
[ldimaggi@ldimaggi bin]$ export JBOSSCP=${JBOSSCP:-"$JBOSS_HOME/bin/shutdown.jar:$JBOSS_HOME/client/jnet.jar"}
[ldimaggi@ldimaggi bin]$ java -classpath $JBOSSCP org.jboss.Shutdown --shutdown
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:585)
        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:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
        at java.lang.Thread.run(Thread.java:595)
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
        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)

Checking with EAP to see if we have the correct version of the script(s).


Comment 22 Len DiMaggio 2008-10-04 02:40:26 UTC
Why aren't we using the same shutdown script as EAP 4.3?



Comment 23 Len DiMaggio 2008-10-04 02:40:26 UTC
Attachment: Added: SOAP_43_jboss_init_redhat.sh
Attachment: Added: EAP_43_jboss_init_redhat.sh


Comment 24 Julian Coleman 2008-10-06 13:56:41 UTC
It looks like no longer need to replace the jboss_init_redhat.sh and twiddle.bat
(see SOA-292) files, but can use the EAP versions.  The EAP version of
jboss_init_redhat.sh has changed the shutdown method, so this issue is no
longer relevant, and the EAP and SOA-P versions of twiddle.bat are the same
apart from REM statements and white space.

Comment 25 Julian Coleman 2008-10-08 15:59:14 UTC
Fixed in revision 2064 of:
  build-tools/builders/eap/build.xml
  build-tools/builders/esb/build.xml
  build-tools/resource/launch-scripts/jboss_init_redhat.sh
  build-tools/resource/launch-scripts/twiddle.bat

Commit message:
  Use the EAP versions of twiddle.bat and jboss_init_redhat.sh


Comment 26 Len DiMaggio 2008-10-15 19:49:04 UTC
Verified in CR1


[ldimaggi@ldimaggi bin]$ sh ./jboss_init_redhat.sh stop
JBOSS_CMD_START = cd /opt/43_CR1/jboss-soa-p-standalone.4.3.0/jboss-esb/bin; /opt/43_CR1/jboss-soa-p-standalone.4.3.0/jboss-esb/bin/run.sh -c default
Password: 

waiting for processes to stop


[ldimaggi@ldimaggi bin]$ sh ./jboss_init_redhat.sh  stop
JBOSS_CMD_START = cd /opt/43_CR1/jboss-soa-p.4.3.0/jboss-as/bin; /opt/43_CR1/jboss-soa-p.4.3.0/jboss-as/bin/run.sh -c production
Password: 

waiting for processes to stop
waiting for processes to stop
waiting for processes to stop
waiting for processes to stop
waiting for processes to stop
waiting for processes to stop


Comment 27 Len DiMaggio 2008-10-24 17:52:08 UTC
Link: Added: This issue related SOA-980


Comment 28 Brian Shim 2009-11-02 16:19:46 UTC
Link: Added: This issue related JBPAPP-3029


Comment 29 Julian Coleman 2009-12-09 14:20:23 UTC
Link: Added: This issue related SOA-1674


Comment 30 Julian Coleman 2009-12-09 14:23:04 UTC
Link: Removed: This issue related JBPAPP-3029