今天部署项目时,启动tomcat8初始化失败,日志如下:
十二月 23, 2020 4:45:07 下午 org.apache.catalina.startup.SetAllPropertiesRule begin
警告: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'maxSpareThreads' to '750' did not find a matching property.
十二月 23, 2020 4:45:07 下午 org.apache.catalina.startup.SetAllPropertiesRule begin
警告: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'minSpareTHreads' to '50' did not find a matching property.
INFO 2020-12-23 16:45:08:017 com.jd.pfinder.profiler.service.impl.PluginRegistrar [ main ] : enhance class org.apache.catalina.core.StandardHostValve by tomcatV7V8
十二月 23, 2020 4:45:08 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'xmlValidation' to 'false' did not find a matching property.
十二月 23, 2020 4:45:08 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'xmlNamespaceAware' to 'false' did not find a matching property.
十二月 23, 2020 4:45:08 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version: Apache Tomcat/8.5.42
解决方案:
1、切换部署到tomcat7,再启动项目,启动成功。
2、网上有另一个解决方案,可参考 :
具体方法如下:
server.xml中的配置HTTPS的那部分Connector代码
<Connector port="8080"
protocol="HTTP/1.1" //---------修改这行
。。。。。。。。
。。。。。。。。
connectionTimeout="20000"
redirectPort="8443" />
修改后:
<Connector port="8080"
protocol="org.apache.coyote.http11.Http11Protocol" //-------------------填写完整的protocol 协议
connectionTimeout="20000"
redirectPort="8443" />
即将protocol参数由"HTTP/1.1"改成"org.apache.coyote.http11.Http11Protocol",重新启动Tomcat
备注:
官方表达: http://tomcat.apache.org/tomcat-8.0-doc/config/http.html