How to change the portal timeout

Changing the Portal Timeout

If the GroundWork Monitor portal page is left open for a long period of time, a permissions error will eventually be displayed. The JBoss portal has a set timeout limit of 7 hours. This value can be changed with the process outlined below.

This process is disruptive to the GroundWork Monitor server. You should have users logged off to this server before making changes.
Contents

1.0 Changing Portal Timeout By Script

The prefered method for updating the portal timeout is to download and use the attached script

  1. Download the attached tgz file:
    Name Size Creator Creation Date Comment  
    ZIP Archive change_portal_timeout.tgz 2 kB Bren Eckles Dec 28, 2016 11:03 md5sum: e47a7a501855d5cf0dadb41a3a9ebbfe  
  2. Extract the tgz archive:
    tar xvf change_portal_timeout.tgz
    
  3. Run the change_portal_timeout.sh script:
    The script take a single parameter passed to the -t flag which should be the desired timeout in minutes.
    ./change_portal_timeout.sh -t <timeout in minutes>
    

    For a 480 minute timeout you would run:

    ./change_portal_timeout.sh -t 480
    
  4. When script has finished you can restart gwservices for the changes to take effect:
    service groundwork restart gwservices
    
    If you need to revert the changes you can untar the backup placed in a folder matching the date the script was run ('/usr/local/groundwork/backup/YYYY-MM-DD') and then restart gwservices:
    tar xvf /usr/local/groundwork/backup/2016-10-19/portal-timeout-backup.tgz -C /
    service groundwork restart gwservices

2.0 Changing Portal Timeout Manually

