Results 1 to 1 of 1
Thread: RMI Problem
- 08-27-2009, 02:59 AM #1
Member
- Join Date
- Aug 2009
- Posts
- 1
- Rep Power
- 0
RMI Problem
I have problem with a simple RMI application which try to call an RMI method from another machine located in my local network.
Server and rmiregistry running on 192.168.4.1 and client on the same machine...Everything goes fine.
When I move server on 192.168.4.2 (rmiregistry running at 192.168.4.2 ) , client on 192.168.4.2, I receive the following exception on client side:
Java Code:java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601) at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198) at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110) at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:178) at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132) at $Proxy0.call(Unknown Source) at client.ShClient.main(Unknown Source) Caused by: java.net.ConnectException: Connection refused 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:366) at java.net.Socket.connect(Socket.java:525) at java.net.Socket.connect(Socket.java:475) at java.net.Socket.<init>(Socket.java:372) at java.net.Socket.<init>(Socket.java:186) 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:595)
I have no problem problem with connection between endpoints.Both are RHEL5 without firewall with 1.6.0_16-b01 .Netcat report that the socket is opened on 192.168.4.2 :
Java Code:nc -vv 192.168.4.2 1099 Connection to 192.168.4.2 1099 port [tcp/rmiregistry] succeeded!


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks