Suddenly unable to start Apache? Solution here

Prelude (skip to solution)

Suddenly by seemingly no fault of my own I was unable to start Apache through the xampp control panel. I decided to investigate this further and ran apache_start.bat in cmd. This gave me the following output:

Diese Eingabeforderung nicht waehrend des Running beenden
Bitte erst bei einem gewollten Shutdown schliessen
Please close this command only for Shutdown
Apache 2 is starting …
(OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions.  : make_sock: c
ould not bind to address
no listening sockets available, shutting down
Unable to open logs

Apache konnte nicht gestartet werden
Apache could not be started
Press any key to continue . . .

Ok, so what exactly does this mean? It seems that Apache got some issues binding to port 80. Fair enough, let’s figure out what executable that’s listening to our dear port. I opened cmd and ran the command netstat -ao -p tcp. The very first line said the following:

Proto  Local Address          Foreign Address        State                   PID
TCP                Kjetil-PC:0                 LISTENING       4

Right, a process ID 4 is blocking our port. Checked it in task manager and the process with id 4 is System. We simply can’t close the process because that would kill the computer session..


Appearently a service called MsDepSvc (Web Deployment Agent Service) can trigger System to listen on port 80. Stop or close the service to solve the problem!

Credit to and stackoverflow.

This entry was posted in Programming and tagged , , , , , , , , , , , , , , , , , , . Bookmark the permalink.