简体   繁体   中英

Port 8005 Required by Tomcat, already in use

I am attempting to refresh my knowledge of Java. I've downloaded and started using Eclipse Mars. I was following a tutorial that uses Tomcat. I tried to create and start a server. I received the following message in the image: Port 8005 is in use .

I checked and surely it is but I don't know what is using it or how to either stop that process or make Tomcat use another port. Thank you in advance for the help.

Tomcat uses -

8005,8080,8009

Those three ports.

Open up command prompt -

 C:\.....>netstat -o -n -a | findstr 0.0:8080
 TCP    0.0.0.0:8080      0.0.0.0:0              LISTENING       1220
 C:\....\username>taskkill /F /PID 1220

It will kill that task.Try it.

METHOD 1

ps -aef | grep java | grep apache | awk '8005'

list of process running with this port will display with its process id.

pick the process id say 1090.

kill -9 1090

METHOD 2

This will kill all the process with tomcat kill $(ps -aef | grep java | grep apache | awk '{print $2}')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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