working - how to find namenode port in hadoop

Default Namenode port of HDFS is 50070.But I have come across at some places 8020 or 9000 (5)

When I setup the hadoop cluster, I read the namenode runs on 50070 and I set up accordingly and it's running fine.

But in some books I have come across name node address :




What exactly is the proper number to set the port of namenode?

50070 is default UI port of Namenode for http. for https its 50470. 9000 is the IPC port(Inter Process Communicator). If you click on localhost:50070, you can see namenode configurations with an overview 9000 (active) and on localhost:9000 you will get message: "It looks like you are making an HTTP request to a Hadoop IPC port. This is not the correct port for the web interface on this daemon." required for file system metadata operations.

That is because default is different for different hadoop configurations and distributions. We can always configure port by changing or fs.defaultFS properties as below in core-site.xml


For Hadoop 1.0.4 if I dont mention port number like below


then default port taken is 8020. But for some of the version like .20 i read it is 9000. So it is dependent on the version of hadoop you are using.

But all the configuration and distributation are using 50070 as standard port number for HDFS ui.

The default Hadoop ports are as follows: (HTTP ports, they have WEB UI):

Daemon                   Default Port  Configuration Parameter
-----------------------  ------------ ----------------------------------
Namenode                 50070        dfs.http.address
Datanodes                50075        dfs.datanode.http.address
Secondarynamenode        50090        dfs.secondary.http.address
Backup/Checkpoint node?  50105        dfs.backup.http.address
Jobracker                50030        mapred.job.tracker.http.address
Tasktrackers             50060        mapred.task.tracker.http.address

Internally, Hadoop mostly uses Hadoop IPC, which stands for Inter Process Communicator, to communicate amongst servers. The following table presents the ports and protocols that Hadoop uses. This table does not include the HTTP ports mentioned above.

Daemon      Default Port        Configuration Parameter     
Namenode    8020               
Datanode    50010               dfs.datanode.address        
Datanode    50020               dfs.datanode.ipc.address                                    
Backupnode  50100               dfs.backup.address          

check out this link For more info: