所以我在一个CentOS 6.7服务器上的默认端口8080上运行了一个tomcat 7.026
最近它自行停止了运行
以下是每个的输出:
sudo service easy-tomcat7 start
Failed to start Tomcat
sudo service easy-tomcat7 status
pidof:命令行上的选项无效!
pidof:命令行上的选项无效!
jsvc.exec已停止
ps aux | grep tomcat
root 4293 1.4 2.3 5939868 389996 pts / 0 Sl 14:16 0:14 /usr/java/jdk1.7.0_05/bin/java -Djava.util.logging.config.file =的/ usr /共享/ Apache的Tomcat的7.0.26 / CONF / logging.properties -Djava.util.logging.manager = org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs = / usr / share / apache-tomcat-7.0.26 / endorsed -classpath /usr/share/apache-tomcat-7.0。 26 /斌/ bootstrap.jar:/usr/share/apache-tomcat-7.0.26/bin/tomcat-juli.jar -Dcatalina.base = / usr / share / apache-tomcat-7.0.26 -Dcatalina.home = / usr / share / apache-tomcat-7.0.26 -Djava.io.tmpdir = / usr / share / apache-tomcat- 7.0.26 / temp org.apache.catalina.startup.Bootstrap start
root 16821 0.0 0.0 8548 384? Ss 14:30 0:00 jsvc.exec -user tomcat -cwd / usr / local / easy / share / easy-tomcat7 -pidfile /var/run/easy-tomcat7.pid -cp /usr/local/easy/bin/bootstrap.jar:/usr/local/easy/bin/tomcat-juli.jar:/usr/local/easy/share /java/commons-daemon.jar -Djava.endorsed.dirs = / usr / local / easy / share / easy-tomcat7 / endorsed -outfile /var/log/easy-tomcat7/catalina.out -errfile /var/log/easy-tomcat7/catalina.err - 详细 org.apache.catalina.startup.Bootstrap start
tomcat 16823 9.4 3.5 6190668 574344? Sl 14:30 0:15 jsvc.exec -user tomcat -cwd / usr / local / easy / share / easy-tomcat7 -pidfile /var/run/easy-tomcat7.pid -cp /usr/local/easy/bin/bootstrap.jar:/usr/local/easy/bin/tomcat-juli.jar:/usr/local/easy/share /java/commons-daemon.jar -Djava.endorsed.dirs = / usr / local / easy / share / easy-tomcat7 / endorsed -outfile /var/log/easy-tomcat7/catalina.out -errfile /var/log/easy-tomcat7/catalina.err - 详细 org.apache.catalina.startup.Bootstrap start
杀死这些流程并没有帮助,以及服务启动,重启,强制重装......等等。
最后这里是easy-tomcat7的脚本
. /etc/rc.d/init.d/functions
case $1 in
start)
file=/usr/sbin/starttomcat
# no way to start tomcat
if [ ! -x $file ]; then
echo "Missing $file"
ERROR=1
else
# tomcat disabled by whm
if [ -e /etc/tomcatdisable ]; then
echo "Tomcat is disabled by cPanel/WHM"
ERROR=0
else
ERROR=0
status jsvc.exec &>/dev/null
# tomcat already running
if [ $? -eq 0 ]; then
echo "Tomcat already started"
# start tomcat, not running
else
$file &>/dev/null
sleep 1 # just to make sure
status jsvc.exec &>/dev/null
if [ $? -eq 0 ]; then
ERROR=0
else
echo "Failed to start Tomcat"
ERROR=1
fi
fi
fi
fi
;;
stop)
file=/usr/sbin/stoptomcat
if [ ! -x $file ]; then
echo "Missing $file"
ERROR=1
else
$file
ERROR=0
fi
;;
restart)
file=/usr/local/cpanel/scripts/restartsrv_tomcat
if [ ! -x $file ]; then
echo "Missing $file"
ERROR=1
else
$file
fi
;;
status|fullstatus)
status jsvc.exec
;;
*)
echo $"Usage: $0 {start|stop|restart|status|fullstatus}"
ERROR=2 esac
exit $ERROR
答案 0 :(得分:0)
我终于解决了这个问题。
运行后
java -version
似乎Java安装已经被破坏了,所以我所要做的就是卸载并重新安装Java,这对我来说很有用。