This article originates from: Http://blog.csdn.net/svitter
Citation: http://www.2cto.com/os/201305/209285.html
{Ubuntu views the program that occupies a port to view port usage, using the netstat command. To view the connected service ports (establishednetstat-a View all service ports (listen,established) Netstat-ap view 8080 ports, you can combine the grep command: Netstat-ap | grep 8080 If you look at Port 8888, enter it in the terminal: lsof-i:8888 to stop the program using this port, use Kill + corresponding PID in "terminal", Run "top" command can see the task that occupies the most system resources, press "Q" exit. Run "PS aux" to see all the running tasks (the term "process"). If you want to find a specific process, you can run: PS aux | grep program name if you want to end the process, you can run: kill-9 process number (the process number is the 4-digit number of the second column you see when you run the PS command)}
Use lsof I: (The Tomcat port number you are using), then kill the corresponding PID.
This may be because the non-root user does not have special permissions, causing the previously opened service to be closed.