From: dorab <do...@ma...> - 2007-01-15 23:26:00
|
I have a mostly stock Jetty 6.1.1, configured for JMX. I start up rmiregistry. I start up jetty. It works fine. I shut it down via the "--stop" command to start.jar. I restart it. It fails with the following: jettystart: 2007-01-15 15:12:38.195::INFO: Logging to STDERR via org.mortbay.log.StdErrLog 2007-01-15 15:12:38.293::WARN: HttpAdaptor for mx4j is not secure HttpAdaptor version 3.0.1 started on port 8082 2007-01-15 15:12:38.437::WARN: Config error at <Call name="start"/> 2007-01-15 15:12:38.437::WARN: Config error at <Call id="jmxConnector" class="javax.management.remote.JMXConnectorServerFactory" name="newJMXConnectorServer"><Arg> <New class="javax.management.remote.JMXServiceURL"><Arg>service:jmx:rmi:///jndi/rmi:///jettymbeanserver</Arg></New> </Arg><Arg/><Arg><Ref id="MBeanServer"/></Arg><Call name="start"/></Call> 2007-01-15 15:12:38.437::WARN: EXCEPTION java.lang.reflect.InvocationTargetException 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.mortbay.xml.XmlConfiguration.call(XmlConfiguration.java:529) at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:241) at org.mortbay.xml.XmlConfiguration.call(XmlConfiguration.java:543) at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:241) at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:203) at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:919) 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.mortbay.start.Main.invokeMain(Main.java:183) at org.mortbay.start.Main.start(Main.java:497) at org.mortbay.start.Main.main(Main.java:115) Caused by: java.io.IOException: Cannot bind to URL [rmi:///jettymbeanserver]: javax.naming.NameAlreadyBoundException: jettymbeanserver [Root exception is java.rmi.AlreadyBoundException: jettymbeanserver] at javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:804) at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:417) ... 17 more Caused by: javax.naming.NameAlreadyBoundException: jettymbeanserver [Root exception is java.rmi.AlreadyBoundException: jettymbeanserver] 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:400) at javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:625) at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:412) ... 17 more Caused by: java.rmi.AlreadyBoundException: jettymbeanserver at sun.rmi.registry.RegistryImpl.bind(RegistryImpl.java:123) at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source) at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:386) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250) 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:359) at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source) at com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:120) ... 21 more 2007-01-15 15:12:38.439::WARN: Nested in java.lang.reflect.InvocationTargetException: java.io.IOException: Cannot bind to URL [rmi:///jettymbeanserver]: javax.naming.NameAlreadyBoundException: jettymbeanserver [Root exception is java.rmi.AlreadyBoundException: jettymbeanserver] at javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:804) at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:417) 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.mortbay.xml.XmlConfiguration.call(XmlConfiguration.java:529) at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:241) at org.mortbay.xml.XmlConfiguration.call(XmlConfiguration.java:543) at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:241) at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:203) at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:919) 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.mortbay.start.Main.invokeMain(Main.java:183) at org.mortbay.start.Main.start(Main.java:497) at org.mortbay.start.Main.main(Main.java:115) Caused by: javax.naming.NameAlreadyBoundException: jettymbeanserver [Root exception is java.rmi.AlreadyBoundException: jettymbeanserver] 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:400) at javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:625) at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:412) ... 17 more Caused by: java.rmi.AlreadyBoundException: jettymbeanserver at sun.rmi.registry.RegistryImpl.bind(RegistryImpl.java:123) at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source) at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:386) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250) 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:359) at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source) at com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:120) ... 21 more Seems like "jettymbeanserver" is already bound. If I kill and restart the rmiserver, all is fine. So, when I shut down Jetty with the "--stop" option, it seems it did not remove the bindings for jettymbeanserver. Any solutions? Thanks -- View this message in context: http://www.nabble.com/config-error-when-restarting-jetty-%28javax.naming.NameAlreadyBoundException%3A-jettymbeanserver%29-tf3017979.html#a8381590 Sent from the Jetty Support mailing list archive at Nabble.com. |