tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michele Mazzucco <Michele.Mazzu...@ncl.ac.uk>
Subject jmx & rmi connection problem
Date Mon, 06 Nov 2006 12:09:48 GMT
Hi all,

I don't know wether this is the right mailing list where to post my  
problem.
I have a web service which, during the system startup, creates all  
the needed JMX stuff, but unfortunately if fails (see the stack trace  
below). The reason seems to be:

Caused by: java.rmi.AccessException: Registry.Registry.bind  
disallowed; origin /128.240.229.70 is non-local host

The above address is not the machine address (I don't know from where  
it comes from) while the line of code which generates the problem is

JMXConnectorServer.start();

The chunk of executed code is the following:
LocateRegistry.createRegistry(port);
String localhost = InetAddress.getLocalHost().getCanonicalHostName();


MBeanServer mbs = MBeanServerFactory.createMBeanServer();
JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/ 
rmi://" + localhost + ":" + port + "/qosp");

JMXConnectorServer cs =  
JMXConnectorServerFactory.newJMXConnectorServer(url, null, mbs);
cs.start();







Nov 6, 2006 11:55:01 AM org.apache.catalina.core.AprLifecycleListener  
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal  
performance in production environments was not found on the  
java.library.path: .:/Library/Java/Extensions:/System/Library/Java/ 
Extensions:/usr/lib/java
Nov 6, 2006 11:55:01 AM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Nov 6, 2006 11:55:01 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 666 ms
Nov 6, 2006 11:55:02 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Nov 6, 2006 11:55:02 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.15
Nov 6, 2006 11:55:02 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Nov 6, 2006 11:55:02 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive axis2.war
2006-11-06 11:55:03,668 INFO   
org.apache.axis2.deployment.DeploymentEngine - Deploying module :  
addressing-1.1
2006-11-06 11:55:03,682 INFO   
org.apache.axis2.deployment.DeploymentEngine - Deploying module :  
managerInterceptor
2006-11-06 11:55:03,690 INFO   
org.apache.axis2.deployment.DeploymentEngine - Deploying module :  
soapmonitor-1.1
2006-11-06 11:55:03,890 INFO  ncl.qosp.controller.LifecycleSupport -  
Qosp jmx is starting up...
org.apache.axis2.deployment.DeploymentException: Processing  
Operations Modules Unable to start the connector; nested exception is:
	java.lang.RuntimeException: Unable to start the connector; nested  
exception is:
	org.apache.axis2.deployment.DeploymentException: Unable to start the  
connector; nested exception is:
	java.lang.RuntimeException: Unable to start the connector; nested  
exception is:
	org.apache.axis2.deployment.DeploymentException: Processing  
Operations Modules Unable to start the connector; nested exception is:
	java.lang.RuntimeException: Unable to start the connector; nested  
exception is:
	org.apache.axis2.deployment.DeploymentException: Unable to start the  
connector; nested exception is:
	java.lang.RuntimeException: Unable to start the connector
	at  
org.apache.axis2.deployment.repository.util.ArchiveReader.processService 
Group(ArchiveReader.java:124)
	at org.apache.axis2.deployment.DeploymentEngine.doDeploy 
(DeploymentEngine.java:528)
	at org.apache.axis2.deployment.repository.util.WSInfoList.update 
(WSInfoList.java:196)
	at org.apache.axis2.deployment.RepositoryListener.update 
(RepositoryListener.java:227)
	at org.apache.axis2.deployment.RepositoryListener.checkServices 
(RepositoryListener.java:174)
	at org.apache.axis2.deployment.DeploymentEngine.loadServices 
(DeploymentEngine.java:88)
	at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices 
(WarBasedAxisConfigurator.java:252)
	at  
org.apache.axis2.context.ConfigurationContextFactory.createConfiguration 
Context(ConfigurationContextFactory.java:72)
	at org.apache.axis2.transport.http.AxisServlet.initConfigContext 
(AxisServlet.java:373)
	at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java: 
317)
	at org.apache.catalina.core.StandardWrapper.loadServlet 
(StandardWrapper.java:1105)
	at org.apache.catalina.core.StandardWrapper.load 
(StandardWrapper.java:932)
	at org.apache.catalina.core.StandardContext.loadOnStartup 
