cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

TCP Provider: no connection could be made because the target machine actively refused it

Former Member
0 Likes
1,931

Hello,

I encountered thi error message in FC Web application (screen shot)

and when i tried to restart the datasource, the message error appeared:

Any idea please?

Thank you

Regards

Accepted Solutions (1)

Accepted Solutions (1)

Marc_Kuipers
Product and Topic Expert
Product and Topic Expert

Hi Marouane,

Looks like your DB server is not accepting connections (from the app server)

https://blogs.msdn.microsoft.com/sql_protocols/2007/07/19/tcp-provider-no-connection-could-be-made-b...

Possibly, it could also be the app server not accepting the incoming request from the web-server, but this normally does not use TCP, so my best guess is an issue with your SQL (DB) server

Marc

Answers (1)

Answers (1)

0 Likes

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.