Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

SQL Server service will not start: errors 17182, 17826 and 17120 after a certificate or protocol change

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

The SQL Server service is told to start, runs for a moment and stops. The error log, if you can read it, shows a line that begins "TDSSNIClient initialization failed with error" and gives an error code and a status code, followed by errors 17826 and 17120. It can start after someone installs a certificate for encryption, changes the enabled network protocols, or tightens TLS settings on the server.

Below is how to read those messages, how to prove which of the causes Microsoft lists applies, and the one change Microsoft documents for a certificate that breaks startup.

What the error means

Microsoft's page for error 17182 describes what the service is doing when it fails: "When SQL Server starts, one of the steps it takes is to initialize a Tabular Data Stream (TDS) listener and network libraries to accept incoming connections. If this initialization fails, error 17182 is raised." That covers starting the network layer, configuring ports and protocols, the SSPI authentication context and encryption (TLS/SSL).

The message text is "TDSSNIClient initialization failed with error 0x%lx, status code 0x%lx. Reason: %S_MSG %.*ls". Microsoft says the page's three placeholders are filled when the error occurs. The first, "failed with error 0x%lx", is "the underlying OS error that occurred. This is the most important part of the error." The text after "Reason:" is the message for that OS error. The third is a status code, an internal value that "indicates what component in the initialization failed".

In the cases Microsoft lists, this error is raised together with 17826 and 17120. Those two read, in Microsoft's examples: "Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log." and "SQL Server could not spawn FRunCommunicationsManager thread." So 17826 and 17120 are symptoms. The useful lines are the ones above them.

Likely causes

Microsoft says "all relate to initializing network libraries or encryption at SQL Server Network Interface (SNI) layer". Its list:

Cause Example from Microsoft's page
Misconfigured network protocols No protocol is selected, or invalid TCP ports are specified; the log shows "Reason: All protocols are disabled. The data is invalid"
Misconfigured TLS/SSL for network encryption Invalid certificate, invalid TLS version, invalid or missing registry key configuration
Operating system issue with protocols or TLS/SSL Error 26011: "The server was unable to initialize encryption because of a problem with a security library."
Server certificate that cannot be loaded Error 26014: "Unable to load user-specified certificate", with 0x80092004

The status code narrows it down. Microsoft's table: 0x01 SNI Client, 0x04 no listener (empty), 0x0a TCP/IP provider, 0x40 Shared Memory provider, 0x50 Named Pipe provider, 0x80 SSL provider.

Prove the cause before changing anything

All of this only reads.

  1. Open the SQL Server error log and find the first error that appears for this start, above the 17182 line. Write down the OS error and the status code.
  2. Convert the OS error. Microsoft's example: error 0x139f is 5023 in decimal, and at a Command Prompt net helpmsg 5023 returns "The group or resource isn't in the correct state to perform the requested operation." That text is what follows "Reason:" in that example.
  3. Read the status code against the table. 0x80 points at the SSL provider, so certificates or TLS; 0x04 with "All protocols are disabled" points at protocols.
  4. Look for 26014 above 17182. Microsoft shows it with 0x80092004, "Unable to initialize SSL support. Cannot find object or property." Microsoft's certificate page says error state 0x80 "indicates there's a problem in the SSL certificate" and that 0x80092004 "translates to CRYPT_E_NOT_FOUND".
  5. If a certificate is configured, find out which cryptographic provider it uses. Microsoft's page says to run, at a command prompt:
certutil -v -store my

Microsoft's page gives this command for determining the provider of a certificate.

  1. In SQL Server Configuration Manager, open the instance's Protocols and check which protocols are enabled. On the Certificate tab, see which certificate, if any, is selected.

Example (illustrative): at contoso.com.au SQL02 stops starting after an engineer picks a certificate on the Certificate tab. The log shows 26014 "Unable to load user-specified certificate", then 0x80092004 with status 0x80, then 17826 and 17120. certutil -v -store my shows the certificate was issued with the Enhanced Cryptographic Provider 1.0. That matches the cause Microsoft documents.

