Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 7 2007
Added on Jul 7 2007
1 comment
228 views