Getting HTTP error 404 accessing Hue via Knox
Support Question
How to solve the following issue?
We run CDP 7.1.7 SP2 CHF 18.
We followed Cloudera's description "CDP 7.1.7 / Authenticating Hue users with Knox SSO".
- The details given below are redacted -
Issue
With a newly started browser Knox was called, having no Cookies cached.
When connecting the service Hue a second time by clicking the appropriate icon in Knox, it works fine. The URL https://knox.mydomain.com/gateway/Business/hue/hue/editor/?type=impala is used.
The first connection to Hue via Knox fails, and the browser calls the URL https://knox.mydomain.com/gateway/Business/hue/%3FdoAs%3Duserid.
We get an HTTP error 404 (Page not found) with following details:
| Request Method: | GET |
| Request URL: | https://hue_loadbalancer.mydomain.com:8888/%3FdoAs%3Duserid?doAs=userid |
followed by the message
Using the URLconf defined in desktop.urls, Django tried these URL patterns, in this order: 1. ^hue/accounts/login [name='desktop_auth_views_dt_login'] The current path, ?doAs=userid, didn't match any of these. |
Configuration
Excerpt of XML configuration file of the default topology (we called it "Business.xml"):
<?xml version="1.0" encoding="utf-8"?>
<!--==============================================-->
<!-- DO NOT EDIT. This is an auto-generated file. -->
<!--==============================================-->
<topology>
<generated>true</generated>
<gateway>
<provider>
<role>federation</role>
<name>SSOCookieProvider</name>
<enabled>true</enabled>
<param>
<name>sso.authentication.provider.url</name>
<value>https://knox_host.mydomain.com:8443/gateway/knoxsso/api/v1/websso</value>
</param>
</provider>
<provider>
<role>identity-assertion</role>
<name>HadoopGroupProvider</name>
<enabled>true</enabled>
<param>
<name>CENTRAL_GROUP_CONFIG_PREFIX</name>
<value>gateway.group.config.</value>
</param>
</provider>
<provider>
<role>authorization</role>
<name>XASecurePDPKnox</name>
<enabled>true</enabled>
</provider>
<provider>
<role>ha</role>
<name>HaProvider</name>
<enabled>true</enabled>
<!-- ... -->
<param>
<name>HUE</name>
<value>enabled=true;maxFailoverAttempts=3;failoverSleep=1000;maxRetryAttempts=300;retrySleep=1000</value>
</param>
<!-- ... -->
</provider>
</gateway>
<service>
<role>HUE</role>
<url>https://hue_loadbalancer_host.mydomain.com:8888</url>
<param>
<name>httpclient.connectionTimeout</name>
<value>5m</value>
</param>
<param>
<name>httpclient.socketTimeout</name>
<value>5m</value>
</param>
</service>
<!-- ... -->
</topology>

