zoukankan      html  css  js  c++  java
  • 解决.net core3.1使用docker部署在Ubuntu上连接sqlserver报error:35的问题

    最近把一个项目从core2.2迁移至core3.1,在本地win上跑没有问题,但是上线到生产Ubuntu docker环境下连接不上sqlserver报以下错误。

    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)
    stacktrace: at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at
    

    折腾了一晚终于搞定了,原来是core3.1 image的问题,大概是core3.1默认image的ssl证书设置的问题,更改为FROM mcr.microsoft.com/dotnet/core/sdk:3.1-bionic后终于恢复正常了。

  • 相关阅读:
    rocketmq详解
    rocketmq的windows版客户端的启动步骤
    postman提交数组格式方式
    关于springmvc的包含list提交的格式
    数据库字段和实体类和map中对应类型
    怎么连接两个数据库和怎么停止上一个线程
    IDEA 创建类是自动添加注释和创建方法时快速添加注释
    centOs7 安装mysql8
    CentOS7安装Nginx及配置
    windows安装mysql8详解
  • 原文地址:https://www.cnblogs.com/mtxcat/p/12733270.html
Copyright © 2011-2022 走看看