XAMPP: Another web server daemon is already running?

If:

lsof -Pi |grep 8080        returns no results
netstat -na |grep 8080     returns no results
ps -ef                     shows no web server processes

Then maybe there's a lockfile lying around that the startup is checking against? Those are typically found under /var/run but don't necessarily have to. At this point I would usually run strace to see what's going on:

strace -e read=all -e write=all -f -o strace.out your_startup_command

Then open up strace.out, search for the "..is already running" string in the output, and starting looking at lines above it to see what is failing.


 sudo rm /opt/lampp/logs/httpd.pid
// get listen pid
 sudo netstat -nap | grep :80

example of output:

tcp6   0  0 :::80  :::*  LISTEN  14417/httpd

PID is 14417

kill proc

 sudo kill 14417

start/restart lampp server

 sudo /opt/lampp/lampp restart

I didn't have any server running either, but I found this command that saved me:

sudo lsof -i :80

It displayed something like this for me:

COMMAND     PID    USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
Skype      4275    root   61u  IPv4 0x869da9d5a8e5506b      0t0  TCP *:http (LISTEN)

So killing Skype made it work.