启动tomcat 8.5时主管生成错误

时间:2018-09-24 12:49:41

标签: tomcat tomcat8 supervisord supervisor

我正在尝试使用Docker容器中的主管启动Tomcat 8.5.34安装。我已经通过下载并解压缩了Tomcat。如果在控制台中运行 /catalina.sh运行,我已经测试了一切正常。我遇到的问题是使用主管启动它时。主管可以正常启动Tomcat,但会返回此值

tomcat: ERROR (spawn error)

似乎无法控制Tomcat启动时创建的进程。

我已经检查了Tomcat日志,并且一切都已启动,并且没有错误。这就是我的 supervisor.log 文件的样子

2018-09-24 12:39:01,347 INFO stopped: sshd (exit status 0)
2018-09-24 12:39:05,327 INFO spawned: 'tomcat' with pid 313
2018-09-24 12:39:05,340 INFO exited: tomcat (exit status 0; not expected)
2018-09-24 12:39:05,340 INFO gave up: tomcat entered FATAL state, too many start retries too quickly
2018-09-24 12:39:06,341 INFO success: sshd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

这是我的 supervisor.conf 的样子

[supervisord]
nodaemon=true

[program:sshd]
command=/usr/sbin/sshd -D
autostart=true
autorestart=true

[program:tomcat]
environment=JAVA_OPTS="-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom",CATALINA_OPTS="-Xms512M -Xmx1024M -server -XX:+UseParallelGC",CATALINA_PID="CATALINA_PID=/usr/local/tomcat/temp/tomcat.pid"
command=/usr/local/tomcat/bin/catalina.sh run
startretries=0
startsecs=60
stdout_logfile  = /var/log/supervisor/%(program_name)s.log
stderr_logfile  = /var/log/supervisor/%(program_name)s.log
logfile_maxbytes=10MB

0 个答案:

没有答案