Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hadoop, mail # user - REST API returning op not supported


Copy link to this message
-
Re: REST API returning op not supported
Arpit Gupta 2012-07-18, 21:24
Hi Corbett,
Make sure that the port you are using is the namenode http port, it should be the same port that you use to access the namenode ui. Check the property "dfs.http.address" in your hdfs-site.xml. It defaults to 50070. 50075 is the default http port for the datanode. If you are using the correct port then

can you try running the following command
bin/hadoop --config your_conf_dir dfs -ls webhdfs://my-hadoop-host:50075/
and see if that works or not?
Could you also share the namenode logs from when these commands were run.

Make sure that the property "dfs.webhdfs.enabled" is set to true on the name node and the datanodes.

Also take a look at http://hadoop.apache.org/common/docs/r1.0.3/webhdfs.html#Authentication and use the appropriate call based on whether you are on a secure cluster or not.

--
Arpit Gupta
Hortonworks Inc.
http://hortonworks.com/

On Jul 18, 2012, at 1:48 PM, Corbett Martin wrote:

> Hadoop newbie here...
>
> Trying to make a REST call from curl but no matter what I try I'm always getting this exception:
>
> curl -i -X PUT "http://my-hadoop-host:50075/webhdfs/v1/user/hduser/foo?op=MKDIRS"
>
> HTTP/1.1 400 Bad Request
> Content-Type: application/json
> Transfer-Encoding: chunked
> Server: Jetty(6.1.26)
>
> {"RemoteException":{"exception":"UnsupportedOperationException","javaClassName":"java.lang.UnsupportedOperationException","message":"op=MKDIRS is not supported"}}
>
> Same result different operation:
>
> curl -i "http://my-hadoop-host:50075/webhdfs/v1/user/hduser?op=LISTSTATUS"
> HTTP/1.1 400 Bad Request
> Content-Type: application/json
> Transfer-Encoding: chunked
> Server: Jetty(6.1.26)
>
> {"RemoteException":{"exception":"UnsupportedOperationException","javaClassName":"java.lang.UnsupportedOperationException","message":"op=LISTSTATUS is not supported"}}
>
> Any ideas what's wrong?  Running Hadoop 1.0.2 with this in my hdfs-site.xml
>
>  <property>
>    <name>dfs.webhdfs.enabled</name>
>    <value>true</value>
>    <description>Enable or disable webhdfs. Defaults to false</description>
>  </property>
>
> Thanks in advance
>
>
> ________________________________
> This message and its contents (to include attachments) are the property of National Health Systems, Inc. and may contain confidential and proprietary information. This email and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. You are hereby notified that any unauthorized disclosure, copying, or distribution of this message, or the taking of any unauthorized action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately and notify the sender immediately by telephone or by replying to this transmission.