<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Keith<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> users [mailto:users-bounces@shibboleth.net]
<b>On Behalf Of </b>David Langenberg<br>
<b>Sent:</b> Thursday, July 30, 2015 1:58 PM<br>
<b>To:</b> Shib Users <users@shibboleth.net><br>
<b>Subject:</b> Re: Daemonizing Jetty?<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">If you're on a SystemD-based distro, here's some instructions that work on CentOS 7.  YMMV on other systems:<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Courtesy of the InCommon Shib Training Team:<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">1) Create the file /etc/systemd/system/shibboleth.service using your favorite editor and save the following there (Note, what follows is case-sensitive:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">[Unit]<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Description=Shibboleth Identity Provider<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">[Service]<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">WorkingDirectory=/opt/shibboleth-idp/jetty-base<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">ExecStart=/usr/bin/java -jar <path-to-jetty>/start.jar jetty.home=<your-jetty-home> jetty.base=<your-custom-jetty-base><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">[Install]<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">WantedBy=multi-user.target<o:p></o:p></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">2) Reload systemd: systemctl daemon-reload shibboleth<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">3) Start Shib: systemctl enable shibboleth && systemctl start shibboleth<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Dave<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Thu, Jul 30, 2015 at 12:52 PM, Wessel, Keith <<a href="mailto:kwessel@illinois.edu" target="_blank">kwessel@illinois.edu</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">Hi, all,<br>
<br>
I know this is a purely Jetty question, foregive me if it's off-topic. I figured others might have run into this, too.<br>
<br>
I've been using jetty.sh (included with the Jetty package) to start/stop Jetty. Seems it's using a simple '&' backgrounding method to daemonize jetty.sh. This is fine as long as I'm starting/stopping Jetty from the local system. It's when I do:<br>
<br>
ssh other-IDP-note jetty.sh start<br>
<br>
that I run into problems. The non-interactive nature of things seems to gum up the works. My ssh command never returns me to a prompt on the local system. I assume it's waiting for the backgrounded process to start and, in fact, verified this with a simple
 one-line bash script: sleep 15 &. It terminates immediately when run locally but hangs for 15 seconds when passed to ssh asa  command to run remotely.<br>
<br>
I know I can get around this with the -t option to ssh to tell ssh to force a pseudo terminal. But is there any Jetty command-line arg that tells Jetty to daemonize? I imagine, if there was, it would probably be used in jetty.sh in place of &. But I figured
 it couldn't hurt to ask. My Google searches so far reveal no such option.<br>
<br>
I'm far happier with Jetty's ease of configuration and speed so far than I was with Tomcat, but Tomcat at least knew how to fork its own Daemon process.<br>
<br>
Thanks,<br>
Keith<br>
<span style="color:#888888"><br>
<span class="hoenzb">--</span><br>
<span class="hoenzb">To unsubscribe from this list send an email to <a href="mailto:users-unsubscribe@shibboleth.net">
users-unsubscribe@shibboleth.net</a></span></span><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal">David Langenberg<o:p></o:p></p>
<div>
<p class="MsoNormal">Identity & Access Management Architect<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The University of Chicago<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>