简体   繁体   English

从Eclipse启动Tomcat时超时

[英]Timeout when starting Tomcat from Eclipse

My server.xml is configured to use Apache in connection to Tomcat. 我的server.xml配置为使用Apache连接到Tomcat。 If I start Tomcat with startup.sh, it works fine because I can access a simple html-file located in webapps/ROOT at port 80 and 443. Netstat -tulpn shows that a java process occupies the 8005 and 8009 ports. 如果我用startup.sh启动Tomcat,它可以正常工作,因为我可以访问位于webapps / ROOT端口80和443上的简单html文件。Netstat -tulpn显示Java进程占用了8005和8009端口。 Then I run shutdown.sh, and the netstat shows the ports are no longer occupied. 然后,我运行shutdown.sh,netstat显示端口不再被占用。 I try to start Tomcat from Eclipse. 我尝试从Eclipse启动Tomcat。 The console says it is started within 10000ms. 控制台说它在10000毫秒内启动。 The ports 8005 and 8009 are occupied by a javaprocess, but in Eclipse I get timeout, and the state of the server is 'Starting'. 端口8005和8009被javaprocess占用,但是在Eclipse中我超时了,服务器的状态为“正在启动”。 I try to start a html-script that calls the restful web service, but I get 503 Service unavailable. 我尝试启动调用静态Web服务的html脚本,但是我无法获得503服务。 I've stuggled with this the whole day. 我整天都在努力。 I do not understand what to do with this. 我不知道该怎么办。 Please help ! 请帮忙 !

I have just solved this problem. 我刚刚解决了这个问题。 It was due to my java version 8 was not supported by Tomcat version 8.5. 这是由于Tomcat 8.5不支持我的Java版本8。 I had to install tomcat version 9. Then I got another problem when I added tomcat to Eclipse. 我必须安装tomcat版本9。然后,当我将tomcat添加到Eclipse时,又遇到了另一个问题。 That was Unknown version of Tomcat. 那是Tomcat的未知版本。 I eventually solved that problem too by setting my user as the owner of the apache-tomcat-directory. 我最终也通过将用户设置为apache-tomcat-目录的所有者来解决了该问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM