Question

No connection could be made because the target machine actively refused it

Help is required for the above error at my local environment.

Like 0

Like

2 comments

Dear Muhammad,

We are always trying our best to provide our customer the best service, but unfortunately, we cannot provide competent support regarding products developed by other companies. We will transfer this information to your manager and ask him to contact you and help you deploy the system.

Best regards,

Angela

This exception message says you're trying to connect to the same host ( 127.0.0.1 ), while you're stating that your server is running on a different host. This 127.0.0.1 represents a 'loopback' . It allows the computer to communicate with itself via network protocol .

 

This error is a network-related error occurred while establishing a connection to the Server. It means that the error is occurring because there is no server listening at the hostname and port you assigned. It literally means that the machine exists but that it has no services listening on the specified port . So, no connection can be established. Generally, it happens that something is preventing a connection to the port or hostname. Either there is a firewall blocking the connection or the process that is hosting the service is not listening on that specific port. This may be because it is not running at all or because it is listening on a different port. So, no connection can be established.

 

Try running netstat -anb from the command line to see if there's anything listening on the port you were entered. If you get nothing, try changing your port number and see if that works for you.  In Windows operating systems, you can use the netstat services via the command line (cmd.exe) . On Linux you may need to do netstat -anp instead.

 

The target machine actively refused it occasionally , it is likely because the server has a full 'backlog' . Regardless of whether you can increase the server backlog , you do need retry logic in your client code, sometimes it cope with this issue; as even with a long backlog the server might be receiving lots of other requests on that port at that time.

 

Show all comments