Menu

#52 IO exception while connecting Tomcat 5.0

open
nobody
None
5
2015-01-13
2005-11-18
Heidi Yeung
No

java.io.IOException: Failed to retrieve RMIServer
stub: javax.naming.ServiceUnavailableException [Root
exception is java.rmi.ConnectException: Connection
refused to host: localhost; nested exception is:
java.net.ConnectException: Connection
refused: connect]
at
javax.management.remote.rmi.RMIConnector.connect
(RMIConnector.java:317)
at
javax.management.remote.JMXConnectorFactory.connect
(JMXConnectorFactory.java:248)
at
org.mc4j.console.connection.JSR160ConnectionNode.conne
ct(JSR160ConnectionNode.java:132)
at
org.mc4j.console.connection.ReconnectAction.performAct
ion(ReconnectAction.java:47)
at
org.openide.util.actions.NodeAction.performAction
(NodeAction.java:193)
at
org.openide.util.actions.CallableSystemAction$1.run
(CallableSystemAction.java:78)
at
org.openide.util.actions.CallableSystemAction$ActionRu
nnable.actionPerformed(CallableSystemAction.java:247)
at
org.netbeans.core.ModuleActions.invokeAction
(ModuleActions.java:74)
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.openide.util.actions.CallableSystemAction.invokeAc
tion(CallableSystemAction.java:179)
at
org.openide.util.actions.CallableSystemAction.access$0
00(CallableSystemAction.java:31)
at
org.openide.util.actions.CallableSystemAction$ActionRu
nnable.doRun(CallableSystemAction.java:241)
at
org.openide.util.actions.CallableSystemAction$2.run
(CallableSystemAction.java:111)
at org.openide.util.Task.run(Task.java:136)
at org.openide.util.RequestProcessor$Task.run
(RequestProcessor.java:330)
at
org.openide.util.RequestProcessor$Processor.run
(RequestProcessor.java:686)
Caused by: javax.naming.ServiceUnavailableException
[Root exception is java.rmi.ConnectException:
Connection refused to host: localhost; nested
exception is:
java.net.ConnectException: Connection
refused: connect]
at
com.sun.jndi.rmi.registry.RegistryContext.lookup
(RegistryContext.java:97)
at
com.sun.jndi.toolkit.url.GenericURLContext.lookup
(GenericURLContext.java:185)
at javax.naming.InitialContext.lookup
(InitialContext.java:351)
at
javax.management.remote.rmi.RMIConnector.findRMIServer
JNDI(RMIConnector.java:1807)
at
javax.management.remote.rmi.RMIConnector.findRMIServer
(RMIConnector.java:1777)
at
javax.management.remote.rmi.RMIConnector.connect
(RMIConnector.java:259)
... 18 more
Caused by: java.rmi.ConnectException: Connection
refused to host: localhost; nested exception is:
java.net.ConnectException: Connection
refused: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket
(TCPEndpoint.java:574)
at
sun.rmi.transport.tcp.TCPChannel.createConnection
(TCPChannel.java:185)
at
sun.rmi.transport.tcp.TCPChannel.newConnection
(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.newCall
(UnicastRef.java:306)
at sun.rmi.registry.RegistryImpl_Stub.lookup
(Unknown Source)
at
com.sun.jndi.rmi.registry.RegistryContext.lookup
(RegistryContext.java:93)
... 23 more
Caused by: java.net.ConnectException: Connection
refused: connect
at java.net.PlainSocketImpl.socketConnect
(Native Method)
at java.net.PlainSocketImpl.doConnect
(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress
(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect
(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect
(SocksSocketImpl.java:364)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at java.net.Socket.<init>(Socket.java:365)
at java.net.Socket.<init>(Socket.java:178)
at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createS
ocket(RMIDirectSocketFactory.java:22)
at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createS
ocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket
(TCPEndpoint.java:569)
[catch] ... 28 more

Discussion

  • Greg Hinkle

    Greg Hinkle - 2005-11-18
    • milestone: 239797 -->
     
  • Greg Hinkle

    Greg Hinkle - 2005-11-18

    Logged In: YES
    user_id=773314

    The following means that there is no JMX server listening on the port you
    configured.

    Caused by: java.rmi.ConnectException: Connection
    refused to host: localhost; nested exception is:
    java.net.ConnectException: Connection
    refused: connect

    It looks like you're trying to connect to Tomcat 5.0 with the JSR-160
    connector. How have you configured Tomcat to publish a JMX Server? It looks
    like the tomcat developers have stopped supporting the MX4J connector on
    5.0 and now recommend using JDK 1.5 for the server (which has a built-in
    jmx rmi server). http://issues.apache.org/bugzilla/show_bug.cgi?id=27894

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.