尝试使用登录前握手时出现超时错误 [英] Timeout error while attempting to consume the pre-login handshake
问题描述
我们遇到了一些孤立的问题,我们的.NET应用程序无法连接到远程SQL服务器数据库,并出现以下错误:
We're are experiencing isolated issues where our .NET application is failing to connect to a remote SQL server database with the following error:
System.Data.SqlClient。 SqlException(0x80131904):连接超时已过期。 尝试使用登录前握手确认时超时时间已过。 这可能是因为登录前握手失败或服务器是
无法及时回复。 尝试连接到此服务器所花费的时间是 - [Pre-Login] initialization = 14672;握手= 13498;  ---> System.ComponentModel.Win32Exception(0x80004005):等待操作超时
System.Data.SqlClient.SqlException (0x80131904): Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=14672; handshake=13498; ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
SQL Server是SQL Server 2008 R2,并配置为命名管道和TCP / IP。 在某些客户端计算机上,我们可以毫无问题地进行连接。 在其他情况下,如果我们禁用命名管道,我们只能连接。
The SQL server is SQL Server 2008 R2, and is configured for Named Pipes and TCP/IP. On some client machines we are able to connect without issues. On others, we're only able to connect if we disable Named Pipes.
我不清楚客户端环境设置,软件等会导致此错误发生。  任何帮助理解这种情况将不胜感激。
I am not clear on what client environment settings, software, etc... would cause this error to occur. Any help in understanding this situation would be greatly appreciated.
推荐答案
您好alrusso,
Hi alrusso,
基于在我的研究中,错误通常发生在以下可能性中:
Based on my research, the error commonly occurs in the following possibilities:
1。 SQL Server数据库引擎的一个实例未运行。
2. SQL Server Browser服务未运行。
3.禁用TCP / IP。 />
4.服务器名称输入错误。
5.存在网络问题。
6.数据库引擎实例的TCP / IP端口被防火墙阻止。
7.客户端和服务器未配置为使用相同的网络协议。
1. An instance of the SQL Server Database Engine is not running.
2. The SQL Server Browser service is not running.
3. The TCP/IP is disabled.
4. The server name was typed incorrectly.
5. There are network problems.
6. The TCP/IP port for the Database Engine instance is blocked by a firewall.
7. The client and server are not configured to use the same network protocol.
那么对于解决方案,请参考以下文章:
Then for the solutions, please refer to following articles:
https://blog.devoworx.net/2017/01/30/connection-timeout-expired-pre-login-handshake/
谢谢,b
Xi Jin。
Thanks,
Xi Jin.
这篇关于尝试使用登录前握手时出现超时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!