Bug 393071

Summary: jetty fails to start up via init script
Product: [Fedora] Fedora Reporter: Kahlil Hodgson <kahlil.hodgson>
Component: jettyAssignee: Jeff Johnston <jjohnstn>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 8CC: overholt
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 5.1.12-1jpp.8.fc8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-29 01:36:49 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 Kahlil Hodgson 2007-11-20 20:54:34 UTC
Description of problem:

Jetty fails to start up via init script

Version-Release number of selected component (if applicable):

jetty-5.1.12-1jpp.7.fc8.i386

How reproducible:

Attempt to start jetty via init script

Steps to Reproduce:
1. become root
2. /etc/init.d/jetty start
  
Actual results:

Starting : Defaulting JETTY_HOME to /usr/share/jetty
Found JAVA=/usr/bin/java in JAVA_HOME=/
Starting Jetty: 
/usr/bin/djetty: line 477: /dev/tty: No such device or address
nohup: redirecting stderr to stdout
Jetty running pid=5471
                                                           [  OK  ]

but the djetty process has not actually started

Expected results:

Starting : Starting Jetty: 
nohup: redirecting stderr to stdout
Jetty running pid=5619
                                                           [  OK  ]

and jetty process actually starting up

Additional info:

Looks like init script uses runuser to login as user 'jetty' and run djetty, 
however, the init script environment is not being passed through.  A temporary
fix is to create a /usr/share/jetty/.profile with the following:

export JAVA_HOME=/etc/alternatives/jre
export JAVA_OPTIONS=
export JETTY_HOME=/usr/share/jetty
export JETTY_CONSOLE=/var/log/jetty/jetty-console.log
export JETTY_PORT=8080
export JETTY_RUN=/var/run/jetty
export JETTY_PID=$JETTY_RUN/jetty.pid

but we should really fix the init script somehow

Comment 1 Andrew Overholt 2007-11-20 21:34:35 UTC
I'm pretty sure this was intentional, right, Jeff?

Kahlil, if you're interested in co-maintaining jetty and sorting out the init
script and user stuff, I'm sure Jeff would welcome the help :)

Comment 2 Jeff Johnston 2007-11-20 22:38:07 UTC
Actually no, it wasn't intentional.  A fix has been made and a build started. 
The problem is that the jetty.spec file created a /usr/share/jetty/jettyrc
instead of /usr/share/jetty/.jettyrc.  This file already has the necessary
setting for JETTY_CONSOLE.  When invoked as specified, /usr/bin/djetty looks for
/usr/share/jetty/.jettyrc at the start.

Comment 3 Jeff Johnston 2007-11-21 17:07:02 UTC
Please try updates-testing build jetty-5.1.12-1jpp.8.fc8.

Comment 4 Fedora Update System 2007-11-22 03:36:45 UTC
jetty-5.1.12-1jpp.8.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update jetty'

Comment 5 Kahlil Hodgson 2007-11-22 07:15:51 UTC
Great stuff! thanks for the very fast response :-)
The upgrade fixes the problem for me (I reverted my tweaks before hand).

One thing I did notice was that the init script sources /etc/jetty/jetty.conf.
This file is not a shell script (its supposed to contain paths to xml files).
I think you probably mean to source /usr/share/jetty/.jettyrc instead.

Thanks again :-)

Kal 


Comment 6 Fedora Update System 2007-11-29 01:36:48 UTC
jetty-5.1.12-1jpp.8.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.