Bug 393071 - jetty fails to start up via init script
jetty fails to start up via init script
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: jetty (Show other bugs)
8
All Linux
low Severity high
: ---
: ---
Assigned To: Jeff Johnston
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-20 15:54 EST by Kahlil Hodgson
Modified: 2007-11-30 17:12 EST (History)
1 user (show)

See Also:
Fixed In Version: 5.1.12-1jpp.8.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-28 20:36:49 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kahlil Hodgson 2007-11-20 15:54:34 EST
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 16:34:35 EST
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 17:38:07 EST
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 12:07:02 EST
Please try updates-testing build jetty-5.1.12-1jpp.8.fc8.
Comment 4 Fedora Update System 2007-11-21 22:36:45 EST
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 02:15:51 EST
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-28 20:36:48 EST
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.

Note You need to log in before you can comment on or make changes to this bug.