1

My application is on PB 2017 R2 and its running on windows server 2012 R2 OS. Application is connecting with local DB which is in SQL anywhere and remote database which is in SQL server.

This application is basically fetching the files from a location, storing the data in local dbase (SQL anywhere ) and making the PDFs. While creating the PDFs its doing a entry of report category in few tables of SQL server database.

Exe is scheduled to execute in every 1 and half hour.

Recently we have upgraded our dbase from SQL server 2008 to SQL server 2016. After this we have started receiving the below error frequently. Every alternate day mostly.

Error connecting to Web Reports database SQLSTATE = 08001 Microsoft SQL Server Native Client 11.0 TCP Provider: An existing connection was forcibly closed by the remote host.

We have upgraded SQL native client as well , it has version 2011.110.7001.00.

There is no SQL log created for this error at database side. We also checked the database server timeout settings , this is also set as 0 (no timeout limit).

We have checked event logs as well but didn't found anything suspicious. Windows firewall is off.

As a work around we are restarting the exe and it starts working but we are looking for permanent solution of this.

We are struggling to find the cause and solution of this issue since couple of weeks. Any help on this issue would be highly appreciated.

Thanks, Deepshikha

jarlh
  • 42,561
  • 8
  • 45
  • 63
Deepshikha
  • 11
  • 1
  • 2
  • The TCP error is due to network connectivity issues. These can be difficult to troubleshoot when the error is intermittent but you can verify network connectivity at a given time with PowerShell command `Test-NetConnection -ComputerName "YourSqlServer" -Port 1433` – Dan Guzman May 20 '21 at 13:00
  • Thanks Dan. will check – Deepshikha May 20 '21 at 14:00
  • I tried this but it shows TCPTestSucceeded as true. – Deepshikha May 21 '21 at 09:27
  • Were you also getting the "existing connection was forcibly closed" errors when you ran the command? – Dan Guzman May 21 '21 at 09:50
  • No. I didn't get any error when I ran this command. – Deepshikha May 21 '21 at 10:06
  • I would expect `Test-NetConnection` to show `TcpTestSucceeded : false` only when you are seeing SQL connectivity errors in the app. The purpose to verify network connectivity is unhealthy independently of the application in order to determine where to focus troubleshooting efforts. – Dan Guzman May 21 '21 at 10:29
  • We upgraded all of our servers to the same version of Windows when we moved our datacenter. The problem went away. I suspect that there is a conflict in TLS handling. Check out this article: https://stackoverflow.com/questions/2582036/an-existing-connection-was-forcibly-closed-by-the-remote-host – Eric Glenn Feb 16 '22 at 18:36

0 Answers0