(StandardContext.java:3915)
	at org.apache.catalina.core.StandardContext.start 
(StandardContext.java:4176)
	at org.apache.catalina.core.ContainerBase.addChildInternal 
(ContainerBase.java:759)
	at org.apache.catalina.core.ContainerBase.addChild 
(ContainerBase.java:739)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java: 
524)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java: 
804)
	at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java: 
693)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java: 
472)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent 
(HostConfig.java:310)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent 
(LifecycleSupport.java:119)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java: 
1020)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java: 
1012)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java: 
442)
	at org.apache.catalina.core.StandardService.start 
(StandardService.java:450)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java: 
700)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
	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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.apache.axis2.deployment.DeploymentException:  
Processing Operations Modules Unable to start the connector; nested  
exception is:
	java.lang.RuntimeException: Unable to start the connector; nested  
exception is:
	org.apache.axis2.deployment.DeploymentException: Unable to start the  
connector; nested exception is:
	java.lang.RuntimeException: Unable to start the connector
	at org.apache.axis2.deployment.ServiceBuilder.populateService 
(ServiceBuilder.java:320)
	at  
org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGr 
oup(ArchiveReader.java:76)
	at  
org.apache.axis2.deployment.repository.util.ArchiveReader.processService 
Group(ArchiveReader.java:118)
	... 35 more
Caused by: org.apache.axis2.deployment.DeploymentException: Unable to  
start the connector; nested exception is:
	java.lang.RuntimeException: Unable to start the connector
	at  
org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass 
(ServiceBuilder.java:349)
	at org.apache.axis2.deployment.ServiceBuilder.populateService 
(ServiceBuilder.java:127)
	... 37 more
Caused by: java.lang.RuntimeException: Unable to start the connector
	at ncl.qosp.controller.LifecycleSupport.initRemoteJmx 
(LifecycleSupport.java:192)
	at ncl.qosp.controller.LifecycleSupport.startUp 
(LifecycleSupport.java:132)
	at  
org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass 
(ServiceBuilder.java:345)
	... 38 more
Caused by: java.io.IOException: Cannot bind to URL [rmi:// 
sealbook.ncl.ac.uk:10099/qosp]: javax.naming.NoPermissionException  
[Root exception is java.rmi.ServerException: RemoteException occurred  
in server thread; nested exception is:
	java.rmi.AccessException: Registry.Registry.bind disallowed; origin / 
128.240.229.70 is non-local host]
	at javax.management.remote.rmi.RMIConnectorServer.newIOException 
(RMIConnectorServer.java:814)
	at javax.management.remote.rmi.RMIConnectorServer.start 
(RMIConnectorServer.java:431)
	at ncl.qosp.controller.LifecycleSupport.initRemoteJmx 
(LifecycleSupport.java:190)
	... 40 more
Caused by: javax.naming.NoPermissionException [Root exception is  
java.rmi.ServerException: RemoteException occurred in server thread;  
nested exception is:
	java.rmi.AccessException: Registry.Registry.bind disallowed; origin / 
128.240.229.70 is non-local host]
	at com.sun.jndi.rmi.registry.RegistryContext.bind 
(RegistryContext.java:122)
	at com.sun.jndi.toolkit.url.GenericURLContext.bind 
(GenericURLContext.java:208)
	at javax.naming.InitialContext.bind(InitialContext.java:359)
	at javax.management.remote.rmi.RMIConnectorServer.bind 
(RMIConnectorServer.java:635)
	at javax.management.remote.rmi.RMIConnectorServer.start 
(RMIConnectorServer.java:427)
	... 41 more
Caused by: java.rmi.ServerException: RemoteException occurred in  
server thread; nested exception is:
	java.rmi.AccessException: Registry.Registry.bind disallowed; origin / 
128.240.229.70 is non-local host
	at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java: 
385)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
	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:460)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run 
(TCPTransport.java:701)
	at java.lang.Thread.run(Thread.java:613)
	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:343)
	at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
	at com.sun.jndi.rmi.registry.RegistryContext.bind 
(RegistryContext.java:116)
	... 45 more