Fix

Choose by what the log showed. Microsoft's page gives three log patterns, and each has its own first line:

  • Protocols: 17182 with error 0xd, status code 0x4, Reason "All protocols are disabled. The data is invalid", then a second 17182 with status code 0x1, then 17826 and 17120.
  • TLS configuration or updates: error 26011 (the security library message above), then 17182 with error 0x139f, status code 0x80, then 17826 and 17120.
  • Certificate: error 26014, "Unable to load user-specified certificate", then 17182 with error 0x80092004, status code 0x80, then 17826 and 17120.

The pattern tells you which section below applies. Work on the first line of the pattern only; the later lines are consequences, and the same three lines (17182, 17826, 17120) end all three patterns.

Protocols

Microsoft's guidance for a protocol problem is to use SQL Server Configuration Manager to validate that network protocols are correctly configured, and it links a page for enabling and disabling a server network protocol. Its example log for an all-protocols-disabled instance shows status 0x04 and the text "All protocols are disabled." Microsoft's 17182 page gives the sequence of log errors and the two links, "SQL Server can't start if all the protocols are disabled" and "Enable or Disable a Server Network Protocol", but no click-by-click steps of its own, so none are given here.

A certificate that breaks startup

Microsoft's certificate page names one cause for the 26014 and 0x80092004 combination: "you can't use a certificate that has the Enhanced Cryptographic Provider version 1.0 as the server certificate." Its resolution is any one of: leave the Certificate box blank in SQL Server Configuration Manager so SQL Server generates a self-signed certificate, or use a certificate that uses the RSA Channel Cryptographic Provider.

Save first. Open the instance's Protocols for properties in SQL Server Configuration Manager, go to the Certificate tab, and write down which certificate is selected (name and thumbprint). Then save the certificate store listing to a file for reference with this command. It writes a text file in the current folder, so use a file name that does not exist yet:

certutil -v -store my > certstore-before.txt

Risk: The next step clears the server certificate for one instance, so SQL Server will generate its own self-signed certificate at the next start. Clients that were set to trust the old certificate, or that are set to require encryption with a trusted certificate, may fail to connect until a proper certificate is selected again. The change takes effect when the service starts.

  1. In SQL Server Configuration Manager, expand SQL Server Network Configuration, right-click Protocols for the instance, and select Properties.
  2. On the Certificate tab, leave the Certificate box blank, as Microsoft's page puts it. Select Apply, then OK.
  3. Start the SQL Server service.

To undo it: return to the Certificate tab, select the certificate you wrote down from the Certificate dropdown list, select Apply, then OK, and restart the service. Do this only when that certificate has been replaced by one that is not provider 1.0.

Microsoft's certificate-management page says that from SQL Server 2019 the Configuration Manager can "view and validate certificates installed in a SQL Server instance" and identify certificates close to expiring, and gives the steps to import and select a certificate there.

TLS and operating system updates

For the 26011 case Microsoft says to ensure TLS is configured correctly and to see its page "TLS 1.2 support for Microsoft SQL Server" for updates needed. Microsoft's 17182 page gives no registry value or update number itself, so none is given here.

Confirm the fix

  • Start the SQL Server service and check it reaches the Running state.
  • Open the new error log: the 17182, 17826 and 17120 lines should be gone for this start.
  • Connect from a client that uses encryption, and confirm it connects.

What to watch afterwards

  • Certificates close to expiry. Microsoft says Configuration Manager 2019 and later identifies them.
  • Changes to the Certificate tab on a production instance. Plan them like any restart.
  • The first error under 17182 on any future failure. It names the real fault.

Risks and limits

These steps have not been run in a lab. Microsoft's pages describe causes and example log sequences; they do not give a numeric version cut-off for the provider 1.0 limitation. Clearing the certificate gives you a running service with SQL Server's own certificate, not a trusted one. Microsoft's 17182 page lists misconfigured protocols and TLS as causes but gives the protocol and TLS fixes by link, so those are not reproduced here.

Sources