Steps to do after yum update / patching of tomcat for Operations Manager

Document created by praveen.vaddepally Expert on Jun 22, 2017Last modified by kevinlamb on Apr 16, 2019
Version 28Show Document
  • View in full screen mode

Please follow the steps below when you are applying a Yum update / patch for your instance as it overrides the tomcat server file which turns tomcat to enter into a failed state.

 

1. Run the following command to check that the tomcat status:  service tomcat status 

[root@rhel71-opsman webapps]# service tomcat status -l 
Redirecting to /bin/systemctl status  -l tomcat.service ● tomcat.service - Apache Tomcat Web Application Container
Loaded: loaded (/usr/lib/systemd/system/tomcat.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2016-11-09 14:28:48 EST; 6min ago
Process: 5802 ExecStart=/usr/libexec/tomcat/server start (code=exited, status=1/FAILURE)  Main PID: 5802 (code=exited, status=1/FAILURE)
Nov 09 14:28:48 rhel71-opsman server[5802]: Java virtual machine used: /usr/lib/jvm/jre/bin/java
Nov 09 14:28:48 rhel71-opsman server[5802]: classpath used: /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar
Nov 09 14:28:48 rhel71-opsman server[5802]: main class used: org.apache.catalina.startup.Bootstrap
Nov 09 14:28:48 rhel71-opsman server[5802]: flags used: eval $MY_JAVA_OPTS /usr/bin/free -m | /usr/bin/grep Mem: | /usr/bin/awk '{print "-Xms256m -Xmx" int($2/4*3) "m -Xloggc:/var/log/tomcat/tomcat_gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=100m -Dtomcat_logdir=/var/log/tomcat -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.util.Arrays.useLegacyMergeSort=true -Djdk.xml.entityExpansionLimit=0 -Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2 -XX:+PrintCommandLineFlags -XX:+PrintConcurrentLocks -XX:+PrintClassHistogram -verbose:gc -XX:+UseG1GC -XX:+PrintGCDateStamps -XX:SoftRefLRUPolicyMSPerMB=0 -Djava.net.preferIPv4Stack=true"}'
Nov 09 14:28:48 rhel71-opsman server[5802]: options used: -Dcatalina.base=/usr/share/tomcat -Dcatalina.home=/usr/share/tomcat -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat/temp -Djava.util.logging.config.file=/usr/share/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
Nov 09 14:28:48 rhel71-opsman server[5802]: arguments used: start
Nov 09 14:28:48 rhel71-opsman server[5802]: Error: Could not find or load main class eval
Nov 09 14:28:48 rhel71-opsman systemd[1]: tomcat.service: main process exited, code=exited, status=1/FAILURE
Nov 09 14:28:48 rhel71-opsman systemd[1]: Unit tomcat.service entered failed state.

 

2. For the above condition, do the following steps: 

    [root@turbonomic tomcat] : cd /usr/libexec/tomcat

 

3. [root@turbonomic tomcat]: cp server server.ORG

 

4. [root@turbonomic tomcat]: cp server.local server

5. cp: overwrite ‘server’? y

6. Since yum update also updates selinux, we need to put it in permissive mode 
    [root@turbonomic tomcat]: setenforce 0
7. [root@turbonomic tomcat]: service tomcat start
8. We should see that the tomcat service is running. Please wait for a few minutes before trying to login as it takes time to load all the services in the background. Also, if you would like to turn off  Selinux permanently even after restart by using following steps: 
  1. vim /etc/sysconfig/selinux
  2. Change:
    SELINUX=enforcing
    TO:
    SELINUX=permissive
  3. :wq

Attachments

    Outcomes