Mellon
Mellon

Reputation: 38902

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:

enter image description here

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. enter image description here

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?

Upvotes: 2

Views: 9993

Answers (3)

liquide
liquide

Reputation: 1383

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.

Upvotes: 0

Timothy Jones
Timothy Jones

Reputation: 22165

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.

Upvotes: 0

Adam Gent
Adam Gent

Reputation: 49095

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.

Upvotes: 6

Related Questions