如何查看哪些进程在Mac OS X上的端口8001上侦听?找不到在Mac OS X上的端口8001上侦听哪个进程
我已经试过几个命令:
lsof -i | grep LISTEN
qbittorre 321 user 26u IPv4 0xc8e6037f28270c31 0t0 TCP *:6881 (LISTEN)
qbittorre 321 user 27u IPv6 0xc8e6037f216348e1 0t0 TCP *:6881 (LISTEN)
mysqld 14131 user 10u IPv4 0xc8e6037f3218da91 0t0 TCP *:mysql (LISTEN)
httpd 14133 user 16u IPv6 0xc8e6037f216352e1 0t0 TCP *:http (LISTEN)
httpd 14135 user 16u IPv6 0xc8e6037f216352e1 0t0 TCP *:http (LISTEN)
httpd 14136 user 16u IPv6 0xc8e6037f216352e1 0t0 TCP *:http (LISTEN)
httpd 14137 user 16u IPv6 0xc8e6037f216352e1 0t0 TCP *:http (LISTEN)
httpd 14138 user 16u IPv6 0xc8e6037f216352e1 0t0 TCP *:http (LISTEN)
httpd 14139 user 16u IPv6 0xc8e6037f216352e1 0t0 TCP *:http (LISTEN)
httpd 14148 user 16u IPv6 0xc8e6037f216352e1 0t0 TCP *:http (LISTEN)
httpd 14149 user 16u IPv6 0xc8e6037f216352e1 0t0 TCP *:http (LISTEN)
httpd 14150 user 16u IPv6 0xc8e6037f216352e1 0t0 TCP *:http (LISTEN)
Skype 14543 user 57u IPv4 0xc8e6037f324f9a91 0t0 TCP *:18666 (LISTEN)
java 24640 user 68u IPv6 0xc8e6037f3295a3e1 0t0 TCP *:http-alt (LISTEN)
java 24640 user 73u IPv6 0xc8e6037f32958fe1 0t0 TCP *:8009 (LISTEN)
java 24640 user 101u IPv6 0xc8e6037f32959ee1 0t0 TCP localhost:8005 (LISTEN)
lsof的:
须藤lsof的-nPi -sTCP:听| grep的8001
没有发现
的netstat:
netstat的-a | grep的8001
没有发现
我知道该端口是被人利用,因为我试图改变Emacs的简单的httpd默认的httpd端口从8080(默认值)到8001,它失败:
Warning (initialization): An error occurred while loading `/Users/user/.emacs':
File error: Cannot bind server socket, address already in use
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the `--debug-init' option to view a complete error backtrace.
我该如何解决?我也尝试将端口设置为8002,同样的问题,并没有找到哪个进程正在侦听端口8002.
什么是问题的根源?
编辑:使用NMAP我发现,端口8001是使用VCOM隧道服务及其封闭端口和端口8002使用teradataordbms并且也被关闭。
这些服务用于什么?我可以禁用它们并使用其占用的端口吗?
参见[这个问题](http://stackoverflow.com/q/4421633/113848)。 – legoscia 2014-12-03 10:48:24
我试过'sudo lsof -n -i4TCP:8001 | grep LISTEN'但没有。这似乎是8001端口不使用,但我不明白为什么我不断收到emacs简单httpd错误... – tonix 2014-12-03 11:04:00
请检查我的编辑! – tonix 2014-12-03 11:56:09