Help Center/ MapReduce Service/ User Guide (Ankara Region)/ FAQs/ Web Page Access/ How Do I Change the Session Timeout Duration for an Open Source Component Web UI?
Updated on 2024-11-29 GMT+08:00

How Do I Change the Session Timeout Duration for an Open Source Component Web UI?

You need to set a proper web session timeout duration for security purposes. To change the session timeout duration, do as follows:

Checking Whether the Cluster Supports Session Timeout Duration Adjustment

Log in to FusionInsight Manager and choose Cluster > Services > meta. On the displayed page, click Configurations and select All Configurations. Search for the http.server.session.timeout.secs configuration item. If this configuration item exists, perform the following steps to modify it. If the configuration item does not exist, the version does not support dynamic adjustment of the session duration.

You are advised to set all session timeout durations to the same value. Otherwise, the settings of some parameters may not take effect due to value conflict.

Modifying the Timeout Duration on Manager and the Authentication Center Page

  1. Log in to each master node in the cluster and perform 2 to 3 on each master node.
  2. Change the value of <session-timeout>20</session-timeout> in the /opt/Bigdata/om-server_xxx/apache-tomcat-xxx/webapps/web/WEB-INF/web.xml file. <session-timeout>20</session-timeout> indicates the session timeout duration, in minutes. Change it based on service requirements. The maximum value is 480 minutes.
  3. Add ticket.tgt.timeToKillInSeconds=28800 to the /opt/Bigdata/om-server_xxx/apache-tomcat-8.5.63/webapps/cas/WEB-INF/classes/config/application.properties file. ticket.tgt.timeToKillInSeconds indicates the validity period of the authentication center, in seconds. Change it based on service requirements. The maximum value is 28,800 seconds.
  4. Restart the Tomcat node on the active master node.
    1. 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.
    2. Run the kill -9 {pid} command, in which {pid} indicates the Tomcat process ID obtained in 4.a.
    3. Wait until the process automatically restarts.

      You can run the netstat -anp |grep 28443 |grep LISTEN command to check whether the process is successfully restarted. If the process is displayed, the process is successfully restarted. If the process is not displayed, query the process again later.

Modifying the Timeout Duration for an Open-Source Component Web UI

  1. Access the All Configurations page.

    Log in to FusionInsight Manager and choose Cluster > Services > meta. On the displayed page, click Configurations and select All Configurations.

  2. Change the value of http.server.session.timeout.secs under meta as required. The unit is second.
  3. Save the settings, deselect Restart the affected services or instances, and click OK.

    You are advised to perform the restart during off-peak hours.

  4. (Optional) If you need to use the Spark web UI, search for spark.session.maxAge on the All Configurations page of Spark and change the value (in seconds).

    Save the settings, deselect Restart the affected services or instances, and click OK.

  5. Restart the meta service and components on web UI, or restart the cluster during off-peak hours.

    To prevent service interruption, restart the service during off-peak hours or perform a rolling restart.