在端口80 Mac OSX上杀死未知的自动重启服务器 [英] Killing an unknown self restarting server on port 80 Mac OSX

查看:149
本文介绍了在端口80 Mac OSX上杀死未知的自动重启服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行在端口80上的服务器,但是我不知道它是什么或它来自哪里.当我跑步

I have a server running on port 80, but I do not know what it is or where it came from. When I run

sudo lsof -i :80 | grep LISTEN

我知道

httpd      80    root    5u  IPv6 0x91f5a9de62859cfd      0t0  TCP *:http (LISTEN)
httpd     694    _www    5u  IPv6 0x91f5a9de62859cfd      0t0  TCP *:http (LISTEN)

我试图输入使用PID来获取进程名称,但是我得到的只是"httpd"或"FOREGROUND".

I have tried to enter get the process name using the PID, but all I ever get in return is "httpd" or "FOREGROUND".

当我终止PID时,该过程将简单地以新的PID重新开始.我认为我必须在启动时停止它.

When I kill the PID, the process simply restarts with a new PID. I assume I will have to stop it at launch.

如何在启动时阻止该服务器运行?

How can I stop this server from running at startup?

如果有帮助,我尝试释放端口80以使用MAMP上的apache服务器.

If it helps any, I am trying to free up port 80 to use the apache server on MAMP.

推荐答案

这只是一个猜测,但这可能是apache的内置版本,是通过启动(OS X的守护程序管理器)启动(和重新启动)的. .默认情况下它是禁用的,但是可能已经启用了.您可以尝试通过以下方式禁用它:

This is just a guess, but it might be the built-in version of apache, being launched (& restarted) by launchd (OS X's daemon manager). It's disabled by default, but might've gotten enabled somehow. You can try disabling it with:

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

如果那样做(它会说类似找不到指定的服务"),则可以通过查找主进程的PID(一个)来检查它是否是其他启动守护程序项.以root而不是_www的身份运行):

If that doesn't do it (it'll say something like "Could not find specified service"), you can check to see if it's some other launch daemon item by looking for the PID of the master process (the one running as root, not _www):

sudo launchctl list | grep <masterPID>

不一定会告诉您发生了什么事,但可能会指出正确的方向.

That won't necessarily tell you exactly what's going on, but might point you in the right direction.

这篇关于在端口80 Mac OSX上杀死未知的自动重启服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