所以我让Tomcat7.026在CentOS6.7服务器上的默认端口8080上顺利运行。
最近它停止了自己的运行。
以下是每一个的输出:
sudo service easy-tomcat7 start
Failed to start Tomcat
sudo服务easy-tomcat7状态
PIDOF:命令行上的选项无效!
PIDOF:命令行上的选项无效!
jsvc.exec已停止
ps aux | grep tomcat
根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/share/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/bin/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
根16821 0.0 0.0 8548 384?星期四14:30 0:00
jsvc.exec-用户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-verbose
org.apache.catalina.startup.bootstrap启动
汤姆卡特16823 9.4 3.5 6190668 574344?下午14:30 0:15
jsvc.exec-用户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-verbose
org.apache.catalina.startup.bootstrap启动
终止这些进程没有帮助,服务启动、重新启动、强制重新加载…等
最后是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
最佳答案
我终于解决了这个问题。
运行后
java -version
Java安装似乎已经被破坏了,所以我所要做的就是卸载并重新安装Java,这就给了我一个窍门。
关于java - Tomcat 7.0.26无法启动jsvc,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/35552645/