Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315748 - Remove special case --fromDaemon from start.jar
Summary: Remove special case --fromDaemon from start.jar
Status: CLOSED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: server (show other bugs)
Version: 7.1.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 7.1.0   Edit
Assignee: Joakim Erdfelt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-04 06:07 EDT by Greg Wilkins CLA
Modified: 2010-06-07 18:21 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Wilkins CLA 2010-06-04 06:07:07 EDT

    
Comment 1 Greg Wilkins CLA 2010-06-04 07:07:35 EDT
There was a problem that with jetty.sh and --fromDaemon, the stderr/stdout were being redirected twice: once by the --fromDaemon handling and once from jetty-logging.xml

We shouldn't have jetty specific special cases in start.jar, so I have checked in some changes that avoids the need for --fromDaemon.

The info logs in Log.java and jetty-logging.xml have been changed to debugs, so that no output is produced before the log is redirected by jetty-logging.xml

I've then created an etc/jetty.conf to the distribution that includes jetty-logging.xml (plus comments that point out that start.ini is also involved).

The jetty.sh check command now reports the start.ini location to make that more explicit.

r1919

This probably needs the RPM/DEB modules to be updated with their own jetty.conf that contains jetty-logging.xml

Joakim, can you check these mods work and update RPM/DEB
Comment 2 Greg Wilkins CLA 2010-06-04 07:14:02 EDT
is the start.config stuff needed in jetty.sh now?
or maybe the jetty-logging.xml should be in a start.config rather than a jetty.cong?
Comment 3 Greg Wilkins CLA 2010-06-04 12:12:15 EDT
I committed a simple --deamon implementation r1921
it uses start.log in ${jetty.log} or "."

It is only configured from system properties, so it may need to
be updated to work from command line config as well.

I'm still not 100% happy with the name or the default location.
I still kind of prefer a -o <file>  or --stderrout <file>, but I guess
I can live with --daemon if you REALLY have strong objections to 
a configured log location.

The next thing that is needed is a way to nominate some configuration
files to be prepended to the start.ini args (or prepended at least before the 
first non --Xxx and -x arg).    Any errors in these can cause a System.exit().

So something like:

  java -jar start.jar --startup jetty-logging.xml --startup jetty-jmx.xml jetty-ssl.xml

hmmm I don't like --startup   hmmm maybe --boot is better.  hmmmmmm


I still don't mind

  java -jar start.jar jetty-logging.xml jetty-jmx.xml -- jetty-ssl.xml

but happy to consider other separators if you can think of one.
Comment 4 Greg Wilkins CLA 2010-06-06 20:15:11 EDT
I've added support for prepended XMLs using the syntax:

  java -jar start.jar --pre=jetty-logging.xml --pre=jetty-jmx.xml 

I updated README and some other documentation accordingly, but I'm still open for better suggestions other than "--pre="
Comment 5 Greg Wilkins CLA 2010-06-06 20:22:54 EDT
I also made the --daemon handling look for a ./logs directory
and not append the start.log

If we append to start.log, then we need a mechanism to stop it growing forever.
Without append, we still capture the last start and don't need to worry about it growing forever.
Comment 6 Greg Wilkins CLA 2010-06-07 11:10:45 EDT
Joakim,

Can you update the jetty.sh scripts to use the -daemon flag 
and update jetty.conf to use --pre=jetty-logging.xml

Is there anything else that needs to be done on this one
and http://jira.codehaus.org/browse/JETTY-1232 ?
Comment 7 Joakim Erdfelt CLA 2010-06-07 18:21:46 EDT
Changes made.

Nah, I think these changes, and the build order change on hightide have addressed most of these concerns.

Considering this closed.