Connection refused to host: localhost (rmi)
"Ridha Rejeb" <[email protected]>
| Newsgroups | gmane.comp.java.mx4j.devel |
|---|---|
| Message-ID | <[email protected]> |
hi all,
please let me know if anyone solved this problem. It arises by running the RMI examples of the MX4J release 1.1.1 (OS : W2K, Java SDK : 1.4.2).
D:\mx4j-1.1.1>set classpath
CLASSPATH=D:\mx4j-1.1.1;D:\mx4j-1.1.1\examples\jndi.properties;D:\mx4j-1.1.1\lib\mx4j-jmx.jar;D:\mx4j-1.1.1\lib\mx4j-tools.jar
D:\mx4j-1.1.1>java examples.mbeans.rmi.Server
Exception in thread "main" javax.management.MBeanException: nested exception is javax.naming.ServiceUnavailableException
[Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused: connect]
javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: local
host; nested exception is:
java.net.ConnectException: Connection refused: connect]
at com.sun.jndi.rmi.registry.RegistryContext.rebind(RegistryContext.java:133)
at com.sun.jndi.rmi.registry.RegistryContext.rebind(RegistryContext.java:138)
at javax.naming.InitialContext.rebind(InitialContext.java:363)
at examples.mbeans.rmi.MyRemoteServiceObject.start(MyRemoteServiceObject.java:60)
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:324)
at mx4j.server.ReflectedMBeanInvoker.invokeImpl(ReflectedMBeanInvoker.java:117)
at mx4j.server.ReflectedMBeanInvoker.invoke(ReflectedMBeanInvoker.java:55)
at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:228)
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:123)
at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:79)
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:123)
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:123)
at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(ContextClassLoaderMBeanServerIntercep
tor.java:144)
at mx4j.server.MBeanServerImpl.invoke(MBeanServerImpl.java:1353)
at mx4j.util.StandardMBeanProxy$LocalHandler.invokeOperation(StandardMBeanProxy.java:262)
at mx4j.util.StandardMBeanProxy$Handler.invoke(StandardMBeanProxy.java:165)
at $Proxy0.start(Unknown Source)
at examples.mbeans.rmi.Server.main(Server.java:33)
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:567)
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:313)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at com.sun.jndi.rmi.registry.RegistryContext.rebind(RegistryContext.java:131)
... 20 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.<init>(Socket.java:309)
at java.net.Socket.<init>(Socket.java:124)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
... 25 more
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf