Ajay Kulkarni
Ajay Kulkarni

Reputation: 3039

Tomcat 8 port issue while lauching jsp programs via eclipse

I just wrote a project for online banking by using jsp. I integrated tomcat 8 with eclipse and when I launch the project by using tomcat 8 in eclipse, I get the following error:

Several ports (8005, 8080, 8009) required by Tomcat v8.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).  

But I've made sure that apache uses port 80. How can I resolve this error?

When I launch tomcat in firefox, I get the error like this:
error
How can I fix this one?

Upvotes: 0

Views: 19824

Answers (7)

Darshan Patel
Darshan Patel

Reputation: 2899

1) Check and identify which process is using that ports and kill it if it is used by Java. Sometimes crashing of eclipse led to ports open.

In Linux,

Check your running ports using : netstat -lnp | grep 8080

Check your running processes using : ps -Af | grep java

2) In case, you don't want to affect that running process then you can change ports by editing TOMCAT_HOME/conf/server.xml

Refer How to change tomcat default port.

Upvotes: 0

marcello.hk
marcello.hk

Reputation: 1

on eclipse ide

1 - Windows -> Show view -> Other...
2 - search "Servers" -> Open
3 - search in tabs "Servers" and double click im "Tomcat v8.0 Server at localhost"
4 - in Ports "Port Name" u change the ports
....4.1* Tomcat admin port -> change "8005" to "8006"
....4.2* HTTP/1.1 > change "8080" to "8081"
....4.3* AJP /1.3 > change "8009" to "8010"

sorry for wrong words.

Upvotes: 0

Manohar Manu
Manohar Manu

Reputation: 11

When you try to run a jsp program on Tomcat server in eclipse, you are getting the below error in the eclipse console "Several ports (8005, 8080, 8009) required by Tomcat v6.0 Server at localhost are already in use."

Solution

The issue is because you've another instance of Tomcat already running. To solve this 1. Go to bin folder of Tomcat (eg C:\apache-tomcat-7.0.23\bin ) 2. Run startup.bat 3. Run shutdown.bat 4. Start the tomcat from eclipse

Upvotes: 1

Harshad Holkar
Harshad Holkar

Reputation: 1

Change the port numbers. Earlier mine was

Tomcat Admin Port : 8005(I changed it to 8006) HTTP : 8080 (I changed it to 8081). AJP : 8009 (I changed it to 8010).

Change the port number and the thing will work out for you. See the port number

Upvotes: 0

Jirson Tavera
Jirson Tavera

Reputation: 1333

You have other instance of Tomcat Running, to resolve it you should to shutdown it.

got to /bin subfolder on the tomcat installation folder and execute shutdown.xx file:

Depending shutdown.bash for windows or shutdown.sh for unix.

Upvotes: 3

iamsuman
iamsuman

Reputation: 1413

1) Go to conf folder in tomcat installation directory

e.g. C:\Tomcat 6.0\conf\

2) Edit following tag in server.xml file

<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>

3) Change the port=8080 value to port=8081

4) Save the file

5) Restart the server

Upvotes: 3

morewater
morewater

Reputation: 67

Maybe you can change the port number in tomcat/conf/server.xml

Or you may use netstat(if in windows) to watch what process is already used the port.

Upvotes: 0

Related Questions