分类
技术

OneinStack 无法启动 Tomcat

执行 service tomcat start 无异常显示,但打开页面发现 502 错误。执行 service tomcat status,提示 Tomcat 未启动。

Tomcat 未启动

看日志,/usr/local/tomcat/logs/catalina.out,发现错误:

WARNING [main] org.apache.catalina.startup.Catalina.load Catalina.start using conf/server.xml: The name of the entity is required in the entity declaration.

SEVERE [main] org.apache.tomcat.util.digester.Digester.fatalError Parse Fatal Error at line 4 column 10: The name of the entity is required in the entity declaration.

org.xml.sax.SAXParseException; systemId: file:/usr/local/tomcat/conf/server.xml; lineNumber: 4; columnNumber: 10; The name of the entity is required in the entity declaration.

第四行第十列,刚好是数字 5,猜测是命名问题,首位不能是数字。在其前面加一个字母,成功启动。需要注意的是,server.xml 里头尾各一个地方要改。

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注