0

When using the 'netstat' Linux command to verify that my Hadoop Namenode machine was functioning correctly, I noticed that the Namenode's primary port, '8020' did not show up as actively listening though all Hadoop processes could properly connect and work properly. Moreover, I was able to run 'telnet mydnshostname 8020' and successfully open a connection, indicating this socket was correctly listening despite its conspicuous absence from netstat's list.

This is the first time I've noticed an open socket not appearing in netstat's list. Is it because Hadoop Namenode communication is based on a proprietary IPC protocol? This protocol seems to be TCP-based, so I don't understand why it's not showing up.

In summary:

  1. Why/how are there open sockets that netstat misses?
  2. Any lower-level Linux commands/functions to show all sockets, including ones that netstat misses for ones reason or another?
4

1 回答 1

2

好吧,这是另一个 *facepalm * 时刻。

事实证明,TCP 端口 8020 也是一个名为“intu-ec-svcdisc”的协议常用的端口,因此 netstat 试图通过将端口 8020 上的所有套接字识别为该服务名称来提供帮助。

用更通用/实用的术语来说,如果您在定位特定打开的套接字并知道端口号时遇到问题,请确保传递 netstat '-n' 选项,以便它停止尝试根据端口号识别协议并显示整个列表的数字!

于 2013-07-09T19:48:00.267 回答