java.rmi.ConnectException: Connection refused to host:
843793Jul 7 2007 — edited Jul 10 2007 HI,
I have both RMI client and server in my machine.
i started the server successfully with
C:\Documents and Settings\benedict\workspace\RMIDemo\bin>java -cp C:/"Documents and settings"/benedict/workspace/RMIDemo/src;./;c:/"Documents and settings"/benedict/workspace/RMIDemo/bin/compute.jar -Djava.rmi.server.codebase=file:/c:/diana
compute.jar -Djava.rmi.server.hostname=1.58.218.238 -Djava.security.poli
y=server.policy engine.ComputeEngine
But im getting exception when i try running the client using
C:\Documents and Settings\benedict\workspace\RMIClient\src>java -cp ./;c:/diana/compute.jar -Djava.rmi.server.codebase=file:/c:/diana/ client.ComputePi 71.58.218.238 45
Exception is
ComputePi exception:
java.rmi.ConnectException: Connection refused to host: 71.58.218.238; nested exc
eption is:
java.net.ConnectException: Connection timed out: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at client.ComputePi.main(ComputePi.java:16)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown S
ource)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown S
ource)
... 6 more
Whats wrong with this?Help me pls