Tomcat 7无法启动

时间:2016-01-21 20:29:08

标签: java tomcat opensuse

我有一个OpenSuse Linux,我安装了Tomcat 7.0.52,但是当我运行startup.sh时,总是没问题。我在localhost中运行nmap,但是没有出现tomcat服务和端口。

Starting Nmap 5.21 ( http://nmap.org ) at 2016-01-21 18:09 UYST 
Nmap scan report for localhost (127.0.0.1) Host is up (0.0000020s latency). 
Not shown: 991 closed ports PORT      
STATE SERVICE 
22/tcp    open  
ssh 23/tcp    open  
telnet 25/tcp    open  
smtp 53/tcp    open  
domain 111/tcp   open  
rpcbind 631/tcp   open  
ipp 2049/tcp  open  
nfs 3306/tcp  open  
mysql 10000/tcp open  snet-sensor-mgmt

Nmap done: 1 IP address (1 host up) scanned in 0.08 seconds

当我运行shutdown.sh时,我收到了这条消息:

Using CATALINA_BASE:   /opt/tomcat7/apache-tomcat-7.0.52
Using CATALINA_HOME:   /opt/tomcat7/apache-tomcat-7.0.52
Using CATALINA_TMPDIR: /opt/tomcat7/apache-tomcat-7.0.52/temp
Using JRE_HOME:        /opt/java/jdk1.8.0._65/jre
Using CLASSPATH:       /opt/tomcat7/apache-tomcat-7.0.52/bin/bootstrap.jar:/opt/tomcat7/apache-tomcat-7.0.52/bin/tomcat-juli.jar
/opt/tomcat7/apache-tomcat-7.0.52/bin/catalina.sh: línea 437: /opt/java/jdk1.8.0._65/jre/bin/java: No existe el fichero o el directorio

我的环境变量:

echo $JAVA_HOME
/opt/java/jdk1.8.0_65/

echo $JRE_HOME
/opt/java/jdk1.8.0._65/jre

出了什么问题?

1 个答案:

答案 0 :(得分:0)

您的环境变量定义中是否存在拼写错误?

echo $JAVA_HOME
/opt/java/jdk1.8.0_65/

echo $JRE_HOME
/opt/java/jdk1.8.0._65/jre

似乎后者JRE_HOME正在被使用并导致后面的错误情况:

/opt/java/jdk1.8.0._65/jre/bin/java

尝试重新定义JRE_HOME环境变量,如下所示:

export JRE_HOME='/opt/java/jdk1.8.0._65/jre/bin/java'