我部署了一个新版本的.war文件,tomcat7也运行良好,如状态所示:
root@s17298254:/var/lib/tomcat7/webapps# service tomcat7 status
* Tomcat servlet engine is running with pid 11331
现在的问题是,我既不能查看网站,也不能在我的web浏览器中查看管理器界面。请注意,我是在生产环境中使用这个tomcat实例的。原因是什么呢?
我已经尝试了很多事情,比如以root用户运行tomcat(虽然是灾难接收,但至少可以使事情暂时工作),将
useIPVHosts="true"
<<Connector>
等。这是我的catalina.out:>
Mar 12, 2014 7:04:24 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server:/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk-amd64/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
Mar 12, 2014 7:04:25 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'xmlValidation' to 'false' did not find a matching property.
Mar 12, 2014 7:04:25 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'xmlNamespaceAware' to 'false' did not find a matching property.
Mar 12, 2014 7:04:25 AM org.apache.tomcat.util.digester.Digester endElement
WARNING: No rules found matching 'Server/Service/Engine/Host/Logger'.
Mar 12, 2014 7:04:25 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-80"]
Mar 12, 2014 7:04:25 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Mar 12, 2014 7:04:25 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2038 ms
Mar 12, 2014 7:04:25 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Mar 12, 2014 7:04:25 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.26
Mar 12, 2014 7:04:26 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/var/lib/tomcat7/webapps/camriders/WEB-INF/lib/servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Mar 12, 2014 7:04:27 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://www.springframework.org/tags is already defined
Mar 12, 2014 7:04:31 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
它没有显示任何致病性。那么是什么原因导致我的网站现在不再工作了呢?
编辑:当我在浏览器中输入mywebsite.mydomain.net时错误是:
Firefox无法与mywebsite.mydomain.net服务器建立连接。与google chrome类似。
在tomcat 7中使用'xmlValidation'和'xmlNamespaceAware'作为上下文元素
<Context path="" docBase="ROOT" xmlValidation="false" xmlNamespaceAware="false"/>