Share via


System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

Question

Wednesday, March 13, 2013 7:36 AM

hi,

we are working on windows server 2008 r2 with SQL 2008. the server is stored on Amazon's cloud platform.

we are running some services in the morning to retrieve data from API channels like Facebook google etc.. for advertisement data to commit to our database.

today there were a few times when we got this error on few services in the retrieve process:

System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. > System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host     at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)     End of inner exception stack trace

now it's OK, but I couldn't find anything in the event viewer.. can you help me figure out what it's got to do with?

All replies (2)

Wednesday, March 13, 2013 1:53 PM ✅Answered

Hi

Its definitely not a sql error, must be related to network

Please refer : An existing connection was forcibly closed by the remote host.

http://forums.holdemmanager.com/manager-general/33018-connection-error-unable-read-data-transport-connection.html

http://briancaos.wordpress.com/2012/06/15/an-existing-connection-was-forcibly-closed-by-the-remote-host/

Thanks
Saurabh Sinha
http://saurabhsinhainblogs.blogspot.in/
Please click the Mark as answer button and vote as helpful if this reply solves your problem


Thursday, January 18, 2018 5:24 AM

up vote9down vote

I had spent 1 hour searching same and found no issues. But then realized that PG puts its logs in pg_log folder. I looked in it to see possible issue.

It turn out you just need to have correct "host" entry in "pg_hba.conf" file. For me this file is in C:\Program Files\PostgreSQL\9.1\data directory. For example

host all all 192.168.1.2/32 md5

Where 192.168.1.2 - is your client's ip address.

BTW, you still need to have 5432 port open as Inboud rule (windows Vista, Windows 7, Windows 2008+).