为什么与 Microsoft sql 的连接停止工作?

Why is the connection to microsoft sql stopped working?

我有一项与 Sql 女士联系的服务。从本地系统成功连接 运行。但是部署后抛出以下错误。

Could not obtain connection to query metadata : The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]

在 Dockerfile 中所做的唯一更改是最后 3 行:

FROM openjdk:11-jre-slim
COPY /target/app-exec.jar /app-exec.jar
RUN apt-get update && apt-get -y install wget
RUN apt-get install curl -y
RUN wget -O dd-java-agent.jar https://dtdg.co/latest-java-tracer

即使在还原更改后,我也会遇到同样的错误。 你能帮我解决这个问题吗?

最近,即将发布的 OpenJDK 更新版本(自 4 月 20 日起)默认不启用 TLS 1.0/1.1

我的快速解决方案是将版本降级为以下版本:

FROM openjdk:11.0.6-jre-slim