Process already running on port


#1

I opened my workspace and ran my project but it seems there is already something running. I can’t find the tab where this is running from. How can I see what’s running and stop it if I choose?


How to run Tomcat?
#2

You can have a look at what processes are taking up certain ports with (using sudo in case there are system processes):
sudo netstat -tulpn
Now you should be able to see what ports are being used (look for 8080, or 8081 or 8082 if you’re using those). To kill the process on port 8080 run:
sudo fuser -k 8080/tcp

Source: http://www.cyberciti.biz/faq/what-process-has-open-linux-port/


#3

4 posts were split to a new topic: Run PHP app on custom port


#4

What should we do when we get an error like the one below. The error came about after using

sudo fuser -k 8080/tcp

Error:

Cannot stat file /proc/4245/fd/0: Permission denied
Cannot stat file /proc/4245/fd/1: Permission denied
Cannot stat file /proc/4245/fd/2: Permission denied
Cannot stat file /proc/4245/fd/3: Permission denied
Cannot stat file /proc/4245/fd/4: Permission denied
Cannot stat file /proc/4245/fd/5: Permission denied
Cannot stat file /proc/4245/fd/6: Permission denied
Cannot stat file /proc/4245/fd/7: Permission denied
Cannot stat file /proc/4245/fd/8: Permission denied
Cannot stat file /proc/4245/fd/9: Permission denied
Cannot stat file /proc/4246/fd/0: Permission denied
Cannot stat file /proc/4246/fd/1: Permission denied
Cannot stat file /proc/4246/fd/2: Permission denied
Cannot stat file /proc/4247/fd/0: Permission denied
Cannot stat file /proc/4247/fd/1: Permission denied
Cannot stat file /proc/4247/fd/2: Permission denied
Cannot stat file /proc/4247/fd/255: Permission denied
Cannot stat file /proc/7105/fd/0: Permission denied
Cannot stat file /proc/7105/fd/1: Permission denied
Cannot stat file /proc/7105/fd/2: Permission denied
Cannot stat file /proc/7105/fd/3: Permission denied
Cannot stat file /proc/7105/fd/4: Permission denied
Cannot stat file /proc/7105/fd/5: Permission denied
Cannot stat file /proc/7105/fd/6: Permission denied
Cannot stat file /proc/7105/fd/7: Permission denied
Cannot stat file /proc/7105/fd/8: Permission denied
Cannot stat file /proc/7105/fd/9: Permission denied
Cannot stat file /proc/7105/fd/10: Permission denied
Cannot stat file /proc/7105/fd/11: Permission denied
Cannot stat file /proc/7105/fd/12: Permission denied
Cannot stat file /proc/44956/fd/0: Permission denied
Cannot stat file /proc/44956/fd/1: Permission denied
Cannot stat file /proc/44956/fd/2: Permission denied
Cannot stat file /proc/44956/fd/3: Permission denied
Cannot stat file /proc/44956/fd/4: Permission denied
Cannot stat file /proc/44956/fd/5: Permission denied
Cannot stat file /proc/44956/fd/6: Permission denied
Cannot stat file /proc/44956/fd/7: Permission denied
Cannot stat file /proc/44956/fd/8: Permission denied
Cannot stat file /proc/44956/fd/9: Permission denied
Cannot stat file /proc/44956/fd/10: Permission denied
Cannot stat file /proc/44956/fd/11: Permission denied
Cannot stat file /proc/44956/fd/12: Permission denied
Cannot stat file /proc/44956/fd/13: Permission denied
Cannot stat file /proc/44956/fd/15: Permission denied
Cannot stat file /proc/44956/fd/17: Permission denied
Cannot stat file /proc/44956/fd/18: Permission denied
Cannot stat file /proc/47252/fd/0: Permission denied
Cannot stat file /proc/47252/fd/1: Permission denied
Cannot stat file /proc/47252/fd/2: Permission denied
Cannot stat file /proc/47252/fd/3: Permission denied
Cannot stat file /proc/47252/fd/4: Permission denied
Cannot stat file /proc/47252/fd/5: Permission denied
Cannot stat file /proc/47252/fd/6: Permission denied
Cannot stat file /proc/47252/fd/7: Permission denied
Cannot stat file /proc/47252/fd/8: Permission denied
Cannot stat file /proc/47252/fd/9: Permission denied
Cannot stat file /proc/47252/fd/10: Permission denied
Cannot stat file /proc/47252/fd/11: Permission denied
Cannot stat file /proc/47252/fd/12: Permission denied
Cannot stat file /proc/47259/fd/0: Permission denied
Cannot stat file /proc/47259/fd/1: Permission denied
Cannot stat file /proc/47259/fd/2: Permission denied
Cannot stat file /proc/47259/fd/3: Permission denied
Cannot stat file /proc/47259/fd/4: Permission denied
Cannot stat file /proc/47259/fd/5: Permission denied
Cannot stat file /proc/47259/fd/6: Permission denied
Cannot stat file /proc/47259/fd/7: Permission denied
Cannot stat file /proc/47259/fd/8: Permission denied
Cannot stat file /proc/47259/fd/9: Permission denied
Cannot stat file /proc/47259/fd/10: Permission denied
Cannot stat file /proc/47259/fd/11: Permission denied
Cannot stat file /proc/47259/fd/12: Permission denied
Cannot stat file /proc/47259/fd/13: Permission denied
Cannot stat file /proc/47260/fd/0: Permission denied
Cannot stat file /proc/47260/fd/1: Permission denied
Cannot stat file /proc/47260/fd/2: Permission denied
Cannot stat file /proc/47260/fd/3: Permission denied
Cannot stat file /proc/47260/fd/4: Permission denied
Cannot stat file /proc/47260/fd/5: Permission denied
Cannot stat file /proc/47260/fd/6: Permission denied
Cannot stat file /proc/47260/fd/7: Permission denied
Cannot stat file /proc/47260/fd/8: Permission denied
Cannot stat file /proc/47260/fd/9: Permission denied
Cannot stat file /proc/47260/fd/10: Permission denied
Cannot stat file /proc/47260/fd/11: Permission denied
Cannot stat file /proc/47260/fd/12: Permission denied
Cannot stat file /proc/47260/fd/13: Permission denied
Cannot stat file /proc/47261/fd/0: Permission denied
Cannot stat file /proc/47261/fd/1: Permission denied
Cannot stat file /proc/47261/fd/2: Permission denied
Cannot stat file /proc/47261/fd/3: Permission denied
Cannot stat file /proc/47261/fd/4: Permission denied
Cannot stat file /proc/47261/fd/5: Permission denied
Cannot stat file /proc/47261/fd/6: Permission denied
Cannot stat file /proc/47261/fd/7: Permission denied
Cannot stat file /proc/47261/fd/8: Permission denied
Cannot stat file /proc/47261/fd/9: Permission denied
Cannot stat file /proc/47261/fd/10: Permission denied
Cannot stat file /proc/47261/fd/11: Permission denied
Cannot stat file /proc/47261/fd/12: Permission denied
Cannot stat file /proc/47261/fd/13: Permission denied
Cannot stat file /proc/47262/fd/0: Permission denied
Cannot stat file /proc/47262/fd/1: Permission denied
Cannot stat file /proc/47262/fd/2: Permission denied
Cannot stat file /proc/47262/fd/3: Permission denied
Cannot stat file /proc/47262/fd/4: Permission denied
Cannot stat file /proc/47262/fd/5: Permission denied
Cannot stat file /proc/47262/fd/6: Permission denied
Cannot stat file /proc/47262/fd/7: Permission denied
Cannot stat file /proc/47262/fd/8: Permission denied
Cannot stat file /proc/47262/fd/9: Permission denied
Cannot stat file /proc/47262/fd/10: Permission denied
Cannot stat file /proc/47262/fd/11: Permission denied
Cannot stat file /proc/47262/fd/12: Permission denied
Cannot stat file /proc/47262/fd/13: Permission denied
Cannot stat file /proc/47263/fd/0: Permission denied
Cannot stat file /proc/47263/fd/1: Permission denied
Cannot stat file /proc/47263/fd/2: Permission denied
Cannot stat file /proc/47263/fd/3: Permission denied
Cannot stat file /proc/47263/fd/4: Permission denied
Cannot stat file /proc/47263/fd/5: Permission denied
Cannot stat file /proc/47263/fd/6: Permission denied
Cannot stat file /proc/47263/fd/7: Permission denied
Cannot stat file /proc/47263/fd/8: Permission denied
Cannot stat file /proc/47263/fd/9: Permission denied
Cannot stat file /proc/47263/fd/10: Permission denied
Cannot stat file /proc/47263/fd/11: Permission denied
Cannot stat file /proc/47263/fd/12: Permission denied
Cannot stat file /proc/47263/fd/13: Permission denied
Cannot stat file /proc/47421/fd/0: Permission denied
Cannot stat file /proc/47421/fd/1: Permission denied
Cannot stat file /proc/47421/fd/2: Permission denied
Cannot stat file /proc/47421/fd/3: Permission denied
Cannot stat file /proc/47421/fd/4: Permission denied
Cannot stat file /proc/47421/fd/5: Permission denied
Cannot stat file /proc/47421/fd/6: Permission denied
Cannot stat file /proc/47445/fd/0: Permission denied
Cannot stat file /proc/47445/fd/1: Permission denied
Cannot stat file /proc/47445/fd/2: Permission denied
Cannot stat file /proc/47445/fd/3: Permission denied
Cannot stat file /proc/47445/fd/6: Permission denied
Cannot stat file /proc/47445/fd/7: Permission denied


#5

This seems to do the trick.

kill -9 $(lsof -i :8080 -t); 

Don’t exactly know why. So if anyone could elaborate, please do.


#6

This part searches for a process that is occupying port 8080 and it returns the process ID. Then kill -9 kills the process that was running on 8080 so now it’s free to be used by your new application that you want to run :wink:


#7

Wow, thank you for helping me on this