java - JHIPSTER:Docker 不再连接到 SQL 数据库
问题描述
我已经构建了一个 docker 文件以上传到我的 AWS 环境,不再连接到我的 RDS 数据库。我已经硬编码 ECS 任务以使用以前的 docker 文件并且工作正常,所以不是网络/数据库问题我已经一一还原所有提交但仍然失败,我 98% 确定两个 docker 中的源代码是相同的。
将 docker 与 docker 桌面上的“Inspect”进行比较,我只看到一个区别,即 docker 内部使用的 java 版本:
工作版本
5 /bin/sh -c set -eux; ARCH="$(dpkg --print-architecture)"; case "${ARCH}" in aarch64|arm64) ESUM='xx'; BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jre_aarch64_linux_hotspot_11.0.10_9.tar.gz';
6 /bin/sh -c #(nop) ENV JAVA_VERSION=jdk-11.0.10+9 0 Bytes
非工作版本
5 /bin/sh -c set -eux; ARCH="$(dpkg --print-architecture)"; case "${ARCH}" in aarch64|arm64) ESUM='xx'; BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jre_aarch64_linux_hotspot_11.0.11_9.tar.gz';
6 /bin/sh -c #(nop) ENV JAVA_VERSION=jdk-11.0.11+9 0 Bytes
部分日志是:
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
..
Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
浏览器和操作系统
窗户 10
docker --version Docker 版本 20.10.5,构建 55c4c88
我不确定用于构建最后一个 docker 的 docker 版本。
升级到 Docker 版本 20.10.6,构建 370c289 不能解决问题
JHipster 版本7.0.1
谁控制用于构建 docker 的 JAVA_VERSION=jdk-11.0.xx?我怎样才能硬核它 JAVA_VERSION=jdk-11.0.10+9 只是为了确认它解决了我的问题?
- 更新 -
我看到在 pom.xml 的 jib-maven-plugin 上设置了采用openjdk。
硬编码“采用openjdk:11.0.10_9-jre-hotspot”的价值解决了我的问题,但我需要更好的解决方案的反馈。
解决方案
推荐阅读
- python - 如何使用pyqt4删除表格小部件中的特定行边框
- javascript - 当我在幻灯片中按下一个 div 时,如何更改另一个 div 的内容?
- header - 如何在 prestashop 中更改标题的名称
- doc2vec - 处理 doc2vec 培训中的附加信息
- vue.js - Vue slideToggle不流畅
- c++ - 在另一个类的构造函数的成员初始化程序中声明的类在它之外是否可见?
- python - 在fortran代码的python回调例程中传递动态参数
- django - 尝试从 aurelia js 文件进行 django api 调用时出现禁止错误
- reactjs - 带有参数的 React-Router 路径在开发中正确显示但在生产中不正确
- prestashop - PrestaShop 1.7 创建自己的模块扩展 Ps_Facetedsearch 模块