Today, I found that my apache cannot be started. The log shows that the 80 product has been occupied by the application. Next, let's take the program that is occupied by port 80 as an example, we can use some methods to check whether other ports are occupied by the program.
Start-run-cmd enter the command prompt and enter netstat-ano. Then you can see all connected PIDs and find the program corresponding to the PID in the task manager. If no PID exists in the task manager, you can select "View"-"Select column" in the task manager"
Often, when we start an application, we find that the ports required by the system are occupied by other programs. How do we know who owns the ports we need, next we will introduce a very simple method and hope it will be useful to you.
We need to determine who is using port 80.
Run the following command in the windows command line window:
The Code is as follows: |
Copy code |
C:/> netstat-aon | findstr "80 ″ TCP 0.0.0.0: 19780 0.0.0.0: 0 LISTENING 2044 TCP 10.72.224.5: 2558 96.17.109.8: 80 ESTABLISHED 2044 TCP 10.72.224.5: 2757 60.210.176.209: 80 TIME_WAIT 0 TCP 10.72.224.5: 3956 125.46.1.234: 80 ESTABLISHED 2044 TCP 10.72.224.5: 3959 125.46.1.234: 80 ESTABLISHED 2044 UDP 0.0.0.0: 2280 *: * 3700 |
As you can see, the port is occupied by a process with the process number 2044. Continue to execute the following command:
The Code is as follows: |
Copy code |
C:/> tasklist | findstr "2044 ″ Avp.exe 2044 Console 0 37,680 K |
Obviously, avp Kabbah listens to port 80 and adjusts the Kabbah network listening settings.
Of course, if your port 80 is occupied by other programs, kill or adjust the port.