Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 06-29-2018 02:56 PM
my rest server is up and running and the following command works
[root@hadoop1 ~]# curl --negotiate -u : 'http://hadoop1:17001/status/cluster'
1 live servers, 0 dead servers, 6.0000 average load
1 live servers
hadoop5.xxx.com:16020 1530282635984
requests=0, regions=6
heapSizeMB=145
maxHeapSizeMB=2007
but the other curl commands are failing with authentication error . I have a Kerberos ticket acquired from
/etc/security/keytabs/hbase.service.keytab
[root@hadoop1 ~]# curl -H "Accept: text/xml" http://hadoop1:17001/version <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 /version. Reason: <pre> Authentication required</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/> <br/>
Created 06-29-2018 03:04 PM
You have to use negotiate for all the curl calls
curl --negotiate -u -H "Accept: text/xml" http://hadoop1:17001/version
Created 06-29-2018 03:23 PM
also this command works
# curl --negotiate -i -u : -X GET -H "Accept: text/xml" http://$(hostname):17001/ HTTP/1.1 401 Authentication required WWW-Authenticate: Negotiate Set-Cookie: hadoop.auth=; Path=/; HttpOnly Content-Type: text/html; charset=iso-8859-1 Cache-Control: must-revalidate,no-cache,no-store Content-Length: 1393 HTTP/1.1 200 OK Set-Cookie: hadoop.auth="u=hbase&p=hbase/[email protected]&t=kerberos&e=1530321348642&s=D797P7EN3+vVCB0S2WblChieQrs="; Path=/; HttpOnly Content-Type: text/xml Cache-Control: no-cache Content-Length: 141 <?xml version="1.0" encoding="UTF-8" standalone="yes"?><TableList><table name="UFM"/><table name="WZ"/><table name="state_code"/></TableList>[root@hadoop1 ~]#
but this command fails
# curl -H "Accept: text/xml" http://$(hostname):17001/ <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 /. Reason: <pre> Authentication required</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/> <br/>