ubuntu - service tomcat7 start fails, but the process exists and tomcat is running -
i have been trying install tomcat7 on ubuntu docker images apt-get install tomcat7
. installation works fine , starting tomcat catalina.sh works well.
i need start tomcat "service tomcat7 start", instead fails. regardless failure result, if wget localhost:8080
can see tomcat answering , if ps -ef | grep tomcat
can see process.
similarly if run service tomcat7 status
says tomcat not running when , pid file exist.
i have noticed when start tomcat catalina scripts, pid file created called tomcat.pid, /etc/init.d/tomcat
script try read tomcat7.pid.
however, forcing name in script peek right pid file, not solve problem.
has else experienced this?
the ubuntu version of docker file trying not relevant, since have been trying several.
anyway 1 using 12.10 , 14.04.
thanks!
in docker ubuntu image using (5506de2b643b - 14.04.1 lts), start-stop-daemon --test
argument working incorrectly , reports tomcat not running, when is.
the tomcat7 init.d script starts tomcat because start-stop-daemon --test
says (correctly) tomcat not running, little later in startup process checks tomcat started , running. start-stop-daemon --test
incorrectly says tomcat not running, causes tomcat7 init.d script remove pid file.
as result, service tomcat7 status
returns false when tomcat running because pid file gone, return false if pid file there correct pid due bug in start-stop-daemon --test
.
here's example session demonstrating bug:
#tomcat pid 43 root@a2cf26ade2a9:/# ps -eaf | grep tomcat7 tomcat7 43 1 0 14:06 ? 00:00:04 /usr/lib/jvm/java-7-oracle/bin/java -djava.util.logging.config.file=/var/lib/tomcat7/conf/logging.properties -djava.util.logging.manager=org.apache.juli.classloaderlogmanager -djava.awt.headless=true -xmx128m -xx:+useconcmarksweepgc -djava.endorsed.dirs=/usr/share/tomcat7/endorsed -classpath /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar -dcatalina.base=/var/lib/tomcat7 -dcatalina.home=/usr/share/tomcat7 -djava.io.tmpdir=/tmp/tomcat7-tomcat7-tmp org.apache.catalina.startup.bootstrap start #pid file has correct pid root@a2cf26ade2a9:/# cat /var/run/tomcat7.pid 43 #start-stop-daemon --test reports start tomcat root@a2cf26ade2a9:/# start-stop-daemon --test --start --pidfile /var/run/tomcat7.pid --user tomcat7 --exec /usr/lib/jvm/java-7-oracle/bin/java start /usr/lib/jvm/java-7-oracle/bin/java . root@a2cf26ade2a9:/# echo $? 0
Comments
Post a Comment