Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

生产环境Web端是centos系统,DB在window环境,sql server2014,运行报错如下 #406

Open
zxingdream opened this issue Feb 10, 2025 · 2 comments

Comments

@zxingdream
Copy link

14:39:54.973 7 Y TP System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
at System.Net.Security.SslStream.ReceiveHandshakeFrameAsync[TIOAdapter](CancellationToken cancellationToken)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean receiveFirst, Byte[] reAuthenticationData, CancellationToken cancellationToken)
at System.Net.Security.SslStream.AuthenticateAsClient(SslClientAuthenticationOptions sslClientAuthenticationOptions)
at Microsoft.Data.SqlClient.SNI.SNITCPHandle.EnableSsl(UInt32 options)
at Microsoft.Data.SqlClient.SNI.TdsParserStateObjectManaged.EnableSsl(UInt32& info, Boolean tlsFirst, String serverCertificateFilename)
14:39:54.974 7 Y TP 全局异常:全局异常捕抓
Received an unexpected EOF or 0 bytes from the transport stream.
14:39:54.975 7 Y TP System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
at System.Net.Security.SslStream.ReceiveHandshakeFrameAsync[TIOAdapter](CancellationToken cancellationToken)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean receiveFirst, Byte[] reAuthenticationData, CancellationToken cancellationToken)
at System.Net.Security.SslStream.AuthenticateAsClient(SslClientAuthenticationOptions sslClientAuthenticationOptions)
at Microsoft.Data.SqlClient.SNI.SNITCPHandle.EnableSsl(UInt32 options)
at Microsoft.Data.SqlClient.SNI.TdsParserStateObjectManaged.EnableSsl(UInt32& info, Boolean tlsFirst, String serverCertificateFilename)

看提示好像是连接问题,但是我测试了,ping ip和1433端口都是通的 不知道问题出哪儿了,另外开发环境里测试正常

@nodyang
Copy link

nodyang commented Feb 10, 2025

我猜的 SQL Server 没有启用加密或使用不兼容的加密协议。

@shuxinqin
Copy link
Owner

没遇上过,但这类问题基本是与ORM框架没关系,建议从数据库连接驱动,链接配置,数据库配置等方面着手排查~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants