Daemonizing Jetty?

Wessel, Keith kwessel at illinois.edu
Thu Jul 30 16:30:29 EDT 2015


Thanks, all. I really don't want to install pieces as root if not necessary, and it sounds like it isn't.

Scott, I've gone down to the simplest scenario. From the command-line, cd into my jetty-base and run java -jar start.jar. It prints the start-up log lines (I haven't set --start-log-file yet) then sits there. Doesn't daemonize, but Jetty is clearly running. I can ctrl-c to stop it at that point.

Is it backgrounding for Scott and others? If so, something's clearly off with my configuration.

Keith


-----Original Message-----
From: users [mailto:users-bounces at shibboleth.net] On Behalf Of Cantor, Scott
Sent: Thursday, July 30, 2015 2:14 PM
To: Shib Users <users at shibboleth.net>
Subject: Re: Daemonizing Jetty?

On 7/30/15, 3:01 PM, "users on behalf of Wessel, Keith" <users-bounces at shibboleth.net on behalf of kwessel at illinois.edu> wrote:



>Thanks, Dave, but shoulda mentioned an essential fact in my original note: this is a non-root installation. We’re not on a system-based distro yet (RHEL 6), and een if we were, this all needs to be done with things not requiring root. The jetty.sh script is nice enough to check and do its thing without start-stop-daemon if we aren’t root, but it’s still using lazy backgrounding.

I use a very customized script to do it using the jetty --dry-run option to capture the command line and I use the setuid extension. I haven't come up with a systemd equivalent yet, but my script does work on both RH5 and RH7.

I will get it into the wiki when I can, it was on my list to add to the Jetty docs because it's not trivial.

Whether it's 100% necessary anymore I can't say. When I did it, getting setuid to work required all of it, as did getting Java system properties set. Jetty's probably better now, but I haven't gone back and reworked it.

I have never used their jetty.sh script. The core command, and it does daemonize as far as I knew, is just running java -cp start.jar. It's when you need setuid and stuff like that that it gets more complex.

So I guess as a starting point, stop using jetty.sh?

-- Scott

-- 
To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net


More information about the users mailing list