Support Questions

Find answers, ask questions, and share your expertise

Hue via Knox – “Snippet type 1 is not configured” & WSGIRequest serialization error after upgrade

avatar
New Contributor

Hello,

After upgrading CDP Private Cloud Base
**from 7.1.7-1.cdh7.1.7.p2000.37147774 to 7.1.9-1.cdh7.1.9.p1013.58158856**,
we can no longer access Hive databases through Hue behind Knox
(Authentication backend: `KnoxSpnegoDjangoBackend
### Symptoms
1. Hue UI displays
Snippet type 1 is not configured.`).
2. Hive databases and tables are no longer listed.
3. Hue logs (`runcpserver.log`) show
TypeError: Object of type WSGIRequest is not JSON serializable
### Context
* Hue is managed by Cloudera Manager; authentication is Knox → LDAP (Active Directory).
* Hive is accessed through Knox (HTTPS 8443).
* OS: RHEL 8.6; Python 3.8 shipped with the parcel.

**Knox gateway log** records the following cookie-related error
(ResponseProcessCookies.java:processCookies(130)) - Invalid cookie header:
"Set-Cookie: csrftoken=1pPR9AOs9sRQaRGMxEws09bexNRMYg7W8SgJZGAlUzkBHZInYBs3IOaLBFisJjZj;
expires=Tue, 12 May 2026 09:13:19 GMT; HttpOnly; Max-Age=31449600; Path=/;
SameSite=Lax; Secure". Invalid 'expires' attribute: Tue, 12 May 2026 09:13:19 GMT

1 ACCEPTED SOLUTION

avatar
Contributor

Hi @AdrianMSA 

The ERROR message you mentioned in the description [1] looks to be very similar to a known issue we have CDPD-43261, which happens when the authentication to Hue is through Knox, but Hue does not have an LB configured. Can you please confirm if you have a Hue LB in front of Hue? If not, can you please install it using CM?

After you add the LB, you need to access Clusters > Hue service > Configurations and search for the Knox Proxy Hosts and add the Hue LB by clicking +. 

TypeError: Object of type WSGIRequest is not JSON serializable

View solution in original post

5 REPLIES 5

avatar
Community Manager

@AdrianMSA, Welcome to our community! To help you get the best possible answer, I have tagged in our Hive experts @smruti @asish @Shmoo, who may be able to assist you further.

Please feel free to provide any additional information or details about your query, and we hope that you will find a satisfactory solution to your question.



Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
Community Manager

@AdrianMSA, I checked with my internal team regarding this issue, and they mentioned that it may require a support case to review the Knox configuration in relation to Hue and the Hue-to-Hive connection. If you have an active subscription with us, we kindly request that you raise a support case for further troubleshooting.



Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
Expert Contributor

Hi @AdrianMSA , could you please follow the below steps and check if works?

 

1. Verify if a Hue Load Balancer (LB) is configured for the Hue service in Cloudera Manager. If not present, add a Hue LB instance.
2. Apply the hue_load_balancer_safety_valve configuration with the following parameter to the Hue LB instance to ensure correct proxy header handling:
3. SetEnv proxy-sendcl 1
4. Reinstall the Hue Load Balancer instance to apply the new configuration. Restart both Hue and Knox services to ensure the new settings are picked up and active.
5. Verify if the errors disappear and Hive databases are listed correctly in the Hue UI.

 

 

avatar
Contributor

Hi @AdrianMSA 

The ERROR message you mentioned in the description [1] looks to be very similar to a known issue we have CDPD-43261, which happens when the authentication to Hue is through Knox, but Hue does not have an LB configured. Can you please confirm if you have a Hue LB in front of Hue? If not, can you please install it using CM?

After you add the LB, you need to access Clusters > Hue service > Configurations and search for the Knox Proxy Hosts and add the Hue LB by clicking +. 

TypeError: Object of type WSGIRequest is not JSON serializable

avatar
New Contributor

Adding a LoadBalancer to Hue. Solved the problem. Thanks