Ubuntu 22.04 + Jetbrains Rider 无法 运行 集成测试
Ubuntu 22.04 + Jetbrains Rider cannot run integration tests
你好,我是 ubuntu 的新用户(安装了 22.04 版),我从一开始就遇到了问题...目前我正在与 Jetbrains 进行 运行ning 集成测试Rider(我 运行 应用程序没有任何问题并连接到此数据库)。
我遇到的错误是:
A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught)
System.Security.Authentication.AuthenticationException
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
at System.Net.Security.SslStream.ProcessAuthentication(Boolean isAsync, Boolean isApm, CancellationToken cancellationToken)
at System.Net.Security.SslStream.AuthenticateAsClient(SslClientAuthenticationOptions sslClientAuthenticationOptions)
at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)
at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost)
at System.Data.SqlClient.SNI.SNITCPHandle.EnableSsl(UInt32 options)
System.TypeInitializationException
The type initializer for 'SslMethods' threw an exception.
at Interop.OpenSsl.AllocateSslContext(SslProtocols protocols, SafeX509Handle certHandle, SafeEvpPKeyHandle certKeyHandle, EncryptionPolicy policy, SslAuthenticationOptions sslAuthenticationOptions)
at System.Net.Security.SafeDeleteSslContext..ctor(SafeFreeSslCredentials credential, SslAuthenticationOptions sslAuthenticationOptions)
at System.Net.Security.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteSslContext& context, ReadOnlySpan`1 inputBuffer, Byte[]& outputBuffer, SslAuthenticationOptions sslAuthenticationOptions)
System.TypeInitializationException
The type initializer for 'Ssl' threw an exception.
at Interop.Ssl.SslV2_3Method()
at Interop.Ssl.SslMethods..cctor()
System.TypeInitializationException
The type initializer for 'SslInitializer' threw an exception.
at Interop.Ssl..cctor()
Interop+Crypto+OpenSslCryptographicException
error:0E076071:configuration file routines:MODULE_RUN:unknown module name
at Interop.SslInitializer..cctor()
Ubuntu 22.04,.dotnet 5.0.213,骑士 2022.1
有人遇到过这样的问题吗?
您可以尝试在您的连接字符串中添加:Encrypt=False;TrustServerCertificate=True。当然,这只是一个临时解决方案,只能用于测试。
这可能是由于 OpenSSL 配置所致。我有一个类似的问题并用这个命令解决它:
sed -i 's/openssl_conf = openssl_init/#openssl_conf = openssl_init/g' /etc/ssl/openssl.cnf
见
https://github.com/actions/virtual-environments/pull/5496/commits/8bbc73d575c7b84932148a82bf2aa7a6c10ea5aa
和
https://github.com/dotnet/runtime/issues/27792
了解更多详情。
你好,我是 ubuntu 的新用户(安装了 22.04 版),我从一开始就遇到了问题...目前我正在与 Jetbrains 进行 运行ning 集成测试Rider(我 运行 应用程序没有任何问题并连接到此数据库)。
我遇到的错误是:
A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught)
System.Security.Authentication.AuthenticationException
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
at System.Net.Security.SslStream.ProcessAuthentication(Boolean isAsync, Boolean isApm, CancellationToken cancellationToken)
at System.Net.Security.SslStream.AuthenticateAsClient(SslClientAuthenticationOptions sslClientAuthenticationOptions)
at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)
at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost)
at System.Data.SqlClient.SNI.SNITCPHandle.EnableSsl(UInt32 options)
System.TypeInitializationException
The type initializer for 'SslMethods' threw an exception.
at Interop.OpenSsl.AllocateSslContext(SslProtocols protocols, SafeX509Handle certHandle, SafeEvpPKeyHandle certKeyHandle, EncryptionPolicy policy, SslAuthenticationOptions sslAuthenticationOptions)
at System.Net.Security.SafeDeleteSslContext..ctor(SafeFreeSslCredentials credential, SslAuthenticationOptions sslAuthenticationOptions)
at System.Net.Security.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteSslContext& context, ReadOnlySpan`1 inputBuffer, Byte[]& outputBuffer, SslAuthenticationOptions sslAuthenticationOptions)
System.TypeInitializationException
The type initializer for 'Ssl' threw an exception.
at Interop.Ssl.SslV2_3Method()
at Interop.Ssl.SslMethods..cctor()
System.TypeInitializationException
The type initializer for 'SslInitializer' threw an exception.
at Interop.Ssl..cctor()
Interop+Crypto+OpenSslCryptographicException
error:0E076071:configuration file routines:MODULE_RUN:unknown module name
at Interop.SslInitializer..cctor()
Ubuntu 22.04,.dotnet 5.0.213,骑士 2022.1
有人遇到过这样的问题吗?
您可以尝试在您的连接字符串中添加:Encrypt=False;TrustServerCertificate=True。当然,这只是一个临时解决方案,只能用于测试。
这可能是由于 OpenSSL 配置所致。我有一个类似的问题并用这个命令解决它:
sed -i 's/openssl_conf = openssl_init/#openssl_conf = openssl_init/g' /etc/ssl/openssl.cnf
见 https://github.com/actions/virtual-environments/pull/5496/commits/8bbc73d575c7b84932148a82bf2aa7a6c10ea5aa 和 https://github.com/dotnet/runtime/issues/27792
了解更多详情。