Bug 1311499

Summary: Updating package causes tomcat to not start on boot.
Product: [Fedora] Fedora EPEL Reporter: Mike Willis <mike.willis>
Component: tomcatAssignee: Coty Sutherland <csutherl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: el6CC: alee, coolsvap, csutherl, hajek, huskonzerv, ivan.afonichev
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: tomcat-7.0.70-2.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-02 09:22:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mike Willis 2016-02-24 11:29:44 UTC
User-Agent:       Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier: 

After installing updates and rebooting, tomcat was found to be not running. This was observed on multiple servers.



Reproducible: Always

Steps to Reproduce:
1. Update tomcat package
2. Reboot
3.
Actual Results:  
tomcat is not running and not configured to start on boot.

[root@null  ~]# service tomcat status
tomcat is stopped                                          [  OK  ]
[root@null  ~]# chkconfig --list | grep tomcat
[root@null  ~]# 

Expected Results:  
tomcat is running and configured to start on boot.

preuninstall script unconditionally runs 'chkconfig --del'  and preuninstall script of old package runs after the postinstall script of new package. 
https://fedoraproject.org/wiki/Packaging:Scriptlets



[root@null~]# rpm -qi --scripts tomcat
Name        : tomcat                       Relocations: (not relocatable)
Version     : 7.0.65                            Vendor: Fedora Project
Release     : 1.el6                         Build Date: Wed 06 Jan 2016 18:50:42 GMT
Install Date: Mon 22 Feb 2016 04:09:52 GMT      Build Host: buildhw-09-nfs.phx2.fedoraproject.org
Group       : System Environment/Daemons    Source RPM: tomcat-7.0.65-1.el6.src.rpm
Size        : 312860                           License: ASL 2.0
Signature   : RSA/8, Thu 07 Jan 2016 16:36:23 GMT, Key ID 3b49df2a0608b895
Packager    : Fedora Project
URL         : http://tomcat.apache.org/
Summary     : Apache Servlet/JSP Engine, RI for Servlet 3.0/JSP 2.2 API
Description :
Tomcat is the servlet container that is used in the official Reference
Implementation for the Java Servlet and JavaServer Pages technologies.
The Java Servlet and JavaServer Pages specifications are developed by
Sun under the Java Community Process.

Tomcat is developed in an open and participatory environment and
released under the Apache Software License version 2.0. Tomcat is intended
to be a collaboration of the best-of-breed developers from around the world.
preinstall scriptlet (using /bin/sh):
# add the tomcat user and group
/usr/sbin/groupadd -g 91 -r tomcat 2>/dev/null || :
/usr/sbin/useradd -c "Apache Tomcat" -u 91 -g tomcat \
    -s /bin/nologin -r -d /usr/share/tomcat tomcat 2>/dev/null || :
postinstall scriptlet (using /bin/sh):
/sbin/chkconfig --add tomcat
preuninstall scriptlet (using /bin/sh):
# clean tempdir and workdir on removal or upgrade
/etc/init.d/tomcat stop >/dev/null 2>&1
/sbin/chkconfig --del tomcat
/bin/rm -rf /var/cache/tomcat/work/* /var/cache/tomcat/temp/*
[root@null ~]#

Comment 1 Szabolcs Horvath 2016-03-26 09:31:15 UTC
Hello!

I can confirm that this bug hits the latest RH 6.7 channel as well:

# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.7 (Santiago)

# rpm -qa | grep tomcat
tomcat-el-2.2-api-7.0.65-1.el6.noarch
tomcat-7.0.65-1.el6.noarch
tomcat-lib-7.0.65-1.el6.noarch
tomcat-jsp-2.2-api-7.0.65-1.el6.noarch
tomcat-admin-webapps-7.0.65-1.el6.noarch
tomcat-native-1.1.34-1.el6.x86_64
tomcat-servlet-3.0-api-7.0.65-1.el6.noarch

# chkconfig --list tomcat
service tomcat supports chkconfig, but is not referenced in any runlevel (run 'chkconfig --add tomcat')

Best regards,
  Szabolcs Horvath

Comment 2 Coty Sutherland 2016-03-28 19:21:43 UTC
I added a condition to check and see if you're erasing the package or not. If not, then it doesn't stop the service or remove tomcat from chkconfig.

https://github.com/csutherl/fedora-tomcat/commit/ab8a336

Comment 3 Mike McCune 2016-03-28 22:44:25 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 5 Fedora Update System 2016-08-05 20:10:32 UTC
tomcat-7.0.70-2.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-3ff1f4485b

Comment 6 Fedora Update System 2016-08-09 02:17:40 UTC
tomcat-7.0.70-2.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-3ff1f4485b

Comment 7 Fedora Update System 2016-09-01 16:19:55 UTC
tomcat-7.0.70-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2016-09-02 09:21:44 UTC
tomcat-7.0.70-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.