There are 5 settings in XML files embedded in 5 separate war files. As a broad overview, you have to uncompress each jar file, edit the files within them, repack them, make sure the permissions are correct, then redeploy.

  1. Back up all files:
    source /usr/local/groundwork/scripts/setenv.sh
    tar cfpz portal_timeout_backup.tar.gz  \
    /usr/local/groundwork/foundation/container/jpp/standalone/deployments/nagvis.war \
    /usr/local/groundwork/foundation/container/jpp/gatein/gatein.ear/portal.war \
    /usr/local/groundwork/foundation/container/jpp/standalone/deployments/portal-groundwork-base.war \
    /usr/local/groundwork/foundation/container/jpp/standalone/deployments/icefaces-push-server-1.8.2-P06-EE.war \
    /usr/local/groundwork/foundation/container/jpp/standalone/deployments/groundwork-enterprise.ear
  2. nagvis.war
    1. Copy nagvis.war to a temp location and extract WEB-INF/web.xml:
      cd /my_temp_dir/
      cp /usr/local/groundwork/foundation/container/jpp/standalone/deployments/nagvis.war .
      jar xf nagvis.war WEB-INF/web.xml
      vim WEB-INF/web.xml
    2. Edit WEB-INF/web.xml:
      <session-config>
          <session-timeout>480</session-timeout>
      </session-config>
      The session timeout is defined in minutes, and is 480 in the example above.
    3. Update nagvis.war, change ownership, and deploy:
      jar uf nagvis.war WEB-INF/web.xml
      chown nagios:nagios nagvis.war
      mv nagvis.war /usr/local/groundwork/foundation/container/jpp/standalone/deployments/nagvis.war
      rm -rf *
  3. portal.war
    1. Copy portal.war to a temp location, and extract WEB-INF/web.xml:
      cd /my_temp_dir/
      cp /usr/local/groundwork/jpp/gatein/gatein.ear/portal.war .
      jar xf portal.war WEB-INF/web.xml
      vim WEB-INF/web.xml
    2. Edit WEB-INF/web.xml:
      <session-config>
         <session-timeout>480</session-timeout>
      </session-config>
    3. Update portal.war, change ownership, and deploy:
      jar uf portal.war WEB-INF/web.xml
      chown nagios:nagios portal.war
      mv portal.war /usr/local/groundwork/jpp/gatein/gatein.ear/portal.war
      rm -rf *
  4. portal-groundwork-base.war
    1. Copy portal-groundwork-base.war to a temp location, and extract WEB-INF/web.xml:
      cd /my_temp_dir/
      cp /usr/local/groundwork/foundation/container/jpp/standalone/deployments/portal-groundwork-base.war .
      jar xf portal-groundwork-base.war WEB-INF/web.xml
      vim WEB-INF/web.xml
    2. Edit WEB-INF/web.xml:
      <session-config>
         <session-timeout>480</session-timeout>
      </session-config>
    3. Update portal-groundwork-base.war, change ownership, and deploy:
      jar uf portal-groundwork-base.war WEB-INF/web.xml
      chown nagios:nagios portal-groundwork-base.war
      mv portal-groundwork-base.war /usr/local/groundwork/foundation/container/jpp/standalone/deployments/portal-groundwork-base.war
      rm -rf *
  5. icefaces-push-server-1.8.2-P06-EE.war
    1. Copy icefaces-push-server-1.8.2-P06-EE.war to an empty temp location, and extract WEB-INF/web.xml:
      cd /my_temp_dir/
      cp /usr/local/groundwork/foundation/container/jpp/standalone/deployments/icefaces-push-server-1.8.2-P06-EE.war .
      jar xf icefaces-push-server-1.8.2-P06-EE.war WEB-INF/web.xml
      vim WEB-INF/web.xml
    2. Edit WEB-INF/web.xml:
      <session-config>
         <session-timeout>30</session-timeout>
      </session-config>
    3. Update icefaces-push-server-1.8.2-P06-EE.war, change ownership, and deploy:
      jar uf icefaces-push-server-1.8.2-P06-EE.war WEB-INF/web.xml
      chown nagios:nagios icefaces-push-server-1.8.2-P06-EE.war
      mv icefaces-push-server-1.8.2-P06-EE.war /usr/local/groundwork/foundation/container/jpp/standalone/deployments/icefaces-push-server-1.8.2-P06-EE.war
      rm -rf *
  6. status viewer war file packed in groundwork-enterprise.ear
    This edit is different from the rest: You will need to first unpack groundwork-enterprise.ear, then unpack the status viewer war, extract, and edit WEB-INF/web.xml, repack the status viewer war, then repack groundwork-enterprise.ear.
    The filename in this section should reflect the correct version, status-viewer-X.X.X.war.
    1. Copy groundwork-enterprise.ear to an empty temp location, unpack and extract the status viewer war.
      cd /my_temp_dir/
      cp /usr/local/groundwork/foundation/container/jpp/standalone/deployments/groundwork-enterprise.ear .
      jar xf groundwork-enterprise.ear
      mkdir status-viewer-war-temp
      mv status-viewer-7.1.1.war status-viewer-war-temp
      cd status-viewer-war-temp
      jar xf status-viewer-7.1.1.war WEB-INF/web.xml
      vim WEB-INF/web.xml
    2. Edit WEB-INF/web.xml:
      <session-config>
         <session-timeout>480</session-timeout>
      </session-config>
    3. Repack the status viewer war file, repack groundwork-enterprise.ear, change ownership, and deploy:
      jar uf status-viewer-7.1.1.war WEB-INF/web.xml
      mv status-viewer-7.1.1.war ..
      cd ..
      jar uf groundwork-enterprise.ear status-viewer-7.1.1.war
      chown nagios:nagios groundwork-enterprise.ear
      mv groundwork-enterprise.ear /usr/local/groundwork/foundation/container/jpp/standalone/deployments/groundwork-enterprise.ear
      rm -rf *
  7. Then, restart gwservices:
    service groundwork restart gwservices
    If there are any issues with the portal restarting, restore the backup:
    service groundwork stop gwservices
    tar xvf <path to backup>/portal_timeout_backup.tar.gz -C /
    service groundwork start gwservices
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.