GeeCON Prague 2014*
The moose likes Distributed Java and the fly likes Connection refused Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Connection refused" Watch "Connection refused" New topic
Author

Connection refused

Anthony Guillen
Greenhorn

Joined: Aug 30, 2006
Posts: 6
Hi,

Please help me why I always keep on getting "java.net.ConnectException: Connection refused: connect" when I run my command script. What are the possible reasons why I always getting on this error.

Thanks.

Anthony
praveen kumar soni
Greenhorn

Joined: Mar 21, 2005
Posts: 13
HEllo Anthony

please provide more details as to which server are you starting up etc etc and how are you actually trying to do it
Anthony Guillen
Greenhorn

Joined: Aug 30, 2006
Posts: 6
Hi,

I am new to this kind of error but based on the the logs I read, it says ConnectException:connection refused... the details of log below:

HostAccessServiceManager starting ...
Forcing Discovery of jini://127.0.0.1:4160
Cannot start HostAccessServiceManager
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:350)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:137)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:124)
at java.net.Socket.<init>(Socket.java:268)
at java.net.Socket.<init>(Socket.java:95)

basically, the setup here is somewhat complex and complicated. I am connecting to several IP's specifically three IPs (192.168.10.112, 192.168.10.176:1433, 192.168.10.113)

The log above was from 192.168.10.112. The second IP with port 1433, where my database (MS SQL Server) reside. and the last IP where I execute my script and it has similar error above:

HostAccessServiceManager starting ...
Forcing Discovery of jini://192.168.10.112
Cannot start HostAccessServiceManager
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:350)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:137)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:124)
at java.net.Socket.<init>(Socket.java:268)
at java.net.Socket.<init>(Socket.java:95)

192.168.10.112 - where my rmi script is being executed as well as the Host Access Services that connects to localhost:4160

192.168.10.113 - where my tomcat is being executed as well as the Host Access Services that connects to 192.168.10.112.

192.168.10.176:1433 - where my database reside and it is being access by 192.168.10.113 when its connection is being accepted in 192.168.10.112.

I can't give any further details about this because I am not much familiar yet with this setup.

Hope that you can help me.

Anthony
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

This forum is for lower-level socket stuff. RMI and Jini questions go in our "Distributed Computing" forum. I will move this topic there for you.


[Jess in Action][AskingGoodQuestions]
Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
Anthony - I don't know much about RMI or JINI.

Your post leads me to beleive something more basic is not quite right.

Where you expect to make a connection, can you 'telnet' to the other location? That is a tried and true method of validating basic connectivity.

If you are on any machine and you want to connect to 1.1.1.2 at port 12345, from a command line issue:



You should *not* get 'connection refused' (or a timeout) if some process is accepting connections there and you have good connectivity ..........

Guy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection refused