- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
HDP3.0: knox fails to dispatch webhdfs request due to whitelist validation
Created ‎08-21-2018 07:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using HDP3.0 and ambari 2.7 blueprint. webhdfs via knox failed due to:
2018-08-21 19:26:33,035 ERROR knox.gateway (GatewayDispatchFilter.java:isDispatchAllowed(155)) - The dispatch to http://myhost.com:50070/webhdfs/v1/user was disallowed because it fails the dispatch whitelist validation. See documentation for dispatch whitelisting.
I have verified webhdfs without knox works:
curl -vvv http://myhost.com:50070/webhdfs/v1/user/?op=LISTSTATUS
Also, ambari, zeppelin and ranger UI work fine via knox.
The knox settings are:
gateway.dispatch.whitelist: DEFAULT gateway.dispatch.whitelist.services: DATANODE,HBASEUI,HDFSUI,JOBHISTORYUI,NODEUI,RESOURCEMANAGER,WEBHBASE,WEBHDFS,YARNUI
webhdfs via knox worked for me on HDP2.6. Any idea? Appreciate any help.
Created ‎08-22-2018 10:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
None of Ambari, Zeppelin, or RangerUI are affected by this whitelisting.
Can you see the default whitelist in gateway.log?
It should say something like
Applying a derived dispatch whitelist because none is configured in gateway-site: xxxxxxx
Created ‎05-20-2019 03:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have fill that property with
gateway.dispatch.whitelist --> ^https?:\/\/(my.domain.com|127\.0\.0\.1|0:0:0:0:0:0:0:1|::1):[0-9].*$
But i have all the time the same error
ERROR knox.gateway (GatewayDispatchFilter.java:isDispatchAllowed(155)) - The dispatch to http://my.domain.com:50070/webhdfs/v1/ was disallowed because it fails the dispatch whitelist validation. See documentation for dispatch whitelisting.
Thanks
Created ‎06-13-2019 02:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I ran into a similar issue to this as well. It looks like when it derives the RegEX based off the DEFAULT. We found that it used the URL from the Provider we used setting up the SSO client we had typed in just the Hostname for the Knox Server. It then resulted in the following Default white list:
INFO knox.gateway (WhitelistUtils.java:getDispatchWhitelist(63)) - Applying a derived dispatch whitelist because none is configured in gateway-site: ^/.*$;^https?://ambari30l:[0-9]+/?.*$
After redoing the SSO setup with the FQDN for the host it resolved the "DEFAULT" Lookup and was able to find the hosts properly.
INFO knox.gateway (WhitelistUtils.java:getDispatchWhitelist(63)) - Applying a derived dispatch whitelist because none is configured in gateway-site: ^/.*$;^https?://ambari30l.mydomain.com:[0-9]+/?.*$
Hopefully this help others in troubleshooting this issue in the future.
Created ‎01-03-2023 12:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ssumers,
Can you please share the value you added in gateway.dispatch.whitelist?

- « Previous
-
- 1
- 2
- Next »