• Register
0 votes
45 views

Problem :

I am getting bellow error 
java.net.connectexception: connection refused: no further information:
6 5 3
6,930 points

1 Answer

0 votes

Solution :

1) Firstly try to ping the destination host, if the host is pingable it means client and server machine are in the same network.
2)Try to connect to the server host and port using telnet. If you are able to connect it means something is wrong with your client code. Also, by observing telnet output you will come to know whether the server is running or not or server is disconnecting the connection.

3)For a quick fix catch ConnectException in your main try-catch block like bellow:
try {
    // connect, write, and read ...
} catch (ConnectException ce) {  
    System.out.println("You caught a ConnectException.");
} catch (IOException e1) {       
    // TODO Auto-generated catch block
    e1.printStackTrace();
} finally {

9 7 4
38,600 points

Related questions

0 votes
2 answers 70 views
70 views
Problem : Getting bellow error java.net.connectexception connection timed out no further information
asked Oct 31, 2019 peterlaw 6.9k points
0 votes
2 answers 252 views
252 views
Problem : Today I was testing Server and Client code on different machine. Both were on same Wi-fi network. I created clients and got this exception for many threads : java.net.ConnectException: Connection timed out: no further information
asked Oct 23, 2019 peterlaw 6.9k points
1 vote
2 answers 77 views
77 views
Problem: I am able to login through webservices api to particular account on 'Oracle on demand'. When i tries to call 'accountQueryPage' method of the stub class (Stub class is generated with help Account.wsdl file), i got the following exception java.net.SocketException: Software caused connection abort: recv failed Can anyone give me some pointers.
asked Mar 27 LizzyM 6.1k points
2 votes
1 answer 24 views
24 views
Problem: I am able to login through webservices api to particular account on 'Oracle on demand'. When i tries to call 'accountQueryPage' method of the stub class (Stub class is generated with help Account.wsdl file), i got the following exception java.net.SocketException: Software caused connection abort: recv failed Can anyone give me some pointers.
asked Mar 24 LizzyM 6.1k points
0 votes
1 answer 42 views
42 views
Problem: I am seeing "{writer,send_failed,{error,closed}}" error on server side and "java.net.SocketException: Connection reset by peer: socket write error" error on java client side intermittently. What could possibly go wrong here? Both server and ... rabbitmq.client.impl.ChannelN.basicPublish(ChannelN.java:630) at com.rabbitmq.client.impl.ChannelN.basicPublish(ChannelN.java:621) Please help me.
asked Mar 23 LizzyM 6.1k points