Support Questions

Find answers, ask questions, and share your expertise

How to access resource manager api in a kerborized cluster

avatar

I am running the below command

curl -v -u username -H "Accept: application/json" -X GET "http://resource_manager_host:8088/ws/v1/cluster"

Ref: https://hadoop.apache.org/docs/r2.7.2/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html

The url http://resource_manager_host:8088/ws/v1/cluster is returning valid results in browser.

I have also used options like --negotiate, --anyauth but errors out with the same message "Authentication required". The command is able to connect to the server.

============================================= * About to connect() to tdhfd6n3.thehartford.com port 8088 (#0)

* Trying 39.8.32.4... connected

* Connected to tdhfd6n3.thehartford.com (39.8.32.4) port 8088 (#0)

> GET /ws/v1/cluster HTTP/1.1

> User-Agent: curl/7.19.7 (x86_64-suse-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8j zlib/1.2.7 libidn/1.10

> Host: tdhfd6n3.thehartford.com:8088

> Accept: */*

>

< HTTP/1.1 401 Authentication required

< Cache-Control: must-revalidate,no-cache,no-store

< Date: Wed, 23 Nov 2016 15:27:54 GMT

< Pragma: no-cache

< Date: Wed, 23 Nov 2016 15:27:54 GMT

< Pragma: no-cache

< Content-Type: text/html; charset=iso-8859-1

< WWW-Authenticate: Negotiate

< Set-Cookie: hadoop.auth=; Path=/; Domain=xyz.com; Expires=Thu, 01-Jan-1970 00:00:00 GMT; HttpOnly

< Content-Length: 1406

< Server: Jetty(6.1.26.hwx)

<

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>

<title>Error 401 Authentication required</title>

</head>

<body><h2>HTTP ERROR 401</h2>

<p>Problem accessing /ws/v1/cluster. Reason:

<pre> Authentication required</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/> ================================================

Any help will be appreciated.

Thank you

1 ACCEPTED SOLUTION

avatar
Master Guru

You need to do a kinit first then

and then for example like on webhdfs

curl --negotiate -u : http://xxxx.xxxx.xxxx.com:50070/webhdfs/v1/user?op=liststatus

View solution in original post

2 REPLIES 2

avatar
Master Guru

You need to do a kinit first then

and then for example like on webhdfs

curl --negotiate -u : http://xxxx.xxxx.xxxx.com:50070/webhdfs/v1/user?op=liststatus

avatar

Thanks for the prompt response. The solution worked.