mysql驱动程序无法加载信任存储spring boot micro服务器

svujldwt  于 2021-07-14  发布在  Java
关注(0)|答案(0)|浏览(152)

我有一个spring-boot微服务在kube集群中运行。它运行正常,但间歇性抛出错误:无法从文件:/app/truststore加载信任库。应用程序运行良好,但在中途创建新连接时会抛出错误。从我的调试点看这段代码 tm.getAcceptedIssuers() 正在返回nullhttps://github.com/mysql/mysql-connector-j/blob/release/8.0/src/main/core-impl/java/com/mysql/cj/protocol/exportcontrolled.java#l586
我正在使用hibernate,但是所有的实体都被标记为不可变的,因为这个应用程序是只读的。
堆栈为

j.l.NullPointerException: null
  at java.util.Arrays.stream(Arrays.java:5614)
  at c.m.c.p.ExportControlled$X509TrustManagerWrapper.<init>(ExportControlled.java:347)
  at c.m.c.p.ExportCOntrolled.getSSLContext(ExportControlled.java:603)
  at c.m.c.p.ExportControlled.performTlsHandshake(ExportControlled.java:308)
  at c.m.c.p.StandardSocketFactory.performTlsHandshake(StandardSoketFactory.java:188)
  at c.m.c.p.a.NativeSocketConnection.performTlsHandshake(NativeSocketConnection.java:97)
  at c.m.c.p.a.NativeProtocol.negotiateSSLConnection(NativeProtocol.java:333)
  at c.m.c.p.a.NativeAuthenticationProvider.connect(NativeAuthenticationProvider.java:203)
  at c.m.c.p.a.NativeProtocol.connect(NativeProtocol.java:1353)
  at c.m.cj.NativeSession.connect(NativeSession.jsvs:157)
  at c.m.c.j.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:953)
  at c.m.c.j.ConnectionImpl.createNewIO(ConnectionImpl.java:823)

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题