Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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=/

share|improve this question
up vote 2 down vote accepted

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 localhost
#These 4 lines appear on all of the machines machine1 machine2 machine3 machine4

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

share|improve this answer

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.


share|improve this answer
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 '12 at 18:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.