java.rmi.ConnectException: Connection refused to host:
23,879
Check all you network adapters ,some time a VM network adapter interferes in this way .
Which is you current localhost
or 127.0.0.1
is not any more referring to you host name or current machine ,which then create a connection refused problem. My General Recommendation is:
1.To check or disable unwanted VM or Network Adapters
2.Ping 127.0.0.1
3.Disable Firewall and Test if all the above doesn't work
4.Add security Manager with a policy file on you server if you haven't done that.
Author by
Admin
Updated on March 11, 2020Comments
-
Admin about 4 years
java.rmi.ConnectException: Connection refused to host: IPSERVER0.0.0.0.0; nested exception is: java.net.ConnectException: Connection timed out at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619) at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216) at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202) at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:340) at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) at java.rmi.Naming.lookup(Naming.java:101) at StartRMI.go(StartRMI.java:14) at StartRMI.main(StartRMI.java:6) Caused by: java.net.ConnectException: Connection timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528) at java.net.Socket.<init>(Socket.java:425) at java.net.Socket.<init>(Socket.java:208) at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40) at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:146) at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613) ... 7 more
I get this exception when I try to connect a remote client to my server. My Server is running RMI Server fine, and there no firewall installed. How to fix that issue ?