Linux XAMPP:另一个 Web 服务器守护进程已经在运行?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17037937/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
XAMPP: Another web server daemon is already running?
提问by ComputerFellow
I have painfully analyzed all of yesterday if I had another apache/web-server instance running, with all of these commands
如果我有另一个 apache/web-server 实例在运行,我已经痛苦地分析了昨天的所有这些命令
ps aux
ps -e
lsof
netstat tunap
I DO NOT have another instance of Apache or ANY OTHER server running at port 8080.
我没有在端口 8080 上运行的另一个 Apache 实例或任何其他服务器。
Yet, XAMPP gives me this:
然而,XAMPP 给了我这个:
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.
我还编辑了 httpd.conf 以侦听端口 9876,但仍然相同。
采纳答案by gunglefunk
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:
那么也许有一个启动文件正在检查的锁定文件?这些通常在 /var/run 下找到,但不一定必须。在这一点上,我通常会运行 strace 来查看发生了什么:
strace -e read=all -e write=all -f -o strace.out your_startup_command
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.
然后打开 strace.out,在输出中搜索“..is already running”字符串,并开始查看其上方的行以查看失败的内容。
回答by lgx
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.
所以杀死 Skype 使它起作用。
回答by Chiragit007
Below command should work in all scenarios to stop Mysql services :
下面的命令应该适用于所有场景来停止 Mysql 服务:
sudo service mysql stop
After tapping this start lampp service using below command :
使用以下命令点击此启动 lampp 服务后:
sudo /opt/lampp/lampp start
回答by Xoco
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:
这个解决方案似乎有效。您必须重新启动lampp:
sudo /opt/lampp/lampp restart
Solution tested for Ubuntu 12.04 after a similar problem.
在出现类似问题后针对 Ubuntu 12.04 测试的解决方案。
回答by Federico Traiman
I solved this problem disabling ssl port
我通过禁用 ssl 端口解决了这个问题
sudo /opt/lampp/lampp disablessl
and then
进而
sudo /opt/lampp/lampp start
回答by Mohamed Elbahja
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
PID 是 14417
kill proc
杀死进程
sudo kill 14417
start/restart lampp server
启动/重启 lampp 服务器
sudo /opt/lampp/lampp restart
回答by devnull
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.
如果您将 xampp apache 更改为侦听另一个端口(/opt/lampp/etc/httpd.conf --> “Listen 80”现在是“Listen 82”),那么您还必须更改 / opt/lampp/xampp 启动脚本。
Just search in the /opt/lampp/xampp for the line with
只需在 /opt/lampp/xampp 中搜索与
'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.
有了它,您可以在端口 82 上启动 xampp,并使您的常规网络服务器在端口 80 上运行。
回答by Abhishek Sinha
The above solution didn't work for me. But this solution did -
上述解决方案对我不起作用。但是这个解决方案确实 -
sudo apachectl stop
And then restart apache, mysql if XAMPP GUI is available or restart from terminal (in Ubuntu) -
如果 XAMPP GUI 可用或从终端重新启动(在 Ubuntu 中),然后重新启动 apache、mysql -
sudo /opt/lampp/lampp restart
回答by Archana Sharma
you can do that from a command shell using:
您可以使用以下命令从命令外壳执行此操作:
sudo netstat -ltnp | grep :80
In the last column you'll see: pid / process_name.You can use later, below command to stop the process:
在最后一列中,您将看到:pid / process_name。您可以稍后使用以下命令来停止进程:
ps aux | grep process_name
after this try to restart lampp, using :: sudo /opt/lampp/lampp restart
在此之后尝试重新启动lampp,使用:: sudo /opt/lampp/lampp restart
回答by Shohidur Rahman
Below command should work for me
下面的命令应该对我有用
sudo service apache2 stop
then
然后
sudo /opt/lampp/lampp restart