Connection refused to host:

hi all

I am using rmi and previously I was running my code very successfully,

But today I am getting the error shown below .The same error is coming in linux.

When I run in local maching then it works fine, without any problem.

Suggest me waht to do and why is this happening so?

java.rmi.ConnectException: Connection refused to host: 192.168.6.13; nested exception is:

java.net.ConnectException: Connection refused: connect

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.newCall(UnicastRef.java:322)

at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)

at java.rmi.Naming.lookup(Naming.java:84)

[879 byte] By [sipina] at [2007-10-3 2:54:22]
# 1
So you are not running in a local machine. What are you running in? and is there a router in the way by any chance? or the Internet?
ejpa at 2007-7-14 20:43:26 > top of Java-index,Core,Core APIs...
# 2
Thanxya my pc is in internet and i am runnig server on one machine and client on other machine in windowsAnd the machines are in LANMessage was edited by: sipin
sipina at 2007-7-14 20:43:26 > top of Java-index,Core,Core APIs...
# 3
Are the machines in the same LAN or are they only connected by the Internet?Can you ping each machine from the other?
ejpa at 2007-7-14 20:43:26 > top of Java-index,Core,Core APIs...
# 4
ya the machines are in same LAN and i can ping ,access shared files from other pc's
sipina at 2007-7-14 20:43:26 > top of Java-index,Core,Core APIs...
# 5
Then there is something wrong with the hostname or the port in the string you are supplying to Naming.lookup(). You need to be able to ping that hostname from the client machine, and to telnet to that host and port from the client too.
ejpa at 2007-7-14 20:43:26 > top of Java-index,Core,Core APIs...