Ubuntu Server 18.04.2上的Tomcat 8.5.39

时间:2019-04-17 13:57:05

标签: tomcat8 ubuntu-18.04 spring-websocket

我的错是我不知道我在其中一个在AWS中运行18.04.2的生产Ubuntu服务器中是否打开了自动更新。 Tomcat最近(自动)更新到8.5.39,并且当我们重新启动tomcat8时,我们的代码无法部署,但有以下异常:

Caused by: java.lang.IllegalStateException: Attribute 'javax.websocket.server.ServerContainer' not found in ServletContext at org.springframework.util.Assert.state(Assert.java:73)

当我在tomcat中启用与安全相关的调试消息时,可以看到以下内容:

policy: evaluate codesources:
    Policy CodeSource: (file:/usr/lib/jvm/java-8-oracle/jre/lib/ext/* <no signer certificates>)
    Active CodeSource: (file:/var/lib/tomcat8/webapps/api/WEB-INF/lib/spring-retry-1.2.2.RELEASE.jar <no signer certificates>)
policy: evaluation (codesource) failed
policy: evaluate codesources:
    Policy CodeSource: (file:/usr/java/packages/lib/ext/* <no signer certificates>)
    Active CodeSource: (file:/var/lib/tomcat8/webapps/api/WEB-INF/lib/spring-retry-1.2.2.RELEASE.jar <no signer certificates>)
policy: evaluation (codesource) failed
policy: evaluate codesources:
    Policy CodeSource: (null <no signer certificates>)
    Active CodeSource: (file:/var/lib/tomcat8/webapps/api/WEB-INF/lib/spring-retry-1.2.2.RELEASE.jar <no signer certificates>)
policy: evaluate principals:
    Policy Principals: []
    Active Principals: []

我真的不知道这些是否相关……我们需要做什么才能使websocket对Spring可见?我不知道此更新之前在此服务器上运行的tomcat的版本,但是我们从未在javax.websocket.server.ServerContainer上找到与该tomcat版本一起运行的异常。是否可以关闭任何tomcat安全检查?

1 个答案:

答案 0 :(得分:0)

这似乎是Spring上的一个已知问题: Spring Boot version 2.0.2.RELEASE and Tomcat version 8.5.39