Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to resolve error 17836, Severity: 20, State: 14?

Length specified in network packet payload did not match number of bytes read; the connection has been closed. Please contact the vendor of the client library. Error: 17836, Severity: 20, State: 14. I am getting this error 5 times at the same time almost and want to know the reason for its occurrence.

like image 631
Jason Clark Avatar asked Oct 27 '25 09:10

Jason Clark


2 Answers

See the solution here:

Since the SQL Server has Event ID 17836 logged, the SQL port is open. It is more like authentication issue. Based on this articles (Configuration for querying SQL database remotely – http://www.howtonetworking.com/others/testsqlconnect2.htm ), we may have 3 fixes:

  • creating SQL login ID (recommended)
  • join the computer to the domain
  • allow anonymous connections to SQL Server 2000 or to SQL Server 2005 (don’t recommend)

And this MSDN forum

Perform a nslookup of the CLIENT IP Address that is listed in the error message and find out what computer it is that is connecting. Then you need to check that machine and determine what specifically is connecting to the SQL Server. You might get more infromation from doing a SQL Trace for the Errors and Warnings Event Class and have the ClientProcessID column in the trace data. When the error spikes, you might get the PID for the process that is connecting from that 10.26.32.96 machine, and then you can find that process in Task Manager on that machine by adding the PID to the data displayed (View -> Select Columns).

like image 143
Rahul Tripathi Avatar answered Oct 30 '25 13:10

Rahul Tripathi


2024 update:

This issue occurs due to Trust Server Certificate which should be enabled to connect SQL Server.

I was using mssql image to run on docker and tried to connect using DBeaver to the mssql container. But, it was showing this error. So, after seeing microsoft docs, I tried to connect using Azure data studio and it connected with the same settings I used in DBeaver. But, there was a catch, it asked for enabling trust certificate which was news to me.

So, I saw an option for trust server certificate while connecting through DBeaver and it worked.

Just another bonus point(for DBeaver only): Once you get connected to the sql server, it will only show the db that you mentioned while connecting to the server. To see all the DBs, you can right click on connection --> Connection view --> Advanced

This will show all the DBs in the server.

like image 34
Mahesh Pradhan Avatar answered Oct 30 '25 12:10

Mahesh Pradhan