Support Questions

Find answers, ask questions, and share your expertise

HDP 2.5: Knox WebHDFS access Error in NameNode HA

Explorer

After configured NameNode HA in Ambari, I have installed Knox service in Ambari,

When I try to access WebHDFS using curl command,

curl -iku guest:guest-password -X GET 'https://knok-server-host:8443/gateway/default/webhdfs/v1/?op=LISTSTATUS'

I got the below Error,

HTTP/1.1 403 Forbidden Date: Mon, 23 Jan 2017 06:51:22 GMT

Set-Cookie: JSESSIONID=xpjz6kvusr321aosq4ijbgcdr;

Path=/gateway/default;Secure;HttpOnly Expires: Thu, 01 Jan 1970 00:00:00 GMT

Set-Cookie: rememberMe=deleteMe; Path=/gateway/default;

Max-Age=0; Expires=Sun, 22-Jan-2017 06:51:22 GMT

Cache-Control: no-cache

Expires: Mon, 23 Jan 2017 06:51:22 GMT Date: Mon, 23 Jan 2017 06:51:22 GMT

Pragma: no-cache

Expires: Mon, 23 Jan 2017 06:51:22 GMT Date: Mon, 23 Jan 2017 06:51:22 GMT

Pragma: no-cache

Content-Type: application/json;

charset=UTF-8 X-FRAME-OPTIONS: SAMEORIGIN Server: Jetty(6.1.26.hwx) Content-Length: 179

{"RemoteException":{"exception":"StandbyException","javaClassName":"org.apache.hadoop.ipc.StandbyException","message":"Operation category READ is not supported in state standby"}}

Is there any changes to be made in hdfs configuration files?

Note: I have installed Knox using Ambari and I hope Ambari will take care of the configuration updates.

1 REPLY 1

Cloudera Employee

Looking at the error message you're getting it looks like it might be a configuration error. Without seeing your exact Knox Topology I can't say for sure, but If you can verify your provider information is configured like examples laid out in the doc it should be able to handle switching HA Namenodes for you.

8.11. Setting Up Knox Services for HA:

http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.3/bk_security/content/setting_up_knox_services...

8.11.2. Configure WebHDFS for Knox

http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.3/bk_security/content/configure_webhdfs_for_k...

Thanks,

-Scott