无法启动Tomcat

时间:2016-01-16 20:06:14

标签: java apache tomcat

我只是想设置一个tomcat服务器。我得到了以下设置:

Tomcat 9安装在里面:/opt/apache-tomcat-9.0.0.M1 WebAppliction位于:/srv/appsiting-dev/

WebApplication的结构:

drwxrwsr-x 2 root appsiting 4096 Jan 15 20:08 bin
drwxrws--- 2 root appsiting 4096 Jan 16 18:52 doc
drwxrwsr-x 2 root www-data  4096 Jan 16 19:48 etc
drwxr-xr-x 2 root root      4096 Jan 15 19:56 log
drwxrwsr-x 2 root appsiting 4096 Jan 15 19:56 php-lib
drwxrwsr-x 2 root appsiting 4096 Jan 16 02:38 public_html
drwxrwxrwt 2 root root      4096 Jan 15 19:57 tmp
drwxrwsr-x 7 root root      4096 Jan 16 00:45 tomcat
drwxrwsr-x 3 root appsiting 4096 Jan 15 21:30 var
drwxrwsr-x 2 root appsiting 4096 Jan 15 19:57 zend-app

在tomcat目录中有以下内容:

drwxrwsr-x 3 appsiting appsiting 4096 Jan 16 20:25 conf
drwxrws--- 2 appsiting appsiting 4096 Jan 16 20:07 logs
drwxrwsr-x 2 appsiting appsiting 4096 Jan 16 20:20 temp
-rwxr-xr-x 1 root      root      3015 Jan 16 00:45 tomcat
drwxrwsr-x 7 appsiting appsiting 4096 Jan 15 23:32 webapps
drwxrwsr-x 2 appsiting appsiting 4096 Jan 15 23:32 work

tomcat是一个启动脚本。我在我的tomcat.conf里面找到了以下内容,conf位于USERNAME="appsiting" PORTBASE="40000" JAVA_OPTS="$JAVA_OPTS -Xmx1024m -XX:MaxPermSize=256m" JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote" JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=$(($PORTBASE+2))" JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false" JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false" JAVA_OPTS="$JAVA_OPTS -XX:+CMSClassUnloadingEnabled" #JAVA_OPTS="$JAVA_OPTS -XX:+CMSPermGenSweepingEnabled" #JAVA_OPTS="$JAVA_OPTS -verbose:gc -XX:+PrintClassHistogram" JAVA_OPTS="$JAVA_OPTS -server" JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true" export JAVA_OPTS export JAVA_HOME="/usr" export CATALINA_HOME="/opt/apache-tomcat-9.0.0.M1" export CATALINA_BASE="/srv/appsiting-dev/tomcat"

tomcat.err

因此,当我启动服务器时,我得到catalina.outtomcat.err。即使Using CATALINA_BASE: /srv/appsiting-dev/tomcat Using CATALINA_HOME: /opt/apache-tomcat-9.0.0.M1 Using CATALINA_TMPDIR: /srv/appsiting-dev/tomcat/temp Using JRE_HOME: /usr Using CLASSPATH: /opt/apache-tomcat- 9.0.0.M1/bin/bootstrap.jar:/opt/apache-tomcat-9.0.0.M1/bin/tomcat-juli.jar Using CATALINA_PID: /srv/appsiting-dev/tomcat/temp/tomcat.pid Tomcat started. 告诉我Tomcat已经开始,catalina.out在xx ms"中也没有" Server starup。在里面。

tomcat.err

sudo ./tomcat start
Starting Tomcat (appsiting-dev) ............................... failed.

catalina.out是空的。这是启动脚本: https://www.refheap.com/113725

运行时,我得到了

ionic start myapp --v2 --ts

有谁知道这里的问题是什么?

提前致谢

1 个答案:

答案 0 :(得分:1)

本地主机端口已经在其他服务或进程中使用。查找并终止(停止)它。