https://bugzilla.redhat.com/show_bug.cgi?id=863307
Bug ID: 863307
QA Contact: extras-qa(a)fedoraproject.org
Severity: high
Version: 17
Priority: unspecified
CC: akurtako(a)redhat.com, ivan.afonichev(a)gmail.com,
java-sig-commits(a)lists.fedoraproject.org,
kdaniel(a)redhat.com
Assignee: ivan.afonichev(a)gmail.com
Summary: changing CATALINA_PID causes tomcat not to start up
Regression: ---
Story Points: ---
Classification: Fedora
OS: Linux
Reporter: alee(a)redhat.com
Type: Bug
Documentation: ---
Hardware: All
Mount Type: ---
Status: NEW
Component: tomcat
Product: Fedora
Description of problem:
In /usr/sbin/tomcat-sysd, in the start() function, we have the following code:
function start() {
# fix permissions on the log and pid files
export CATALINA_PID="/var/run/${NAME}.pid"
touch $CATALINA_PID 2>&1
if [ "$?" -eq "0" ]; then
chown ${TOMCAT_USER}:${TOMCAT_USER} $CATALINA_PID
fi
...
This hard codes CATALINA_PID, ignoring any customizations that might have been
made in /etc/sysconfig/${NAME}.
The code goes in to read /etc/sysconfig/${NAME} in parseOptions and pass any
customized variables to the invocation of TOMCAT_SCRIPT. This results in the
server failing to come up because it the pid file at the customized location
does not exist and the TOMCAT_USER does not have the permissions to create it.
The solution is straight forward. In the code above, we should replace:
export CATALINA_PID="/var/run/${NAME}.pid"
with:
export CATALINA_PID="${CATALINA_PID:-/var/run/${NAME}.pid}"
This will read the correct value from /etc/sysconfig/${NAME} if it exists, or
default to /var/run/{NAME}.pid
Version-Release number of selected component (if applicable):
tomcat-7.0.29-1.fc17.noarch on Fedora 17
This is not a problem on F18.
How reproducible:
Steps to Reproduce:
1. Choose a different location for CATALINA_PID in /etc/sysconfig/{NAME}
2. Try to start the server using systemd
Actual results:
Server will fail to come up with a permissions error for the pid file, which
will not be created in the custom location.
Expected results:
Server comes up and creates pid file where we tell it to.
Additional info:
--
You are receiving this mail because:
You are on the CC list for the bug.