MSSQLSERVER_17182

适用于:SQL Server

详细信息

Attribute
产品名称 SQL Server
事件 ID 17182
事件源 MSSQLSERVER
组件 SQLEngine
符号名称 INIT_TDSSNICLIENT
消息正文 TDSSNIClient 初始化失败,出现错误 0x%lx,状态代码 0x%lx。 原因: %S_MSG %.*ls

说明

SQL Server启动时,其中一个步骤是初始化表格数据流 (TDS) 侦听器和网络库以接受传入连接。 如果此初始化失败,则引发错误 17182。 初始化活动包括启动 SNI 层/TDS 侦听器、配置或初始化端口、协议、 SSPI 身份验证上下文、加密 (TLS/SSL) 等。

通常,此错误与其他错误一起引发 MSSQLSERVER_17826MSSQLSERVER_17120

17182 错误消息包含三个占位符,这些占位符根据所发生的问题动态填充。 “失败并出现错误 0x%lx”的十六进制值是发生的基础 OS 错误。 这是错误最重要的部分。 “原因:”后面的文本是与此 OS 错误关联的文本消息。 为了说明,下面是此错误的示例:

   Error: 17182, Severity: 16, State: 1.
   TDSSNIClient initialization failed with error 0x139f, status code 0x80. Reason: Unable to initialize SSL support. The group or resource is not in the correct state to perform the requested operation.

在这种情况下,OS 错误 = 0x139f,十进制数为 5023。 如果转到命令提示符并键入 net helpmsg 5023 以查找此 OS 错误,则会收到:“组或资源未处于执行所请求操作的正确状态。此文本是在示例中的“Reason:”后面看到的内容。

第三个占位符是状态代码。 它是一个内部值,指示初始化失败的组件。 如果需要,这可能有助于 Microsoft 更详细地排查问题。 下面是一些已观察到的常见状态代码:

状态代码 含义
0x01 SNI 客户端
0x04 没有侦听器 (空)
0x0a TCP/IP 提供程序
0x40 共享内存提供程序
0x50 命名管道提供程序
0x80 SSL 提供程序

原因

可能导致此错误的原因可能有多种,但它们都与在网络接口 (SNI) 层SQL Server初始化网络库或加密有关。 下面是一些示例:

  • 网络协议配置错误
    • 未选择任何协议
    • 指定的 TCP 端口无效
  • 网络加密的 TLS/SSL 配置错误
    • 证书无效,
    • 无效的 TLS 版本
    • 注册表项配置无效或缺失
  • 协议或 TLS/SSL 的操作系统问题

用户操作

  1. 解决配置错误的协议已报告的一个常见问题包括SQL Server协议配置错误。 有关详细信息,请参阅禁用所有协议时SQL Server无法启动。 你可能会在错误日志中观察到以下错误序列:

    Error: 17182, Severity: 16, State: 1.
    TDSSNIClient initialization failed with error 0xd, status code 0x4. Reason: **All protocols are disabled. The data is invalid**.
    Error: 17182, Severity: 16, State: 1.
    TDSSNIClient initialization failed with error 0xd, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors. The data is    invalid.
    Error: 17826, Severity: 18, State: 3.
    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.
    Error: 17120, Severity: 16, State: 1.
    SQL Server could not spawn FRunCommunicationsManager thread. Check the SQL Server error log and the operating system error log for information about possible related    problems.
    
  2. 解决 TLS 配置和更新问题报告的另一个常见问题包括服务器上的 TLS 配置,阻止SQL Server创建后台通信任务。

    Error: 26011, Severity: 16, State: 1.
    The server was unable to initialize encryption because of a problem with a security library. The security library may be missing. Verify that security.dll exists on  the    system.
    Error: 17182, Severity: 16, State: 1.
    TDSSNIClient initialization failed with error 0x139f, status code 0x80. Reason: Unable to initialize SSL support. The group or resource is not in the correct state  to    perform the requested operation.
    Error: 17182, Severity: 16, State: 1.
    TDSSNIClient initialization failed with error 0x139f, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors. The group  or    resource is not in the correct state to perform the requested operation.
    Error: 17826, Severity: 18, State: 3.
    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.
    Error: 17120, Severity: 16, State: 1.
    SQL Server could not spawn FRunCommunicationsManager thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.
    

    确保为SQL Server正确配置 TLS。 有关所需更新的信息,请参阅 Microsoft SQL Server的 TLS 1.2 支持

  3. 解决加密证书问题另一个常见问题是 TLS/SSL 证书配置错误,导致SQL Server无法启动线程。

    Error: 26014, Severity: 16, State: 1.
    Unable to load user-specified certificate [Cert Hash(sha1) "%hs"]. The server will not accept a connection. You should verify that the certificate is correctly installed.    See "Configuring Certificate for Use by SSL" in Books Online.
    
    Error: 17182, Severity: 16, State: 1.
    TDSSNIClient initialization failed with error 0x80092004, status code 0x80. Reason: Unable to initialize SSL support. Cannot find object or property.
    
    Error: 17826, Severity: 18, State: 3.
    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.
    
    Error: 17120, Severity: 16, State: 1.
    SQL Server could not spawn FRunCommunicationsManager thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.
    

    有关详细信息,请参阅将实例配置为使用安全套接字层证书后SQL Server服务无法启动

  4. 使用 SQL Server 配置管理器 验证是否已正确配置网络协议。 有关详细信息,请参阅 启用或禁用服务器网络协议

  5. 使用 SQL Server 配置管理器 2019 或更高版本来管理证书并对其进行验证。 有关详细信息,请参阅证书管理 (SQL Server 配置管理器)