SQL SERVER – Could not connect to TCP error code 10061: No connection could be made because the target machine actively refused it

I was recently getting following error in my StreamInsight Application.

Could not connect to  TCP error code 10061: No connection could be made because the target machine actively refused it.

The solution was very simple, I had to enable exception of the my port in my windows firewall. The way I figured it out  was by quickly disabling the firewall (it was not a production server). Once I disabled it, the application just worked fine; this was a sign that the firewall was the cause of the issue, I right away enabled firewall and added my port as exception.

So many errors have cropped up recently due to the connectivity issue. I have started to make my routine to check firewall first before I move to next action item in my troubleshooting list.

When I sent this detail to my internal technical list of the expert, I got the suggestion that this error happens due to many other reasons as well and not only due to firewall.

I am interested to know when and how this error happens and what is the resolution. This way, if we have complete list, we can avoid this error in future.

Watch SQL in Sixty Seconds video to Resolve Connection Error:

Reference: Pinal Dave (http://blog.SQLAuthority.com)

About these ads

15 thoughts on “SQL SERVER – Could not connect to TCP error code 10061: No connection could be made because the target machine actively refused it

  1. Hello!

    This execption/error stumps most developers/IT staff who have just recently been exposed to Windows Server 2008 R2. I belive the R2 blocks incoming transactions by default, while the vanilla-2008 did not. Therefore, all of a sudden a system/database that worked fine on a Windows 2008 Server fails to accept connections from remote machines when upgraded to run on Windows 2008 R2 Server.


  2. I am facing the same database connetivity issue but i am connecting to local database where firewall not comes in the picture.

    please suggest.


  3. exec sp_SendSmtpMail ‘vasudevveeramalla.veeramalla@emirates.com’,’vasudevveeramalla.veeramalla@emirates.com’,”,”,’Test Subject’,’Test Message’,1

    When am executing the above procedure am getting like this error

    Description: The message could not be sent to the SMTP server. The transport error code was 0x800ccc15. The server response was not available

    Can you please any one help to resolve the issue


  4. I’ve disabled the firewall on my Windows Embedded 2009 POSReady and I’m still not able to connect to the DB. What are some other avenues to pursue. It’s all local to one machine, not networked.


  5. Pingback: SQL SERVER – Resolving SQL Server Connection Errors – SQL in Sixty Seconds #030 – Video « SQL Server Journey with SQL Authority

  6. I had the same error which was coming and dont need to worry about this error, just restart the server and restart the SQL services. This issue comes when there is low disk space issue and system will go into hung state and then the sql services will stop automatically.


  7. Though the firewall was disabled for the specific port I had the same problem.
    SQL Server Browser was turned off, switching on the browser solved the issue.
    Before I’ve not known anything about this browser…


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s