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?
Eternal Rubyist
  • 3,445
  • 4
  • 34
  • 51
  • One possible reason for netstat not reporting anything listening on 8020 may be port forwarding. Maybe the Namenode listens on some other port, and your machine or a router is configured to forward connections to 8020 to this other port? – Jan Wrobel Jul 09 '13 at 19:46

1 Answers1

2

Well this is another one of those *facepalm* moments.

It turns out that TCP port 8020 is also a port commonly used by a protocol called "intu-ec-svcdisc," so netstat was trying to be helpful by identifying all my sockets on port 8020 to this service name.

In more generic/practical terms, if you're having trouble locating a particular open socket and know the port number, make sure pass netstat the '-n' option so it stops trying to identify the protocol based on the port number and displays the whole list numerically!

Eternal Rubyist
  • 3,445
  • 4
  • 34
  • 51