1

How can I set the IP address that Hadoop HDFS should listen on? Currently, when I run netstat I see its on 127.0.0.1:9000. This makes access HDFS impossible from another node in the cluster. I get connection refused error when running application.

I want it to appear as my-machine-name:9000 instead of 127.0.0.1:9000. My core-site.xml file is

<property>
      <name>fs.defaultFS</name>
      <value>my-machine-name:9000/</value>
</property>
nikk
  • 2,627
  • 5
  • 30
  • 51

1 Answers1

0

Add/edit this line in /etc/host file on your local machine(client node)

127.0.0.1 localhost my-machine-name

Similarly add this line to your cluster nodes /etc/hosts where 198.1.1.1 being public ip of client node(this command should give you public ip: ipconfig or hostname -i - make sure to run it on client node)

198.1.1.1 my-machine-name
Ronak Patel
  • 3,819
  • 1
  • 16
  • 29
  • Just did exactly so. When job running, `call from cluster-node: connection refused.` so from cluster node, I do `nmap -p 9000 my-machine-name` I get `connection refused`. my-machine-name is the driver code. – nikk Jul 25 '16 at 02:01
  • 1
    Check on your client node that if something else is running on port 9000 `netstat -a|grep 9000`- also check firewall settings – Ronak Patel Jul 25 '16 at 11:40