Caused by: java.rmi.AccessException: Registry.Registry.bind  
disallowed; origin /128.240.229.70 is non-local host
	at sun.rmi.registry.RegistryImpl.checkAccess(RegistryImpl.java:223)
	at sun.rmi.registry.RegistryImpl.bind(RegistryImpl.java:119)
	at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
	at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java: 
375)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
	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:460)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run 
(TCPTransport.java:701)
	at java.lang.Thread.run(Thread.java:613)
2006-11-06 11:55:04,041 ERROR  
org.apache.axis2.deployment.DeploymentEngine - Invalid service   
RoutingService.aar due to Processing Operations Modules Unable to  
start the connector; nested exception is:
	java.lang.RuntimeException: Unable to start the connector; nested  
exception is:
	org.apache.axis2.deployment.DeploymentException: Unable to start the  
connector; nested exception is:
	java.lang.RuntimeException: Unable to start the connector; nested  
exception is:
	org.apache.axis2.deployment.DeploymentException: Processing  
Operations Modules Unable to start the connector; nested exception is:
	java.lang.RuntimeException: Unable to start the connector; nested  
exception is:
	org.apache.axis2.deployment.DeploymentException: Unable to start the  
connector; nested exception is:
	java.lang.RuntimeException: Unable to start the connector
org.apache.axis2.deployment.DeploymentException: Processing  
Operations Modules Unable to start the connector; nested exception is:
	java.lang.RuntimeException: Unable to start the connector; nested  
exception is:
	org.apache.axis2.deployment.DeploymentException: Unable to start the  
connector; nested exception is:
	java.lang.RuntimeException: Unable to start the connector; nested  
exception is:
	org.apache.axis2.deployment.DeploymentException: Processing  
Operations Modules Unable to start the connector; nested exception is:
	java.lang.RuntimeException: Unable to start the connector; nested  
exception is:
	org.apache.axis2.deployment.DeploymentException: Unable to start the  
connector; nested exception is:
	java.lang.RuntimeException: Unable to start the connector
	at  
org.apache.axis2.deployment.repository.util.ArchiveReader.processService 
Group(ArchiveReader.java:124)
	at org.apache.axis2.deployment.DeploymentEngine.doDeploy 
(DeploymentEngine.java:528)
	at org.apache.axis2.deployment.repository.util.WSInfoList.update 
(WSInfoList.java:196)
	at org.apache.axis2.deployment.RepositoryListener.update 
(RepositoryListener.java:227)
	at org.apache.axis2.deployment.RepositoryListener.checkServices 
(RepositoryListener.java:174)
	at org.apache.axis2.deployment.DeploymentEngine.loadServices 
(DeploymentEngine.java:88)
	at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices 
(WarBasedAxisConfigurator.java:252)
	at  
org.apache.axis2.context.ConfigurationContextFactory.createConfiguration 
Context(ConfigurationContextFactory.java:72)
	at org.apache.axis2.transport.http.AxisServlet.initConfigContext 
(AxisServlet.java:373)
	at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java: 
317)
	at org.apache.catalina.core.StandardWrapper.loadServlet 
(StandardWrapper.java:1105)
	at org.apache.catalina.core.StandardWrapper.load 
(StandardWrapper.java:932)
	at org.apache.catalina.core.StandardContext.loadOnStartup 
(StandardContext.java:3915)
	at org.apache.catalina.core.StandardContext.start 
(StandardContext.java:4176)
	at org.apache.catalina.core.ContainerBase.addChildInternal 
(ContainerBase.java:759)
	at org.apache.catalina.core.ContainerBase.addChild 
(ContainerBase.java:739)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java: 
524)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java: 
804)
	at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java: 
693)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java: 
472)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent 
(HostConfig.java:310)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent 
(LifecycleSupport.java:119)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java: 
1020)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java: 
1012)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java: 
442)
	at org.apache.catalina.core.StandardService.start 
(StandardService.java:450)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java: 
700)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
	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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.apache.axis2.deployment.DeploymentException:  
Processing Operations Modules Unable to start the connector; nested  
exception is:
	java.lang.RuntimeException: Unable to start the connector; nested  
exception is:
	org.apache.axis2.deployment.DeploymentException: Unable to start the  
