DotNetCore Series: Solving NET Core project run appears on the docker "ssl_choose_client_version: unsupported protocol" issues

After the upgrade in front of the company's .NET Core Project 3.1, in development and test environments are capable of normal operation.
But unfortunately, after performing production docker start, there has been an exception a database connection.

ssl_choose_client_version:unsupported protocol

I thought it was a database connection string is configured incorrectly or is the project's connection to the database server because the network reasons for failure, and later after the investigation is not a problem.
Careful analysis of anomalies, suggesting that the problem ssl, I view the version of OpenSSL development environment on a server, and then compare the version of OpenSSL on the production server, I finally found the problem:

Openssl development environment: 1.2.1
openssl production environment: 1.0.1

Finally, to be compatible with earlier versions production environment, I would add Dockerfile generate mirrored

RUN sed -i ‘s/TLSv1.2/TLSv1.0/g’ /etc/ssl/openssl.cnf

Then recreate the mirror and started on the server, this time will be able to connect properly to the MSSQL.

You have any questions or want to communicate with me and I can also focus on the micro-channel public number:
Here Insert Picture Description

Published 18 original articles · won praise 2 · Views 1457

Guess you like

Origin blog.csdn.net/wangjiansui/article/details/105314155