Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

In ambari, how to find that the components NAMENODE and ZKFC were running on which host and on which port.

avatar
Contributor

Even when a host crashes, can I know on which port NAMENODE was listening on the crashed host ?

1 ACCEPTED SOLUTION

avatar
Super Guru

@Mukesh Burman

Login to Ambari - Click Services-> HDFS serivce->Summary->Click on Namenode <- a new page will open which will display hostname on top on which namenode is running. Same for ZKFC

2. ps -aef |grep nameode <-capture the pid from here [for eg say it is 3490

then do netstat for that pid to get the port -

netstat taupen |grep <pid/3490>

The 4th column in netstat o/p shows ipaddress:port no.

Difficult for namenode port even if service crash.

You should check namenode conf file for port on which namenode service will always start - /etc/hadoop/confhdfs-site.xml [port 8020,50070]

View solution in original post

2 REPLIES 2

avatar
Super Guru

@Mukesh Burman

Login to Ambari - Click Services-> HDFS serivce->Summary->Click on Namenode <- a new page will open which will display hostname on top on which namenode is running. Same for ZKFC

2. ps -aef |grep nameode <-capture the pid from here [for eg say it is 3490

then do netstat for that pid to get the port -

netstat taupen |grep <pid/3490>

The 4th column in netstat o/p shows ipaddress:port no.

Difficult for namenode port even if service crash.

You should check namenode conf file for port on which namenode service will always start - /etc/hadoop/confhdfs-site.xml [port 8020,50070]

avatar
Contributor

@Sagar Shimpi ThanksMan, it helped 🙂

For all two NAMENODE in my cluster I can initialize a ini file with component and port number, and later on after a node crashes, I can use this ini file for further recovery process...

Thanks again 🙂