Intermittent connection error after March 2020 security updates - sql

I am facing below error while connecting to the SQL Server on another server from a .NET application.
An exception has been raised that is likely due to a transient failure. If you are connecting to a SQL Azure database consider using SqlAzureExecutionStrategy. The underlying provider failed on Open. A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
SQL Server is running on Windows Server 2016 and the application is on Windows Server 2012.
Everything was fine before those security updates but after updates were installed and servers were restarted, I started getting those errors.
Any suggestions on how to resolve this?

You might want look to look at the following article at Microsoft: Applications experience "forcibly closed" TLS connection errors when connecting SQL Servers in Windows
I am running into the same issue and I applied the work around, I am still waiting for the results to confirm the solution. It started happening recently in our production environment, as this happens very randomly while connecting to hundreds of servers it is difficult to spot the issue. First we were reviewing network side for lost packets as we work between different data centers. As nothing strange came back from this investigation I stumbled upon the above article.
Update
I applied the workaround, the Group Policy on the local computer, basically followed the instructions of this Group Policy, enabled the policy, copied all cipher suits, removed the TLS_DHE* and applied it. After that restarted the server. The issue has been resolved.

Related

SQL Server 2016 is throwing intermittent login failures

I have a web application using a SQL Server account, and recently started getting intermittent:
Login failed for user 'xxxx'. Reason: Password did not match that for the login provided. [CLIENT: <local machine>].
The login works >99% of the time.
Server is in mixed mode, uses a SQL Server account, and the box is not a member of a domain, and is not part of any farm.
The password has not been changed for the account since initial
deployment which occurred months ago and the box has been bounced
several times since.
IIS and SQL Server are on the same box.
TCP is the selected communications method.
SQL Server 2016
Windows Server 2012
I have had a problem in the past with a desktop application and connection pooling where if a connection in the pool became invalid for some reason, the app failed when it went to use it. But we got a different errors in that situation.
Before you suggest that a pooling issue is at play, consider the following:
If there were a problem with pooling, why would the connection be attempted at all? Once a connection is in the pool, the connection attempt doesn't show up in the SQL Log, it just gets reused. If the connection was bad, and the application tried to use it, then the application would receive an exception reflecting that problem--the connection doesn't try to log in to the server again.
If this is an effort to spin up a new connection via the pool, why would it succeed the first time, then fail on a subsequent time, and then succeed again? It can't be user error since the connection string is in the web.config.
Here is a picture of the SQL Log entries for the login problem.
Succeeded at 8:47
Failed at 8:58
Succeeded at 9:10
I would love to say that I actually solved the root problem, however the answer to this was to switch to a local NT user account.
After turning off pooling to eliminate it from the equation, I was still getting intermittent login failures using a SQL account, despite it being in the web.config. The app pool was set to never recycle, so I was at a standstill with regard to solving the situation.
Out of desperation I changed the login to use a trusted connection, and everything worked flawlessly. (I haven't turned pooling back on yet.)

SQL Server 2005 - The Local Security Authority cannot be contacted

I'm suddenly having a problem connecting to my local instance of SQL Server 2005 Database engine. I had no problem connecting to this instance a few days ago. I can however connect to Integration Services and Analysis Services. Only the Database engine is giving me this error:
A connection was successfully established with the server,
but then an error occurred during the pre-login handshake.
(provider: SSL Provider, error: 0 -
The Local Security Authority cannot be contacted) (Microsoft SQL Server)
Only thing I did was I installed Visual Studio 2017.
This is a generic error that has many reasons. Usually is things like expired password. To troubleshoot, you should enable Netlogon service logging, follow Enabling debug logging for the Netlogon service:
c:\>Nltest /DBFlag:2080FFFF
Then reproduce your problem then look into the logging file, which is going to be located at %windir%\debug\netlogon.log. Read the file, try to understand what is happening.
Don't forget to turn off the debug logging afterwards:
c:\>Nltest /DBFlag:0

SQL Server connection failure (name pipes error 40)

I am having an issue at work that is driving me mad. I am new to SQL, and am finding my legs as a system administrator (trial by fire). We have a production server that runs a SQL database and I am trying to mimic the production server in a stand-alone (test) environment. My stand-alone server is of the exact hardware and I have ghosted the production server drives on to the test server (stand-alone) as well. Everything is identical. The only difference is my test server is not in a domain. Its only in a workgroup. My setup consists of one client machine (Windows 7) and the test server running Server 2008r2(SP2)+ SQL Server 2008r2.
We have applications that connect to the database and when I run the applications (connect to the database?), I get the following error.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 5)
I have been researching this error for about 3 months now. I am at my wits end. I have tried all the solutions I could find. Most of the solutions I found here at this site. Enable remote connections-DONE, Firewall execptions-not necessary as I can disable the firewall since I'm on a standalone network, but I have been down that road before and it did not help. I don't think this is a network issue as I am using just a switch with the server and one client connected. I can ping back and forth between the systems.
I've tried so many other solutions that I cant even remember them all. Changed so many settings I've lost count. Thank goodness I can re-image the server back to normal if I feel I've gone to far and changed too many settings to where I can't remember what I've done.
As you can tell, I probably only make things worse the more I try to fix the error, but I have no choice. Everyone is looking at me to fix this and get the test server working, but I need some help. A huge thank you in advance to anyone that can help me solve this. It would be greatly appreciated!

The server was not found or was not accessible - Server was lost for 6 hours

First off, I only have a very basic understanding of SQL. I can create tables etc. but configuration is beyond me. I am running my web site with MVC3 ASP.Net on a windows 2008 server using SQL Express.
Everything works fine, my connection strings are correct, I can use the website and it reads and writes to the dB, I can also view the dB with management studio on the server.
Today I got the following error:
A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that
SQL Server is configured to allow remote connections. (provider: SQL
Network Interfaces, error: 26 - Error Locating Server/Instance
Specified)
When I tried to log on to the database in management studio on the server I get a similar error. the only fix I have found is for a server restart. The database was down for 6 hours before I noticed which is not good for a start up website.
Has any one seen this issue before? Is this an express issue? Any help or advice would be great.
Troubleshoot as you would any network error. Start with the server's event logs.
As for notification of downtime, there are a lot of web services that will monitor your web site and email or send you an SMS message if it's not responding. Two that I've used are uptimerobot.com and basicstate.com. There are dozens of others.
You could also rewrite your ASP.Net app to email or text you when certain kinds of errors happen.

A transport-level error has occurred when sending the request to the server

We have an in-house developed VB.Net Windows Forms application that is losing users' individual connections to the SQL Server 2008 R2 database.
The bolded message below is what appears.
A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
I have looked at many numerous articles both from Microsoft and others, but have been unable to pinpoint the issue.
Sometimes it occurs when the user has been away from the open application for a long-time; others maybe less than 20 minutes.
Any assistance would be appreciated.
This happens when the network connection is suddenly lost. It happens to me when I open my SQL Server and walk away for a long time and come back it happens.
There are a few things to consider, first check the Firewall of the server and create inbound and outbound rules for SQL server. Then if there are any antivirus in the system take a look into its behavior.