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!

java.net.ConnectException: Connection refused: connect

843790Aug 7 2008 — edited Aug 7 2008
Hi, I have a problem with my socket connection, actually it only occurs on one client and I don't know why.

JRE 1.5_14
Eclipse 3.3

java.net.ConnectException: Connection refused: 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)
...

I thought that this error only occurs when nothing is listening on this port on the specified host, but I can easily connect with telnet.
Any ideas?

Thanks :)

Edited by: marburk on Aug 7, 2008 6:12 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 4 2008
Added on Aug 7 2008
6 comments
555 views