Currently the urls generated by the jobtracker & namenode return either hostnames like bubbles.local or just bubbles. These end up not resolving unless the client machine has specified these in their /etc/hosts file.

When I run the hostname command on these machines it returns a hostname complete with the domain (E.G bubbles.example.com)

Running a small java test on these machines

InetAddress addr = InetAddress.getLocalHost();
byte[] ipAddr = addr.getAddress();
String hostname = addr.getHostName();

Produces output just like the hostname command.

Where else could hadoop be grabbing a hostname to use in its jobtracker / namenode UI?

This is occurring in clusters with Hadoop 1.0.3 and 1.0.4-SNAPSHOT from early august. The machines are running CentOS release 5.8 (Final).

The generated URLs I'm referring to are like this


or http://example.local:50075/browseDirectory.jsp?namenodeInfoPort=50070&dir=/

2 Answers 2


I managed to get the WebUI to use the full hostname by doing the following.

On each slave node and the master node the /etc/hosts file was modified to be something like this: machine1.example.com machine1 localhost
#These 4 lines appear on all of the machines machine1.example.com machine1 machine2.example.com machine2 machine3.example.com machine3 machine4.example.com machine4

Now when I click on URLs in the task tracker or the hdfs web tool they contain the nodes full hostname and resolve.


Where else could hadoop be grabbing a hostname to use in its jobtracker / namenode UI?


    The name of the default file system. Either the literal string
    "local" or a host:port for NDFS.


  • Those are HDFS protocol URLs. Is there something similar for the http urls, E.G http://datanode:50075/browseDirectory.jsp?namenodeInfoPort=50070&dir=/
    – Dan R
    Sep 4, 2012 at 18:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .