MSSQLSERVER_17182

适用于:SQL Server

详细信息

属性
产品名称 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_17826和MSSQLSERVER_17120

17182 错误消息包含三个基于所发生问题的动态填充的占位符。 “失败并出现错误 0x%lx”十六进制值是发生的基础 OS 错误。 这是错误最重要的部分。 “Reason:”后面的文本是与此 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 错误,将看到:“组或资源未处于执行请求的操作的正确状态。此文本是在示例中“原因:”之后看到的。

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

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

原因

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

  • 配置错误的网络协议
    • 未选择任何协议
    • 指定的 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 配置和更新问题 :报告的另一个常见问题包括服务器上阻止 SQL Server 创建后台通信任务的 TLS 配置。

    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。 有关所需的更新的信息,请参阅 TLS 1.2 对 Microsoft SQL Server 的支持

  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 配置管理器)