Support Questions
Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

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

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

View solution in original post

10 REPLIES 10

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

Contributor
Thank you! This worked perfectly.

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)?

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.

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

Explorer

Very helpful.  Thanks Romain and nataliaking_csc.

Contributor

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

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 

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

Add
[desktop]
[[session]] ttl=900

to the CM Hue safety Valve:

*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

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

Romain