connector; nested exception is:
	java.lang.RuntimeException: Unable to start the connector
	at org.apache.axis2.deployment.ServiceBuilder.populateService 
(ServiceBuilder.java:320)
	at  
org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGr 
oup(ArchiveReader.java:76)
	at  
org.apache.axis2.deployment.repository.util.ArchiveReader.processService 
Group(ArchiveReader.java:118)
	... 35 more
Caused by: org.apache.axis2.deployment.DeploymentException: Unable to  
start the connector; nested exception is:
	java.lang.RuntimeException: Unable to start the connector
	at  
org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass 
(ServiceBuilder.java:349)
	at org.apache.axis2.deployment.ServiceBuilder.populateService 
(ServiceBuilder.java:127)
	... 37 more
Caused by: java.lang.RuntimeException: Unable to start the connector
	at ncl.qosp.controller.LifecycleSupport.initRemoteJmx 
(LifecycleSupport.java:192)
	at ncl.qosp.controller.LifecycleSupport.startUp 
(LifecycleSupport.java:132)
	at  
org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass 
(ServiceBuilder.java:345)
	... 38 more
Caused by: java.io.IOException: Cannot bind to URL [rmi:// 
sealbook.ncl.ac.uk:10099/qosp]: javax.naming.NoPermissionException  
[Root exception is java.rmi.ServerException: RemoteException occurred  
in server thread; nested exception is:
	java.rmi.AccessException: Registry.Registry.bind disallowed; origin / 
128.240.229.70 is non-local host]
	at javax.management.remote.rmi.RMIConnectorServer.newIOException 
(RMIConnectorServer.java:814)
	at javax.management.remote.rmi.RMIConnectorServer.start 
(RMIConnectorServer.java:431)
	at ncl.qosp.controller.LifecycleSupport.initRemoteJmx 
(LifecycleSupport.java:190)
	... 40 more
Caused by: javax.naming.NoPermissionException [Root exception is  
java.rmi.ServerException: RemoteException occurred in server thread;  
nested exception is:
	java.rmi.AccessException: Registry.Registry.bind disallowed; origin / 
128.240.229.70 is non-local host]
	at com.sun.jndi.rmi.registry.RegistryContext.bind 
(RegistryContext.java:122)
	at com.sun.jndi.toolkit.url.GenericURLContext.bind 
(GenericURLContext.java:208)
	at javax.naming.InitialContext.bind(InitialContext.java:359)
	at javax.management.remote.rmi.RMIConnectorServer.bind 
(RMIConnectorServer.java:635)
	at javax.management.remote.rmi.RMIConnectorServer.start 
(RMIConnectorServer.java:427)
	... 41 more
Caused by: java.rmi.ServerException: RemoteException occurred in  
server thread; nested exception is:
	java.rmi.AccessException: Registry.Registry.bind disallowed; origin / 
128.240.229.70 is non-local host
	at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java: 
385)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
	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:460)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run 
(TCPTransport.java:701)
	at java.lang.Thread.run(Thread.java:613)
	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:343)
	at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
	at com.sun.jndi.rmi.registry.RegistryContext.bind 
(RegistryContext.java:116)
	... 45 more
Caused by: java.rmi.AccessException: Registry.Registry.bind  
disallowed; origin /128.240.229.70 is non-local host
	at sun.rmi.registry.RegistryImpl.checkAccess(RegistryImpl.java:223)
	at sun.rmi.registry.RegistryImpl.bind(RegistryImpl.java:119)
	at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
	at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java: 
375)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
	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:460)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run 
(TCPTransport.java:701)
	at java.lang.Thread.run(Thread.java:613)
2006-11-06 11:55:04,180 INFO   
org.apache.axis2.deployment.DeploymentEngine - Deploying Web service   
version.aar
Nov 6, 2006 11:55:04 AM org.apache.coyote.http11.Http11BaseProtocol  
start
INFO: Starting Coyote HTTP/1.1 on http-8080
Nov 6, 2006 11:55:04 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Nov 6, 2006 11:55:04 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/26  config=null
Nov 6, 2006 11:55:04 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Nov 6, 2006 11:55:04 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2979 ms




Should I customize the security policy? If yes, what should I add?


Thanks in advance,
Michele


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message