XAMPP: Another web server daemon is already running?

38,055

Solution 1

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.

Solution 2

 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

Solution 3

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.

Solution 4

Mind the port-check in start-script

If you changed your xampp apache to listen to another port (/opt/lampp/etc/httpd.conf --> "Listen 80" is now "Listen 82"), then you also have to change the port-check in the /opt/lampp/xampp start script.

Just search in the /opt/lampp/xampp for the line with

'Another web server is already running.'

and search in the previous lines for:

if testport 80

change it to:

if testport 82

With that you can start an xampp on port 82 and keep your regular webserver on port 80 running.

Solution 5

sudo /etc/init.d/apache2 stop
sudo /etc/init.d/mysql stop
sudo /etc/init.d/proftpd stop

This solution seems to work. You must restart lampp:

sudo /opt/lampp/lampp restart

Solution tested for Ubuntu 12.04 after a similar problem.

Share:
38,055
ComputerFellow
Author by

ComputerFellow

Updated on June 05, 2021

Comments

  • ComputerFellow
    ComputerFellow almost 3 years

    I have painfully analyzed all of yesterday if I had another apache/web-server instance running, with all of these commands

    ps aux
    ps -e
    lsof 
    netstat tunap
    

    I DO NOT have another instance of Apache or ANY OTHER server running at port 8080.

    Yet, XAMPP gives me this:

    XAMPP: Another web server daemon is already running
    

    What should I do?

    I also edited httpd.conf to LISTEN to port 9876, and still the same.

  • physicalattraction
    physicalattraction almost 9 years
    Please reply in English.
  • Federico Traiman
    Federico Traiman over 7 years
    I translated the solution you offered and It doesn't work
  • mohitesachin217
    mohitesachin217 over 4 years
    I don't know how to thank you for this... it worked Thank you..:)