Reputation: 21
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.
Upvotes: 2
Views: 16838
Reputation: 101
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}')
Upvotes: 2
Reputation: 762
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.
Upvotes: 4