• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection refused

 
Anthony Guillen
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Guy Allard
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic