开发者

Why eclipse always complain that the tomcat server port is in use?

I have a eclipse web project source code, the name of the project is "My-Proj" .

I download Eclipse Java EE version (Indigo) , extract the achive, then I started the eclipse IDE. After I successfully installed tomcat7 server into the Eclpse IDE. I import my existing project to Eclipse IDE.

Then I run my imported project by choose "Run on server", but eclipse pop up the error message window like below:

Why eclipse always complain that the tomcat server port is in use?

I saw the port has been used, so I change the server running port by double click on tomcat server V7 under Eclipse "server" tab, and change the port to 8085 as below (see the right 开发者_开发知识库side of the image):

Please right click the image and view the image if you can not see clearly.

Why eclipse always complain that the tomcat server port is in use?

I run the project on server again , but I got the same error, port 8080 is in use, why? I have changed the port number to 8085, why it still complain the port 8080?


You need to change the one labeled "HTTP/1.1" not "Tomcat admin port" (in your image above on the right hand side where ports are).

Second you probably have an existing tomcat running that was not shutdown (unless you purposely have something else running on 8080). Shutdown eclipse and then look for any running java process that look like tomcat and kill them.


As Adam said, you'll need to change the HTTP/1.1 port if you want to have Eclipse's tomcat running on a different port to avoid the conflict.

However, this conflict is usually because your installed Tomcat is also running outside eclipse. You probably don't need two Tomcat instances running at the same time, so you might want to shut down the non-eclipse one. You can do this using the services panel in Windows, or using init.d on linux.


If you have multiple tomcat instances, try to change all ports in elipse - tomcat admin port, http/1.1, AJP. It works for me - I have eclipse from tomcat and netbeans on one machine. Remember about firewall - it may be problem.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