wood burning stoves 2.0*
The moose likes Distributed Java and the fly likes rmi--about socket factory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "rmi--about socket factory" Watch "rmi--about socket factory" New topic

rmi--about socket factory

dragon ji
Ranch Hand

Joined: Oct 31, 2002
Posts: 110
I did a test following this guide http://java.sun.com/j2se/1.4.1/docs/guide/rmi/socketfactory/index.html
when I did it in one machine(Windows),it was ok,but when I move the client into another machine(UNIX),it report:
HelloClient exception: Connection refused to host:; nested exception is:
java.net.ConnectException: Connection refused
java.rmi.ConnectException: Connection refused to host:; nested exception is:
java.net.ConnectException: Connection refused
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.lookup(Unknown Source)
at rmisocfac.HelloClient.main(HelloClient.java:16)
Caused by: java.net.ConnectException: Connection refused
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:426)
at java.net.Socket.connect(Socket.java:376)
at java.net.Socket.<init>(Socket.java:291)
at java.net.Socket.<init>(Socket.java:119)
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)
... 5 more

the is the client's ip address.
I don't know why?please help me?what shall I do?thanx.

scjp 1.4<br />challenge haven't limit!
Diego Bowen
Ranch Hand

Joined: Aug 19, 2003
Posts: 50
Hello did you ever get this resolved i'm have a similar problem: ConnectException related to my lookup() call. Any help would be appreciated...thanks
subject: rmi--about socket factory