开发者

Tomcat not starting from eclipse

开发者 https://www.devze.com 2023-03-27 15:32 出处:网络
I\'m trying to start tomcat server 6.0.32 (NOT MY APP) from eclipse but it fails with error \"Server Apache Tomcat v6.0.32 at localhost failed to start\". But when I\'m starting it with startup.bat it

I'm trying to start tomcat server 6.0.32 (NOT MY APP) from eclipse but it fails with error "Server Apache Tomcat v6.0.32 at localhost failed to start". But when I'm starting it with startup.bat it is ok. I checked all ports for tomcat - they are free. Here it is a console log

11.08.2011 15:15:46 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: <MY_PATH_VARIABLE>
11.08.2011 15:15:47 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
11.08.2011 15:15:47 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1068 ms
11.08.2011 15:15:47 org.apache.catalina.core.StandardService start开发者_StackOverflow
INFO: Starting service Catalina
11.08.2011 15:15:47 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
11.08.2011 15:15:47 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor ProjectName.xml

Maybe someone know how to fix it?((((


I had the same problem i.e. no errors in any of the logs, and the server started fine when launched from the command line using run.sh. However as soon as I used Eclipse (without or without my app) Tomcat wouldn't start at all.

I solved this problem by performing the following steps:

  1. In Eclipse, go to the 'Servers' tab.
  2. Double click the server.
  3. A configuration overview should be displayed in the main Eclipse panel.
  4. Under the sub-section 'Server Locations', select the radio button 'Use Tomcat Installation' (for me this was the middle radio button).
  5. Save the configuration (you should be prompted to do so anyway).
  6. Restart your server, and you should find localhost:8080 works from within the Eclipse browser.


In Eclipse, go to:

Window -> Preferences -> Server -> Runtime Environments

And add Apache Tomcat.

Hope this helps.


The APR is the Apache Portable Runtime. This is a native (non-java) library that can improve the performance of Tomcat in certain situations.

Tomcat Native Library installation in Windows


In my case it was not starting and stucked at

INFO: Starting Servlet Engine: Apache Tomcat/8.5.32

Because the database connection configuration was wrong in context.xml, the ip:port were wrong, I changed it to currently working port and republish tomcat and its started working


In my case, the problem came from an impossible loopback on localhost.

Tomcat effectively started (I could call "http://localhost:8080/myApp"), but Eclipse didn't get a response of that and it considered Tomcat keep on starting.

A software called ZScaler (set by admin to protect the enterprise) on Windows 10 put loopback restrictions. Fortunately, an option existed to disable loopback restrictions on ZScaler.

A VPN may cause the same restrictions.

If you don't find which application cause th trouble, you can change "Host name" in Eclipse's Tomcat General Informations, from "localhost" to "yourIP" (ex : 179.25.14.178), BUT this trick won't allow DEBUG MODE.

0

精彩评论

暂无评论...
验证码 换一张
取 消