Tomcat有时候不会通过eclipse在ubuntu14.04中启动

时间:2014-10-07 05:46:36

标签: java eclipse tomcat

我正在使用eclipse的tomcat服务器来完成我的项目。这些天它工作正常。但是从3天开始,tomcat有时候不会从eclipse开始。我检查了互联网并尝试了很多解决方案。甚至在与此问题相关的堆栈溢出的其他帖子中给出的解决方案也没有帮助我。控制台消息是

Oct 07, 2014 11:08:06 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/java/ packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Oct 07, 2014 11:08:06 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:dims' did not find a matching property.
Oct 07, 2014 11:08:06 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:DReST' did not find a matching property.
Oct 07, 2014 11:08:06 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8181"]
Oct 07, 2014 11:08:06 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Oct 07, 2014 11:08:06 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 303 ms
Oct 07, 2014 11:08:06 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Oct 07, 2014 11:08:06 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.54
Oct 07, 2014 11:08:07 AM org.apache.tiles.impl.BasicTilesContainer init
INFO: Initializing Tiles2 container. . .
Oct 07, 2014 11:08:07 AM org.apache.tiles.impl.BasicTilesContainer initializeDefinitionsFactory
INFO: Tiles2 container initialization complete.
Oct 07, 2014 11:08:07 AM org.apache.tiles.access.TilesAccess setContainer
INFO: Publishing TilesContext for context: org.apache.catalina.core.ApplicationContextFacade
Oct 07, 2014 11:08:07 AM com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
INFO: Parsing configuration file [struts-default.xml]
Oct 07, 2014 11:08:07 AM com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
INFO: Parsing configuration file [struts-plugin.xml]
Oct 07, 2014 11:08:07 AM com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
INFO: Parsing configuration file [struts.xml]
Oct 07, 2014 11:08:07 AM org.apache.struts2.config.BeanSelectionProvider info
INFO: Loading global messages from ApplicationResources
Servlet Context --call back method--contextInitialized()
/home/saipavan/apache-tomcat-7.0.54/wtpwebapps/dims/StudentDao.properties
/home/saipavan/apache-tomcat-7.0.54/wtpwebapps/dims/
/home/saipavan/apache-tomcat-7.0.54/wtpwebapps/dims/
/home/saipavan/apache-tomcat-7.0.54/wtpwebapps/dims/
/home/saipavan/apache-tomcat-7.0.54/wtpwebapps/dims/
/home/saipavan/apache-tomcat-7.0.54/wtpwebapps/dims/
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/saipavan/apache-tomcat-7.0.54/webapps/manager
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /home/saipavan/apache-tomcat-7.0.54/webapps/manager has finished in 75 ms
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/saipavan/apache-tomcat-7.0.54/webapps/ROOT
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /home/saipavan/apache-tomcat-7.0.54/webapps/ROOT has finished in 67 ms
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/saipavan/apache-tomcat-7.0.54/webapps/host-manager
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /home/saipavan/apache-tomcat-7.0.54/webapps/host-manager has finished in 70 ms
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/saipavan/apache-tomcat-7.0.54/webapps/examples
Oct 07, 2014 11:08:09 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Oct 07, 2014 11:08:09 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Oct 07, 2014 11:08:09 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@7e7a19e7')
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /home/saipavan/apache-tomcat-7.0.54/webapps/examples has finished in 142 ms
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/saipavan/apache-tomcat-7.0.54/webapps/docs
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /home/saipavan/apache-tomcat-7.0.54/webapps/docs has finished in 68 ms
Oct 07, 2014 11:08:09 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8181"]
Oct 07, 2014 11:08:09 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2670 ms

我可以通过终端启动tomcat。但是当我尝试在启动后在浏览器中打开tomcat时,我收到错误

Firefox can't establish a connection to the server at localhost:8181.

可能是什么问题?谁能帮我?三江源。

1 个答案:

答案 0 :(得分:0)

似乎localhost没有解析为IP地址。尝试ping localhost ping -c localhost或尝试使用系统IP地址而不是localhost。