tomcat7 @ ubuntu:myHost:8080无效

时间:2015-06-26 13:16:09

标签: ubuntu tomcat7

我在ubuntu服务器上使用tomcat7。

即使我正在启动tomcat7,我的ip:8080也无法正常工作[ERR_CONNECTION_TIMED_OUT]。我找到了一个可能的解决方案here,但即使从ipv6更改为ipv4,问题仍然存在。

以下是netstat -na | grep -e 8080

的结果
root@ehr-se:/etc/init.d# netstat -na | grep -e 8080
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:8080          127.0.0.1:37731         TIME_WAIT

这是我的catalina.out输出。没有错误...

Jun 26, 2015 2:29:35 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jun 26, 2015 2:29:35 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 788 ms
Jun 26, 2015 2:29:35 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jun 26, 2015 2:29:35 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.26
Jun 26, 2015 2:29:35 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/manager.xml
Jun 26, 2015 2:29:36 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/host-manager.xml
Jun 26, 2015 2:29:36 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/tomcat7/webapps/EHR_SE.war
Jun 26, 2015 2:29:36 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/var/lib/tomcat7/webapps/EHR_SE/WEB-INF/lib/javax.servlet-3.0.1.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Jun 26, 2015 2:29:39 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jun 26, 2015 2:29:39 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3319 ms

catalina.out中将address="0.0.0.0"设置为connector时,server.xmlJun 26, 2015 2:59:59 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-bio-0.0.0.0-8080"] Jun 26, 2015 2:59:59 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 912 ms Jun 26, 2015 2:59:59 PM org.apache.catalina.core.StandardService startInternal INFO: Starting service Catalina Jun 26, 2015 2:59:59 PM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.26 Jun 26, 2015 2:59:59 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/manager.xml Jun 26, 2015 3:00:35 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [35,369] milliseconds. Jun 26, 2015 3:00:35 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/host-manager.xml Jun 26, 2015 3:00:35 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /var/lib/tomcat7/webapps/EHR_SE.war Jun 26, 2015 3:00:35 PM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(/var/lib/tomcat7/webapps/EHR_SE/WEB-INF/lib/javax.servlet-3.0.1.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class Jun 26, 2015 3:00:37 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-0.0.0.0-8080"] Jun 26, 2015 3:00:37 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 38384 ms

document.location = window.location.protocol + '//m.' + window.location.host + window.location.pathname;

我会感激任何帮助!

1 个答案:

答案 0 :(得分:0)

我找到了解决方案。

端口8080已关闭!