WAS THIS PAGE HELPFUL? Leave Feedback
Overview
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 page outlines steps for changing time portal timeout both by script and manually.
This process is disruptive to the GroundWork Monitor server. You should have users logged off to this server before making changes. |
Steps
Changing the portal timeout by script
The preferred method for updating the portal timeout is to download and use the attached script.
- Change directory to the tools directory:
cd /usr/local/groundwork/tools/
- 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
- When script has finished you can restart gwservices for the changes to take effect:
/etc/init.d/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.
For example:
tar xvf /usr/local/groundwork/backup/2017-09-19/portal-timeout-backup.tgz -C /
service groundwork restart gwservices
Changing the 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.
- 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
- nagvis.war
- 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
- 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. - 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 *
- Copy nagvis.war to a temp location and extract WEB-INF/web.xml:
- portal.war
- 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
- Edit WEB-INF/web.xml:
<session-config> <session-timeout>480</session-timeout> </session-config>
- 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 *
- Copy portal.war to a temp location, and extract WEB-INF/web.xml:
- portal-groundwork-base.war
- 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
- Edit WEB-INF/web.xml:
<session-config> <session-timeout>480</session-timeout> </session-config>
- 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 *
- Copy portal-groundwork-base.war to a temp location, and extract WEB-INF/web.xml:
- icefaces-push-server-1.8.2-P06-EE.war
- 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
- Edit WEB-INF/web.xml:
<session-config> <session-timeout>30</session-timeout> </session-config>
- 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 *
- Copy icefaces-push-server-1.8.2-P06-EE.war to an empty temp location, and extract WEB-INF/web.xml:
- 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. - 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.2.0.war status-viewer-war-temp cd status-viewer-war-temp jar xf status-viewer-7.2.0.war WEB-INF/web.xml vim WEB-INF/web.xml
- Edit WEB-INF/web.xml:
<session-config> <session-timeout>480</session-timeout> </session-config>
- Repack the status viewer war file, repack groundwork-enterprise.ear, change ownership, and deploy:
jar uf status-viewer-7.2.0.war WEB-INF/web.xml mv status-viewer-7.2.0.war .. cd .. jar uf groundwork-enterprise.ear status-viewer-7.2.0.war chown nagios:nagios groundwork-enterprise.ear mv groundwork-enterprise.ear /usr/local/groundwork/foundation/container/jpp/standalone/deployments/groundwork-enterprise.ear rm -rf *
- Copy groundwork-enterprise.ear to an empty temp location, unpack and extract the status viewer war.
- Then, restart gwservices:
/etc/init.d/restart gwservices
If there are any issues with the portal restarting, restore the backup:
/etc/init.d/groundwork stop gwservices
tar xvf <path to backup>/portal_timeout_backup.tar.gz -C /
/etc/init.d/groundwork start gwservices