Apache Tomcat 9:Windows服务启动失败排查过程
程序员文章站
2024-03-11 10:37:01
...
场景
环境部署版本:apache-tomcat-9.0.7,由于该版本被安全扫描出漏洞,因此进行了升级,升级版本:apache-tomcat-9.0.39。Windows环境下手动执行startup.bat脚本启动正常,但是通过Windows服务形式启动,服务异常退出
日志分析
1catalina.2021-05-19.log
java.lang.OutOfMemoryError: Java heap space
at java.nio.HeapByteBuffer.(HeapByteBuffer.java:57)
at java.nio.ByteBuffer.allocate(ByteBuffer.java:335)
at org.apache.coyote.http11.Http11OutputBuffer.(Http11OutputBuffer.java:110)
at org.apache.coyote.http11.Http11Processor.(Http11Processor.java:163)
at org.apache.coyote.http11.AbstractHttp11Protocol.createProcessor(AbstractHttp11Protocol.java:1001)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPo