Fix it now
The connection reached the server and the server hung up before authentication started, so no password has been checked. Work through the four things that end a pre-login exchange: the instance not accepting SQL logins, the protocol being off, TLS failing to negotiate, and a Kerberos token too large for the server.
sqlcmd -S lpc:.\INSTANCE -E -Q "SELECT net_transport, encrypt_option, auth_scheme FROM sys.dm_exec_connections WHERE session_id = @@SPID"
sqlcmd -S tcp:.,1433 -E -Q "SELECT @@SERVERNAME"
- If shared memory works and TCP does not, the protocol is disabled. Open SQL Server Configuration Manager, then SQL Server Network Configuration, then Protocols for your instance, and enable the one the client uses.
- If only SQL logins fail, the instance is in Windows-only mode. In Object Explorer right-click the server, choose Properties, open the Security page and set the authentication mode. Microsoft documents that this needs a restart of the SQL Server service, and of SQL Server Agent if it is running.
- If the failure started after a TLS change or a driver upgrade, read the error log for 17828 and move to the encryption causes below.
- Read the server’s own account of it:
EXEC sys.sp_readerrorlog 0, 1, N'17828';then repeat for 17832 and 17836.
The 233 you are looking at is a Windows error number, not a SQL Server message number. Searching for “SQL Server error 233” turns up an unrelated engine message about a column that cannot be null.
If the connection completes now you are done. If not, the next section explains what the two machines are saying to each other before a user name is ever sent.
Why it happens
A client and a SQL Server instance do not begin with credentials. They begin with a pre-login exchange: the client announces its TDS version and what encryption it can do, the server answers with what it requires, they set up TLS if the answer says so, and only after that does the client send a login packet carrying a user name. Error 233 means the conversation died before that point, and the server closed the socket without explaining, because at that moment there is nobody authenticated to explain anything to.
233 is Windows system error 233, ERROR_PIPE_NOT_CONNECTED, whose text is “No process is on the other end of the pipe.” Microsoft’s connectivity troubleshooter lists it among the variants a client library reports when a connection fails. It is a transport-level statement, which is why it says nothing at all about your password. It is worth knowing that SQL Server also has a message numbered 233 in sys.messages, and that message is about a column that cannot be null. The two have nothing to do with each other.
The server’s half of the story is in its own error log, and it is much more specific. 17828 says the prelogin packet was structurally invalid. 17832 says the login packet was. 17836 says the declared payload length did not match the bytes actually read. All three end with the same sentence in Microsoft’s text: please contact the vendor of the client library. All three close the connection.
The instance does not accept SQL Server authentication
You have this one if Every SQL login fails while Windows logins connect normally, often on a newly built or freshly restored server.
- Connect with a Windows account that holds sysadmin.
- Right-click the server in Object Explorer, choose Properties, and on the Security page select SQL Server and Windows Authentication mode.
- Restart the SQL Server service, and SQL Server Agent if it is running. Microsoft’s procedure makes you acknowledge the restart before the change is accepted.
- Retry the SQL login.
Only do this if mixed mode is the intended design. If the server is meant to be Windows-only, the correct fix is to move the application onto a Windows identity, not to widen the server’s authentication.
The protocol the client is using is switched off
You have this one if One connection method fails while another to the same instance, with the same credentials, works.
- Open SQL Server Configuration Manager, then SQL Server Network Configuration, then Protocols for your instance.
- Enable the protocol the client actually uses: shared memory for a local connection, TCP/IP for a remote one.
- Restart the SQL Server service.
- Prove which one you ended up on:
SELECT net_transport FROM sys.dm_exec_connections WHERE session_id = @@SPID;
Client and server cannot agree on encryption
You have this one if The failure began after TLS 1.0 and 1.1 were disabled, after a Windows update, or after the application was moved to a newer data provider.
- Move the client to a driver that speaks current TLS. Microsoft names ODBC Driver 17 or 18, OLE DB Driver 18 or 19, .NET Framework 4.6.2 or later, and JDBC Driver 9.4 or later.
- Stop using SQL Server Native Client and SQLOLEDB. Microsoft’s own guidance is that they are not the answer here.
- Compare cipher suites on both machines with
Get-TlsCipherSuite. Matching TLS versions with no matching cipher suite fails identically. - Check the certificate the instance presents. A certificate signed with MD5, SHA224 or SHA512 will not work with TLS 1.2.
Re-enabling an obsolete TLS version makes the symptom go away by undoing a security improvement. Treat it as a stopgap with a date on it, not a fix.
The Kerberos ticket is bigger than the server will accept
You have this one if 17832 in the error log, state 9, for a Windows login belonging to a large number of groups. Other users on the same server connect normally.
- Read the state number on the 17832 entry. State 9 is the documented token-size case.
- On the server, set MaxTokenSize under
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parametersto a value that fits your largest token, up to 65535. - Restart the computer, then retry the login that failed.
Use the smallest value that fits. Microsoft warns that an unnecessarily large MaxTokenSize carries a performance cost of its own.
Something that is not a SQL client is talking to the port
You have this one if The error log fills with 17828 or 17836 entries and no user reports a problem.
- Correlate the entries with the client addresses recorded alongside them.
- Identify the source: a load balancer health probe that opens a socket and closes it, a vulnerability scanner, or a monitoring check that tests the port rather than the service.
- Reconfigure the probe to make a real connection, or document the noise deliberately.
These entries are only your outage if a genuine client is failing at the same moment. Do not spend a morning on them otherwise.
Full reference
Reading the server log rather than the client message
The client tells you a connection died. The server tells you why it killed it. These three entries are worth knowing by sight, because each one puts the fault in a different place.
| Entry | Published message | What it means for you |
|---|---|---|
| 17828 | The prelogin packet used to open the connection is structurally invalid; the connection has been closed. Please contact the vendor of the client library | Whatever spoke to the port did not open with a valid TDS pre-login. Old driver, or not a SQL client at all |
| 17832 | The login packet used to open the connection is structurally invalid; the connection has been closed | The pre-login succeeded and the login packet did not parse. State 9 is the documented Kerberos token-size case |
| 17836 | Length specified in network packet payload did not match number of bytes read; the connection has been closed | The declared length and the bytes read disagree. A truncating device in the path, or a client library sending malformed TDS |
All three are severity 20 and all three terminate the connection. None of them is a login failure, and none of them will appear alongside a state number for a password.
Isolating the layer in three commands
| Question | Command | How to read it |
|---|---|---|
| Is the engine reachable at all locally? | sqlcmd -S lpc:.\INSTANCE -E |
Works: the engine is up and shared memory is on. Fails: the instance itself is the problem |
| Is TCP working? | sqlcmd -S tcp:.,1433 -E |
Fails while shared memory works: TCP/IP is disabled or listening elsewhere |
| What did I actually get? | SELECT net_transport, encrypt_option, auth_scheme FROM sys.dm_exec_connections WHERE session_id = @@SPID; |
Three columns that settle protocol, encryption and authentication in one row |
| What did the server log? | EXEC sys.sp_readerrorlog 0, 1, N'17828'; |
The first parameter is the log number, 0 for current; the third is a filter string |
The encryption failures, in the order Microsoft lists them
Microsoft’s own article on connections closed during the handshake gives five documented reasons, and they are worth working through in order because the first two account for most of them.
- No matching TLS protocol. The client offers TLS 1.0, the server requires 1.2 or later, and there is nothing to agree on.
- Matching protocols but no matching cipher suite, usually after someone hardened one machine with a cipher policy and not the other.
- TLS_DHE cipher suites across mixed Windows versions. Windows Server 2012 and Windows Server 2016 handle the Diffie-Hellman key exchange differently; Microsoft’s remedy is to remove the TLS_DHE suites from local policy.
- A server certificate whose hash algorithm TLS 1.2 will not accept: MD5, SHA224 or SHA512. Self-signed certificates are not affected.
- The Diffie-Hellman leading-zero fix missing on one side, which a Windows update supplies.
There is a sixth cause that is not about encryption at all. On SQL Server 2017 and earlier, a busy instance can run short of I/O completion port listener workers, and the three-way handshake times out. Microsoft’s answer is SQL Server 2019 or later, which added a dedicated login dispatcher pool.
When the instance is simply too busy
- Check for worker thread pressure before blaming the network:
SELECT scheduler_id, current_tasks_count, runnable_tasks_count, work_queue_count FROM sys.dm_os_schedulers WHERE status = 'VISIBLE ONLINE'; - Look for a connection pool storm from an application that opens far more connections than it needs. A pool that resets under load produces bursts of 233 and nothing else.
- Resolve the pressure rather than raising limits. Raising the limit usually moves the failure rather than removing it.
- If the instance is on a capped edition, the ceiling is the cause and no configuration change will lift it.
What this is not
It is not a wrong password, because none was sent. It is not a permissions problem, because no principal has been established. It is not a firewall block, because a blocked connection never reaches pre-login and reports 10060 or 10061 instead. And it is not the SQL Server message numbered 233 in sys.messages, which concerns a column that cannot be null and will never appear in a connection error.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
233 |
Windows system error 233, ERROR_PIPE_NOT_CONNECTED: “No process is on the other end of the pipe.” Reported by the client provider when the server closes the connection during pre-login | Microsoft Learn |
17832 |
The login packet used to open the connection is structurally invalid; the connection has been closed. State 9 is the documented Kerberos MaxTokenSize case | Microsoft Learn |
17828 |
The prelogin packet used to open the connection is structurally invalid; the connection has been closed | Microsoft Learn |
17836 |
Length specified in network packet payload did not match number of bytes read; the connection has been closed | Microsoft Learn |
Confirm the fix worked
- Connect with the credentials and the client that failed, and confirm the connection completes.
- Run
SELECT net_transport, encrypt_option, auth_scheme FROM sys.dm_exec_connections WHERE session_id = @@SPID;and confirm all three are what you intended. - Re-read the error log with
EXEC sys.sp_readerrorlog 0, 1, N'178';and confirm no new 17828, 17832 or 17836 entries appear for your client’s address. - Restart the application and confirm its connection pool fills without a burst of failures.
- If you changed the authentication mode, confirm both the SQL Server service and SQL Server Agent came back up.
Questions people ask about this
Is my password wrong?
No. The failure happens before the login packet is sent, so no password has been offered and none has been checked. Wrong credentials produce error 18456 with a state number instead, and that is a different article.
Does this cost anything to fix?
No. Every fix here is a configuration change, a driver update or a registry value, and all of it behaves the same on every edition including Express. Nothing about this error is a licensing limit.
Why did a working application break after a Windows update?
Most often because older TLS versions or weaker cipher suites were disabled and the application’s data provider cannot negotiate what remains. Updating the driver is the documented fix. Re-enabling an obsolete protocol undoes the security improvement you just received.
Should I worry about the invalid packet entries in the error log?
Only if a real client is failing at the same time. On a server behind a load balancer or inside a scanned network, those entries usually come from probes speaking something other than TDS to an open port.
One user gets this and nobody else does. Why?
Check the error log for a 17832 at state 9. That is the documented Kerberos token-size case, and it singles out users who belong to an unusual number of groups. The fix is MaxTokenSize on the server, not anything on the user’s machine.
