How Do I Change the Session Timeout Duration for an Open Source Component Web UI?
You can perform the following operations to configure the timeout duration of the MRS Manager web UI and an open-source component web UI.
Set the minimum session duration based on service requirements. Otherwise, there will be security risks.
Changing the Timeout Duration of the MRS Manager Web UI and Authentication Center Page
- Clusters of MRS 3.x (MRS 3.3.0 or later):
- Log in to MRS Manager and choose System > OMS.
- In the list, locate the row that contains tomcat and click Modify Configuration.
- On the displayed page, set Session Timeout as required and click OK. Verify the user password and wait until the configuration to complete. Once done, the timeout setting will take effect for Manager.
- Clusters of MRS 3.x (Versions earlier than MRS 3.3.0):
- Log in to the active and standby OMS nodes of the cluster as user omm and perform steps 2 to 5.
- In the files /opt/Bigdata/om-server/tomcat/webapps/web/WEB-INF/web.xml and /opt/Bigdata/om-server/tomcat/conf/web.xml, locate the following content, where 20 indicates the session timeout duration, in minutes. You can change the value as required, but it cannot exceed 480.
<session-timeout>20</session-timeout>
- In the file /opt/Bigdata/om-server/tomcat/webapps/cas/WEB-INF/classes/config/application.properties, add the following information, where 28800 indicates the validity period of the authentication center, in seconds. You can change the value as required, but it cannot exceed 28800.
ticket.tgt.timeToKillInSeconds=28800
- In the file /opt/Bigdata/om-server/tomcat/webapps/cas/WEB-INF/classes/apereo.properties, add the following content, where 28800 indicates Ticket Granting Ticket (TGT) validity period, in seconds. You can change the value as required, but it cannot exceed 28800.
cas.ticket.tgt.maxTimeToLiveInSeconds=28800 cas.ticket.tgt.timeToKillInSeconds=28800
- In the file /opt/Bigdata/om-server/tomcat/webapps/cas/WEB-INF/classes/bootstrap.properties, add the following content, where 28800 indicates Ticket Granting Ticket (TGT) validity period, in seconds. You can change the value as required, but it cannot exceed 28800.
cas.ticket.tgt.maxTimeToLiveInSeconds=28800 cas.ticket.tgt.timeToKillInSeconds=28800
- Run the following command on the active management node as user omm to restart the Tomcat node:
sh ${BIGDATA_HOME}/om-server/tomcat/bin/shutdown.sh;sh ${BIGDATA_HOME}/om-server/tomcat/bin/startup.sh
- For clusters of versions earlier than MRS 3.x:
- Log in to the active and standby OMS nodes of the cluster as user omm and perform steps 2 to 4.
- In the file /opt/Bigdata/apache-tomcat-xxx/webapps/cas/WEB-INF/web.xml, locate the following content, where the value 20 indicates the session timeout duration, in minutes. You can change the value as required, but it cannot exceed 480.
<session-timeout>20</session-timeout>
- In the file /opt/Bigdata/apache-tomcat-xxx/webapps/web/WEB-INF/web.xml, locate the following content, where the value 20 indicates the session timeout duration, in minutes. You can change the value as required, but it cannot exceed 480.
<session-timeout>20</session-timeout>
- In the file /opt/Bigdata/apache-tomcat-xxx/webapps/cas/WEB-INF/spring-configuration/ticketExpirationPolicies.xml, add the following content, where the value 1200 indicates the validity period of the authentication center, in seconds. You can change the value as required, but it cannot exceed 28800.
p:maxTimeToLiveInSeconds="${tgt.maxTimeToLiveInSeconds:1200}"p:timeToKillInSeconds="${tgt.timeToKillInSeconds:1200}" - Restart the Tomcat node on the active master node.
- On the active master node, run the netstat -anp |grep 28443 |grep LISTEN | awk '{print $7}' command as user omm to query the Tomcat process ID.
- Run the kill -9 {pid} command, where {pid} indicates the Tomcat process ID obtained in the previous step.
- Wait for the process to restart. You can run the netstat -anp |grep 28443 |grep LISTEN command to check whether the process is restarted. If the process can be queried, the process is successfully restarted. If the process cannot be queried, query the process again later.
Changing the Web UI Timeout Duration of a Component
- For clusters of versions earlier than MRS 3.x:
- On the cluster details page, choose Components > meta > Configurations.
- Click All Configurations tab and search for http.server.session.timeout.secs on the displayed page. If the parameter exists, change its value as required. If not, the version does not support dynamic adjustment of the session duration.
- Restart the meta component for the modification to take effect.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.