Linux下为什么端口开着但是进程却不存在? – hao32的个人日志

www.hao32.com · · 824 次点击 · · 开始浏览    
这是一个创建于 的文章,其中的信息可能已经有所发展或是发生改变。

 

一次偶然事件,我检查某台服务器系统时发现一个从来没见过的端口处于监听(LISTEN)状态,于是开始仔细检查系统。

[root@db097 ~]# netstat -lnpt | grep 7979
tcp 0 0 0.0.0.0:7979 0.0.0.0:* LISTEN -

进程里什么都没有,试了多种办法试着去找一下,都是一样的结果。

[root@db097 ~]# lsof -i:7979

 

google了半天,最后一段话提示了我:

I realized it’s an port opened by kernel, that’s why it won’t show up with program name. For the port like this, it may relate to NFS and OCFS stuff, or something like that, or it could be a kernel bug. If you need to find more details, check kernel logs for OOPS and bug.

 

应该是内核的问题,可能是和NFS有关,因为我也在使用NFS,或者别的可能性,总之大概是内核的bug,愿意细节的同学,建议去搜索一下内核log。

nmap扫下确认一下:

[root@db097 ~]# nmap -sV -p 7979 localhost
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2015-06-12 21:41 EDT
Interesting ports on db097.surrey.com (127.0.0.1):
PORT STATE SERVICE VERSION
7979/tcp open rpc
Nmap finished: 1 IP address (1 host up) scanned in 6.033 seconds

本文参考:http://www.admon.org/faqs/why-network-port-is-open-but-no-process-attached/

824 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传
X
登录和大家一起探讨吧