Tomcat不是通过Eclipse启动(超时) [英] Tomcat Not Starting Through Eclipse (Timeout)

查看:137
本文介绍了Tomcat不是通过Eclipse启动(超时)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过Eclipse运行Tomcat。这是我过去几年所做的事情。昨天工作,现在不行。我得到的错误是

 服务器Tomcat v7.0本地主机上的服务器在45秒内无法启动。如果服务器需要更多时间,请尝试在服务器编辑器中增加超时时间。 

输出是

  2012年7月6日8:32:26 PM org.apache.catalina.core.AprLifecycleListener init 
INFO:基于APR的Apache Tomcat Native库,在生产环境中没有找到最佳性能java.library.path:D:\Program Files\Java\jdk1.7.0_05\bin; C:\Windows\Sun\Java\bin; C:\Windows\system32; C:\Windows; C:\程序文件(x86)\NVIDIA Corporation\PhysX\Common; C:\Windows\system32; C:\Windows; C:\Windows\System32\\ \\ Wbem; C:\Windows\System32\WindowsPowerShell\v1.0\; C:\程序文件(x86)\QuickTime\QTSystem\; D:\Launch; D:\ Program Files\Java\jdk1.7.0_05\bin;%PROGRAMFILES%\Internet Explorer; C:\Program Files(x86)\SMLNJ\bin\; D:\Program Files\TortoiseSVN \bin; C:\ghc\ghc-6.6\bin; D:\程序文件\MySQL\MySQL Server 5.5\bin;%ANT_HOME%/ bin; D:\Program文件(x86)\Microsoft SQL Server\100\Tools\Binn\; D:\程序文件\Microsoft SQL Server\100\Tools\Binn\; D:\Program Files\Microsoft SQL Server\100\DTS\Binn\; D:\Program文件(x86 )\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\; C:\程序文件(x86)\Microsoft Visual Studio 9.0\Common7\IDE\ PrivateAssemblies\; D:\Program文件(x86)\Microsoft SQL Server\100\DTS\Binn\; D:\Program文件(86x)\ ;.
Jul 06,2012 8:32:26 PM org.apache.coyote.AbstractProtocol init
INFO:初始化ProtocolHandler [http-bio-8080]
2012年7月6日8:32 :26 PM org.apache.coyote.AbstractProtocol init
INFO:初始化ProtocolHandler [ajp-bio-8009]
2012年7月6日下午8:32:26 org.apache.catalina.startup。 Catalina加载
INFO:初始化处理在468毫秒
2012年7月6日8:32:26 org.apache.catalina.core.StandardService startInternal
信息:启动服务Catalina
2012年7月6日上午8:32:26 org.apache.catalina.core.StandardEngine startInternal
INFO:启动Servlet引擎:Apache Tomcat / 7.0.28
2012年7月6日下午8:32:26 org.apache.catalina.startup.HostConfig deployDirectory
INFO:部署Web应用程序目录D:\Program Files\Java\apache-tomcat-7.0.28\webapps\docs
Jul 06 ,2012 8:32:26 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO:部署Web应用程序目录D:\Program Files\\ Java \apache-tomcat-7.0.28\webapps\examples
2012年7月6日8:32:26 PM org.apache.catalina.core.ApplicationContext log
INFO:ContextListener:contextInitialized )
Jul 06,2012 8:32:26 PM org.apache.catalina.core.ApplicationContext log
INFO:SessionListener:contextInitialized()
2012年7月6日8:32:26 PM org.apache.catalina.core.ApplicationContext log
INFO:ContextListener:attributeAdded('org.apache.jasper.compiler.TldLocationsCache','org.apache.jasper.compiler.TldLocationsCache@5710ddf9')
2012年7月6日8:32:26 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO:部署Web应用程序目录D:\Program Files\Java\apache-tomcat-7.0.28\ webapps\host-manager
2012年7月6日8:32:26 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO:部署Web应用程序目录D:\Program Files\Java\\ \\apache-tomcat-7.0.28\webapps\manager
2012年7月6日8:3 2:26 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO:部署Web应用程序目录D:\Program Files\Java\apache-tomcat-7.0.28\webapps\ROOT
Jul 06,2012 8:32:26 PM org.apache.coyote.AbstractProtocol start
INFO:启动ProtocolHandler [http-bio-8080]
2012年7月6日8:32:26 PM org.apache.coyote.AbstractProtocol start
INFO:启动ProtocolHandler [ajp-bio-8009]
2012年7月6日下午8:32:26 org.apache.catalina.startup.Catalina开始
INFO:服务器启动504 ms

