TOMCAT CEM files attempting to go to READ-ONLY ZFS
search cancel

TOMCAT CEM files attempting to go to READ-ONLY ZFS


Article ID: 103973


Updated On:


Compliance Event Manager


This document details setting up a READ-ONLY INSTALL ZFS for CEM.

This process depends on CEM being set up for 2 separate ZFS filesystems, one for binary data(readonly) and one for configuration data(read/write). The binary ZFS is used to house the binary modules used in USS for CEM.  The configuration ZFS is what holds configuration and log data as well as temporary expansions of the binary java files used in the CEM GUI.


CEM 6.0




After making the needed modifications to the deployed tomcat directories, the tomcat task should be able to run under a readonly ZFS filesystem with the pieces that have configuration parameters residing in a read/write ZFS.

Additional Information

Inside of the read/write mounted config directory, make sure there is a webapps as well as a 
logs directory, both defined with necessary permissions for tomcat to write to it. 

Steps 2 and 3 will need to happen when the main CEM directory is mounted read/write. after the files in these steps 
are modified, it can be mounted readonly.

1. Edit <CEME_HLQ>.<CEME_MLQ>.CUSTOM.CFGLIB(CEMETOME) search for the line 

    #IJO="$IJO -verbose:class"

    and after it insert:

    IJO="$IJO -Dcem.config.path=${CEM_CONFIG_PATH}"

    This sets up the config directory as as variable addressable in other configuration files.

2. In the <CEM_ZFS_MOUNTPOINT>/tomcat/conf directory, edit the file and change the following lines: = ${catalina.base}/logs = ${catalina.base}/logs = ${catalina.base}/logs = ${catalina.base}/logs

    to: = ${cem.config.path}/logs = ${cem.config.path}/logs = ${cem.config.path}/logs = ${cem.config.path}/logs

3. In <CEM_ZFS_MOUNTPOINT>/tomcat/conf directory, edit context.xml to change the following line:



    <Context workDir="${cem.config.path}/webapps">

4. Create symbolic links for the 4 war files needed for CEM into the config ZFS:
    ln -s <CEM_ZFS_MOUNTPOINT>/cai/cacem/cem/CA/CEMWS <CEM_CONFIG_ZFS_MOUNTPOINT>/webapps/cemws.war 
    ln -s <CEM_ZFS_MOUNTPOINT>/cai/cacem/cem/CA/CEMUI <CEM_CONFIG_ZFS_MOUNTPOINT>/webapps/cemui.war 
    ln -s <CEM_ZFS_MOUNTPOINT>/cai/cacem/cem/CA/CEMREST <CEM_CONFIG_ZFS_MOUNTPOINT>/webapps/cemrest.war 

5. In <CEM_ZFS_MOUNTPOINT>/tomcat/webapps/cemws/WEB-INF/classes edit the logback.xml file to change all instances of:


    <Host name="localhost"  appBase="webapps"
        unpackWARs="true" autoDeploy="true">
    <Host name="localhost"  appBase="${cem.config.path}/webapps
        unpackWARs="true" autoDeploy="true">


    <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
       prefix="localhost_access_log" suffix=".txt"  
       pattern="%h %l %u %t &quot;%r&quot; %s %b" />
    And change it to:
    <Valve className="org.apache.catalina.valves.AccessLogValve" directory="${cem.config.path}/logs"
       prefix="localhost_access_log" suffix=".txt"  
       pattern="%h %l %u %t &quot;%r&quot; %s %b" />