Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Jetty distribution start up problems

Good information.

Got any examples of a "best of breed" startup script for any other java server/daemon we can learn off of?

--
Joakim Erdfelt
joakim@xxxxxxxxxxx

http://webtide.com | http://intalio.com
(the people behind jetty and cometd)



On Fri, Oct 28, 2011 at 8:07 AM, James Roper <JRoper@xxxxxx> wrote:
Hi,

There is conflicting information between jetty.conf and the actual behaviour.  jetty.conf contains this comment:

Each line in this file becomes an arguement to start.jar
unless this file contains an --ini option, then these
arguments will be in addition to those found in the
start.ini file

I would interpret that to mean, if no --ini option is loaded, the jetty's start.ini is not loaded.  However, in the code, we see this:
         boolean ini = false;
         ....
               if (arg.startsWith("--ini=")||arg.equals("--ini"))
               {
                   ini=true;
               ....
        then later

           // if no non-option inis, add the start.ini
           if (!ini)
           {
               arguments.addAll(0,loadStartIni(null));
           }

so, the code says, if --ini=somefile.ini is present, load that, if --ini *is* present, load nothing, and if no --ini is present, load start.ini.  Seems to be a bug here?

Also, the command to start jetty in jetty.sh on non debian distros (ie, with no start_stop_daemon function present) as a different user will in most cases fail, because it uses

su - <user> -c "....

It is very common for a system administrator to set the shell of the user that the webserver runs as to /bin/false so that they can't log in, and su by default will execute the users shell followed by the commands passed in, so the above command will do nothing.  What it probably should be is su - <user> -s /bin/sh -c "..., which forces su to use a real shell.

James

VZ Netzwerke Ltd || Saarbruecker Str. 38 || D - 10405 Berlin


JRoper@xxxxxx

www.studivz.net, www.meinvz.net, www.schuelervz.net

VZ Netzwerke Ltd, Registered Office Berlin, Registration Court Charlottenburg, HRB 101454
Executive Director: Stefanie Waehlert
Non-Executive Directors: Claas van Delden, Markus Schunk, Thomas Baum, Dr. Clemens Riedl
Headquarters: VZ Netzwerke Ltd, 5 New Street Square, London EC4A 3TW, United Kingdom
Companies House Cardiff No. 5607971, Place of Registration: England and Wales

_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-dev


Back to the top