我已经看了几个小时的解决方案现在。但是我没有取得任何成功,可能是一件简单的事情。我尝试了以下内容:


  1. 删除在eclipse中服务并重新制作

  2. 重新启动计算机,日食

  3. 重新安装eclipse,tomcat

  4. 使用-clean启动Eclipse

  5. 启动没有Web应用程序的服务器

  6. 增加超时时间

我可以从命令行启动tomcat。但是,我需要通过eclipse运行它进行调试。我知道这个SO帖子,并且已经经历了许多其他的无效。



想法?



更新:我只是意识到服务器启动。但是,eclipse的最后一个功能之一就是失败。我观察到的是将超时设置为10分钟。在那段时间内我可以访问服务器,但是并不是eclipse的调试功能。所以Eclipse启动它,尝试做一些事情,一些事情永远不会完成,Eclipse会在超时时间之后关闭Tomcat。



更新:回顾当这个问题出现时发生的事情,计算机显然安装了一个Java更新。

解决方案

对于我来说,Java更新引起了同样的问题(等等)。该更新导致Eclipse在ping Tomcat时使用ipv6,并且由于某些原因,我的设置不起作用。



我通过添加

  -Djava.net.preferIPv4Stack = true 

eclipse.ini


I am trying to run Tomcat through Eclipse. This is something that I have done for the past several years. It was working yesterday and now it is not. The error I get is

Server Tomcat v7.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.

The Output is

Jul 06, 2012 8:32:26 PM 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: D:\Program Files\Java\jdk1.7.0_05\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\QuickTime\QTSystem\;D:\Launch;D:\Program Files\Java\jdk1.7.0_05\bin;%PROGRAMFILES%\Internet Explorer;C:\Program Files (x86)\SMLNJ\bin\;D:\Program Files\TortoiseSVN\bin;C:\ghc\ghc-6.6\bin;D:\Program Files\MySQL\MySQL Server 5.5\bin;%ANT_HOME%/bin;D:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;D:\Program Files\Microsoft SQL Server\100\Tools\Binn\;D:\Program Files\Microsoft SQL Server\100\DTS\Binn\;D:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;D:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;D:\Program Files (86x)\;.
Jul 06, 2012 8:32:26 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jul 06, 2012 8:32:26 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jul 06, 2012 8:32:26 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 468 ms
Jul 06, 2012 8:32:26 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jul 06, 2012 8:32:26 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.28
Jul 06, 2012 8:32:26 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Program Files\Java\apache-tomcat-7.0.28\webapps\docs
Jul 06, 2012 8:32:26 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Program Files\Java\apache-tomcat-7.0.28\webapps\examples
Jul 06, 2012 8:32:26 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jul 06, 2012 8:32:26 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jul 06, 2012 8:32:26 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@5710ddf9')
Jul 06, 2012 8:32:26 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Program Files\Java\apache-tomcat-7.0.28\webapps\host-manager
Jul 06, 2012 8:32:26 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Program Files\Java\apache-tomcat-7.0.28\webapps\manager
Jul 06, 2012 8:32:26 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Program Files\Java\apache-tomcat-7.0.28\webapps\ROOT
Jul 06, 2012 8:32:26 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jul 06, 2012 8:32:26 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jul 06, 2012 8:32:26 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 504 ms

I have looked around for a solution for several hours now. But I have not had any success and it likely is something simple. I have tried the following:

  1. Delete Serve and remake it in eclipse
  2. Restart computer, eclipse
  3. Reinstall eclipse, tomcat
  4. Start Eclipse with -clean
  5. Start server with no web app
  6. Increasing the timeout

I am able to start tomcat from command line just fine. However, I need to run it through eclipse to debug. I am aware of this SO post and have gone through it and many others to no avail.

Thoughts?

UPDATE: I just realized that the server does start up. However, one of the final functions that eclipse does, fails. How I observed this is by setting the timeout to 10 min. I was able to access the server during that time, however not the debug functionality of eclipse. So Eclipse starts it up, tries do something, that something never completes, Eclipse shuts down Tomcat after that timeout period.

UPDATE: Looking back at what happened around when this problem arose, the computer apparently installed a Java update.

解决方案

A Java update caused the same problem (among others) for me. The update caused Eclipse to use ipv6 when pinging Tomcat and for some reason that doesn't work with my setup.

I fixed it by adding

-Djava.net.preferIPv4Stack=true

To eclipse.ini.

这篇关于Tomcat不是通过Eclipse启动(超时)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