Sometimes when we start a project in Eclipse, the Tomcat server will give an error, showing 8080, 8009, 8005 ports are occupied, when you start the project with debug will find no use, console console what information is not, This problem occurs because the port is occupied. The solution is as follows:
1. Start the----> Run---->cmd, or the WINDOW+R key combination to bring up the command window
2. Enter the command: Netstat-ano, which lists all port conditions. In the list we look at the occupied port, such as 49157, and find it first.
3. View the PID of the occupied port, input command: Netstat-aon|findstr "49157", enter, note the last digit, namely PID, here is 2720
4. Continue entering Tasklist|findstr "2720", enter to see which process or program is taking up 2720 ports, the result is: Svchost.exe
5. Now that the results are clear, we can then go to the service area in the Control Panel to view the process and manually turn it off. You can also turn it off by command in cmd, type: taskkill/f/t/im Tencentdl.exe. Red is the process name that occupies the port.
6. Restart the project and find that the problem is resolved.
Eclipse launches Tomcat with 8080,8009,8005 Port occupied issue