Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Need to add value [[session]] ttl=900 to Hue config, using Cloudera Manager

Solved Go to solution

Need to add value [[session]] ttl=900 to Hue config, using Cloudera Manager

Contributor

I need to add "ttl" value to Hue configuration. We are using Cloudera Manager (which would mean that Hue config would be set in /var/run/cloudera-scm-agent/process/XXX-hue-HUE_SERVER/hue.ini), thus manually updating hue.ini in /etc/hue/conf will not activate the change. However, value "ttl" in "session" is not available in Cloudera Manager UI.

 

The following packages are being used in a cluster:

 

cloudera-manager-server-5.3.0-1.cm530.p0.166.el6.x86_64

cloudera-manager-server-db-2-5.3.0-1.cm530.p0.166.el6.x86_64

cloudera-manager-agent-5.3.0-1.cm530.p0.166.el6.x86_64

cloudera-manager-daemons-5.3.0-1.cm530.p0.166.el6.x86_64

 

Hue v3.7

 

How can "ttl" parameter be implemented in this scenario?

 

[desktop]
  [[session]]
  ttl=900
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Need to add value [[session]] ttl=900 to Hue config, using Cloudera Manager

In the Hue safety valve:

[desktop]
[[session]]
ttl=900


http://gethue.com/how-to-configure-hue-in-your-hadoop-cluster/

*Note:* To override a value in Cloudera Manager, you need to enter verbatim
each mini section from below into the Hue Safety Valve
:
Hue Service → Configuration → Service-Wide → Advanced → Hue Service
Advanced Configuration Snippet (Safety Valve) for hue_safety_valve.ini

Romain

10 REPLIES 10

Re: Need to add value [[session]] ttl=900 to Hue config, using Cloudera Manager

In the Hue safety valve:

[desktop]
[[session]]
ttl=900


http://gethue.com/how-to-configure-hue-in-your-hadoop-cluster/

*Note:* To override a value in Cloudera Manager, you need to enter verbatim
each mini section from below into the Hue Safety Valve
:
Hue Service → Configuration → Service-Wide → Advanced → Hue Service
Advanced Configuration Snippet (Safety Valve) for hue_safety_valve.ini

Romain

Re: Need to add value [[session]] ttl=900 to Hue config, using Cloudera Manager

Contributor
Thank you! This worked perfectly.

Re: Need to add value [[session]] ttl=900 to Hue config, using Cloudera Manager

Explorer

So is this ttl (time-to-live) setting based on idle time or a does it only allow that many seconds before automatically logging off of the Hue website (regardless of activity)?

Re: Need to add value [[session]] ttl=900 to Hue config, using Cloudera Manager

Contributor

This is for period of inactivity. If you are actively using HUE, you won't  be logged off. In various scenarios - like compliant and/or secure clusters - it would be required to set up automated timeout for idle users.

Re: Need to add value [[session]] ttl=900 to Hue config, using Cloudera Manager

This is the TTL of the cookie, it will expire even if the user is active
and the user will be prompted to login again

Re: Need to add value [[session]] ttl=900 to Hue config, using Cloudera Manager

Explorer

Very helpful.  Thanks Romain and nataliaking_csc.

Re: Need to add value [[session]] ttl=900 to Hue config, using Cloudera Manager

Contributor

Great, thank you for clarification. I didn't realize it logs me out even if I remain active. Good to know!

Re: Need to add value [[session]] ttl=900 to Hue config, using Cloudera Manager

New Contributor

Hello Romain,

 

I made the following changes as mentioned via CM and restarted the Hue server to make the changes effectve. 

However, will this update the hue.ini file in the backend (in our case <path>/CDH-5.4.1-1.cdh5.4.1.p0.6/etc/hue/conf.empty/hue.ini) ? 

Or which file is actually affected due to this modification. 

 

Thanks in advacne for your reply. 

 

Abraham 

Re: Need to add value [[session]] ttl=900 to Hue config, using Cloudera Manager

Contributor
  1. Find current process number for Hue service. As a root user navigate to directory /var/run/cloudera-scm-agent/process/ and find subdirectory XX-hue-HUE_SERVER with the highest value, i.e. “61-hue-HUE_SERVER”
  2. Inside XX-hue-HUE_SERVER directory, confirm that TTL value has been added to hue_safety_valve.ini file.
    # grep ttl /var/run/cloudera-scm-agent/process/{PROCESS_NUMBER}-hue-HUE_SERVER/hue_safety_valve.ini
    ttl=900
Don't have an account?
Coming from Hortonworks? Activate your account here