• Register
0 votes
52 views

Problem :

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

Please log in or register to answer this question.

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 79 views
79 views
Problem : Getting bellow error java.net.connectexception connection timed out no further information
asked Oct 31, 2019 peterlaw 6.9k points
0 votes
1 answer 7 views
7 views
Solve this.
asked Dec 26, 2020 TeamScript 10.5k points
0 votes
2 answers 354 views
354 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
0 votes
1 answer 7 views
7 views
Can anyone solve this problem? I,m working on this.
asked Dec 15, 2020 TeamScript 10.5k points
0 votes
1 answer 3 views
3 views
What is the reason and how can i solve this?
asked Dec 18, 2020 TeamScript 10.5k points
0 votes
1 answer 4 views
0 votes
2 answers 17 views
17 views
Help me by solving this question.
asked Jan 4 TeamScript 10.5k points
1 vote
2 answers 123 views
123 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, 2020 LizzyM 6.1k points
2 votes
1 answer 30 views
30 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, 2020 LizzyM 6.1k points
0 votes
1 answer 73 views
73 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, 2020 LizzyM 6.1k points