Support Questions

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

Setting the NameNode port (8020) to listen outside of localhost

avatar
New Contributor

I have manually installed CDH4 on a machine according to the default configurations given in the Cloudera installation documentation.

 

http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH4/4.2.1/CDH4-Installation-Guide/CD...

 

I configured the machine to run in pseudo-distributed mode and the pseudo-cluster is working as expected when using the HDFS and MapReduce programs on the machine itself.

 

However, I have an application that is need of access to the NameNode port (8020). I am unable to make a connection to this port from an external machine despite having this port opened on the firewall. I found that the NameNode service is only listening on the localhost, thus rejecting requests from outside machines to communicate on this port.

 

$ sudo netstat -tulpn | grep :8020
tcp        0      0 127.0.0.1:8020              0.0.0.0:*                   LISTEN      16504/java

 

I want this service to listen to requests outside of the machine itself, just like I can communicate through port 50030 or 50070 on another machine. I have configured vi /etc/hadoop/conf.pseudo.mr1/core-site.xml to reference the machine name (hadoop) rather than localhost:

 

<property>
  <name>fs.default.name</name>
  <value>hdfs://hadoop:8020</value>
</property>


After restarting the NameNode service, I find that it is still only listening of 127.0.0.1. Is there any way to open to this port up for external usage?

1 ACCEPTED SOLUTION

avatar
New Contributor

I found the solution. I had neglected to find the article detailing network configuration which specified that the /etc/hosts file should have the fully-qualified domain name listed, not just the machine name.

 

http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH4/4.2.1/CDH4-Installation-Guide/cd...

View solution in original post

4 REPLIES 4

avatar
New Contributor

I found the solution. I had neglected to find the article detailing network configuration which specified that the /etc/hosts file should have the fully-qualified domain name listed, not just the machine name.

 

http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH4/4.2.1/CDH4-Installation-Guide/cd...

avatar
Guru

Thanks for closing the loop with us and posting back the solution, JakeZ

avatar
New Contributor

The solution is much Simpler

 

In the HDFS configuration in cloudera there is a property called

Bind NameNode to Wildcard Address. You just need to check the box and it will bind the service on 0.0.0.0

 

then restart hdfs service

 

[cloudera@localhost ~]$ sudo netstat -tulpn | grep :8020
tcp 0 0 0.0.0.0:8020 0.0.0.0:* LISTEN 29966/java

 

avatar
Explorer

Please guide how to follow step by step. thank you very much!