Spring Boot 2.1.1:UnsatisfiedLinkError:org.apache.tomcat.jni.SSL.renegotiatePending [英] Spring Boot 2.1.1: UnsatisfiedLinkError: org.apache.tomcat.jni.SSL.renegotiatePending

查看:781
本文介绍了Spring Boot 2.1.1:UnsatisfiedLinkError:org.apache.tomcat.jni.SSL.renegotiatePending的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从Spring Boot 2.1.0.RELEASE更新到2.1.1.RELEASE后,所有HTTPS请求均失败,并显示以下错误:

After updating from Spring Boot 2.1.0.RELEASE to 2.1.1.RELEASE, all HTTPS requests fail with the following error:

2018-12-03 14:23:46,089 PID=21726 LEVEL=ERROR THREAD=https-openssl-nio-443-exec-2 LOGGER=org.apache.tomcat.util.net.NioEndpoint METHOD=log:175 MESSAGE="java.lang.UnsatisfiedLinkError: org.apache.tomcat.jni.SSL.renegotiatePending(J)I
        at org.apache.tomcat.jni.SSL.renegotiatePending(Native Method) ~[tomcat-embed-core-9.0.13.jar!/:9.0.13]
        at org.apache.tomcat.util.net.openssl.OpenSSLEngine.getHandshakeStatus(OpenSSLEngine.java:1021) ~[tomcat-embed-core-9.0.13.jar!/:9.0.13]
        at org.apache.tomcat.util.net.openssl.OpenSSLEngine.wrap(OpenSSLEngine.java:457) ~[tomcat-embed-core-9.0.13.jar!/:9.0.13]
        at java.base/javax.net.ssl.SSLEngine.wrap(SSLEngine.java:471) ~[na:na]
        at org.apache.tomcat.util.net.SecureNioChannel.handshakeWrap(SecureNioChannel.java:440) ~[tomcat-embed-core-9.0.13.jar!/:9.0.13]
        at org.apache.tomcat.util.net.SecureNioChannel.handshake(SecureNioChannel.java:211) ~[tomcat-embed-core-9.0.13.jar!/:9.0.13]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1394) ~[tomcat-embed-core-9.0.13.jar!/:9.0.13]
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.13.jar!/:9.0.13]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135) [na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [na:na]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.13.jar!/:9.0.13]
        at java.base/java.lang.Thread.run(Thread.java:844) [na:na]
"

恢复为2.1.0.RELEASE解决了该问题.

Reverting to 2.1.0.RELEASE resolves the issue.

  • 操作系统:Ubuntu 18.04.1 LTS
  • Java:OpenJDK运行时环境(内部版本 10.0.2 + 13-Ubuntu-1ubuntu0.18.04.4)
  • 解放:1.2.16-1build1
  • OS: Ubuntu 18.04.1 LTS
  • Java: OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4)
  • libtcnative: 1.2.16-1build1

怀疑与此有关: https://github.com/spring- projects/spring-boot/issues/15261

明确锁定对tomcat-embed-core 9.0.12的依赖关系可以解决此问题.

Explicitly lock dependency to tomcat-embed-core 9.0.12 resolves the issue.

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-core</artifactId>
            <version>9.0.12</version>
        </dependency>
    </dependencies>
</dependencyManagement>

怀疑libtcnative更新也可以解决此问题,但是Ubuntu LTS的当前版本是1.2.16-1build1,因此我们认为这是Spring Boot中的回归.

Suspect that libtcnative update would also resolve the issue, but current version for Ubuntu LTS is 1.2.16-1build1, thus we consider this a regression in Spring Boot.

https://packages.ubuntu.com/search?keywords=libtcnative-1

问题已通过上面列出的依赖项锁定解决.

Issue resolved with the above listed dependency lock.

推荐答案

Spring Boot 2.1.1已从9.0.12升级到Tomcat 9.0.13.由于此更改,Tomcat 9.0.13需要包含的Tomcat Native版本. href ="https://github.com/apache/tomcat-native/commit/02fe7c14ceba27c2180e79837a260afa64ebed30" rel ="noreferrer">此更改.它在1.2.18及更高版本中可用.预计将需要在升级到新的Tomcat修补程序版本时使用新的Tomcat Native修补程序版本.同样,也可以预期Spring Boot的新修补程序版本将更新为其依赖项之一的新修补程序版本.

Spring Boot 2.1.1 upgraded to Tomcat 9.0.13 from 9.0.12. Due to this change, Tomcat 9.0.13 requires a version of Tomcat Native that contains this change. It is available in 1.2.18 and later. The requirement to use a new patch release of Tomcat Native when upgrading to a new patch release of Tomcat is to be expected. Similarly, it is also to be expected that a new patch release of Spring Boot will update to a new patch release of one of its dependencies.

如果您的操作系统没有提供您可以使用的最新Tomcat Native软件包,我建议您自己构建.有关说明,请参见 Tomcat的文档.这比将Tomcat降级到9.0.12更为可取,因为卡在旧版本上会增加您将来受到错误或安全漏洞影响的风险.

If your OS does not provide an up-to-date Tomcat Native package that you can use, I would recommend building it yourself. Instructions for doing so can be found in Tomcat's documentation. This is preferable to downgrading Tomcat to 9.0.12 as getting stuck on an older version increases your risk of being affected by a bug or security vulnerability in the future.

这篇关于Spring Boot 2.1.1:UnsatisfiedLinkError:org.apache.tomcat.jni.SSL.renegotiatePending的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