You are trying to connect to the NameNode IPC socket (port 9000) and not to the web socket (which is 50075 by default). Try instead:
http://172.16.18.50:50075/webhdfs/v1/?op=GETHOMEDIRECTORY
In addition, your configuration in hdfs-site.xml should be true
and not enabled
as its value:
hdfs-site.xml ----
<configuration> <property> <name>dfs.replication</name> <value>2</value> </property> <property> <name>dfs.webhdfs.enabled</name> <value>true</value> </property> </configuration>
To make sure everything works, look at the logs for your namenode, you should see something like:
2012-05-22 06:23:42,176 INFO org.apache.hadoop.http.HttpServer: dfs.webhdfs.enabled = true 2012-05-22 06:23:42,177 INFO org.apache.hadoop.http.HttpServer: Added filter 'SPNEGO' (class=org.apache.hadoop.hdfs.web.AuthFilter) 2012-05-22 06:23:42,179 INFO org.apache.hadoop.http.HttpServer: addJerseyResourcePackage: packageName=org.apache.hadoop.hdfs.server.namenode.web.resources;org.apache.hadoop.hdfs.web.resources, pathSpec=/webhdfs/v1
At the moment, I assume yours says:
2012-05-22 06:11:20,676 INFO org.apache.hadoop.http.HttpServer: dfs.webhdfs.enabled = false
source share