<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 08/10/2014 07:45, John Robert
      MENDOZA wrote:<br>
    </div>
    <blockquote cite="mid:5434CF79.2090604@asti.dost.gov.ph" type="cite">
      <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
      Hello Francois, <br>
      <br>
      Thank you for the comprehensive walk-through. It seems that you
      are correct. The server restarts at a period of every 5 minutes
      that might be triggered by the agent. I checked my firewall and
      all policies that might affect the communication of the check
      script and everything is working now. It's just now that I know
      that the agent has a check for the server processes itself. Thank
      you very much! Everything is working perfect!<br>
      <br>
      Thanks, <br>
      Bert<br>
    </blockquote>
    <br>
    <br>
    OK, super !<br>
    <br>
    For posterity, I added the solution on serverfault:
<a class="moz-txt-link-freetext" href="http://serverfault.com/questions/634360/why-my-rudder-server-restart-every-5-minutes">http://serverfault.com/questions/634360/why-my-rudder-server-restart-every-5-minutes</a><br>
    <br>
    <br>
    Cheers, <br>
    <br>
    <blockquote cite="mid:5434CF79.2090604@asti.dost.gov.ph" type="cite">
      <br>
      <br>
      <div class="moz-cite-prefix">On Tuesday, 07 October, 2014 04:52
        PM, Francois Armand wrote:<br>
      </div>
      <blockquote cite="mid:5433A9CA.5010009@normation.com" type="cite">
        <meta content="text/html; charset=utf-8"
          http-equiv="Content-Type">
        <div class="moz-cite-prefix"><br>
          Hello, <br>
          <br>
          <br>
          OK, so it seems that your server is restarted after ~5
          minutes. That really looks like an action of the agent on the
          server. <br>
          <br>
          Before anything else, could you please give us:<br>
          <ul>
            <li>OS of the server on which Rudder is installed (type
              (Linux, etc), distribution, version...)<br>
            </li>
            <li>Version of Rudder<br>
            </li>
          </ul>
          <br>
          Now, for the possible explanation: we have a configuration
          rule on the server that's saying "the rudder server must be up
          and accessible. If not, try to restart it". <br>
          The rule is checked by accessing URL <a
            moz-do-not-send="true" class="moz-txt-link-freetext"
            href="http://localhost:8080/rudder/api/status">http://localhost:8080/rudder/api/status</a>
          and expecting a "OK" text response with 200 OK status. <br>
          <br>
          So, could you please try:<br>
          <br>
          <ul>
            <li> to execute the following command as rood on the Rudder
              server: </li>
          </ul>
          <blockquote>
            <blockquote><tt>$ </tt><tt>/var/rudder/cfengine-community/bin/cf-agent


                -KI</tt><br>
            </blockquote>
          </blockquote>
          And ckeck if there is something like that in the output:<br>
          <br>
          <blockquote><small><tt>2014-10-07T10:06:03+0200     info:
                /default/root_component_check/methods/'any'/default/generic_alive_check/commands/'/usr/bin/curl


                -s <a moz-do-not-send="true"
                  class="moz-txt-link-freetext"
                  href="http://localhost:8080/rudder/api/status">http://localhost:8080/rudder/api/status</a>
                |/bin/grep -q OK'[0]: Executing 'no timeout' ...
                '/usr/bin/curl -s <a moz-do-not-send="true"
                  class="moz-txt-link-freetext"
                  href="http://localhost:8080/rudder/api/status">http://localhost:8080/rudder/api/status</a>
                |/bin/grep -q OK'</tt><tt><br>
              </tt><tt>2014-10-07T10:06:03+0200    error:
                /default/root_component_check/methods/'any'/default/generic_alive_check/commands/'/usr/bin/curl


                -s <a moz-do-not-send="true"
                  class="moz-txt-link-freetext"
                  href="http://localhost:8080/rudder/api/status">http://localhost:8080/rudder/api/status</a>
                |/bin/grep -q OK'[0]: Finished command related to
                promiser '/usr/bin/curl -s <a moz-do-not-send="true"
                  class="moz-txt-link-freetext"
                  href="http://localhost:8080/rudder/api/status">http://localhost:8080/rudder/api/status</a>
                |/bin/grep -q OK' -- <b>an error occurred, returned 1</b></tt><tt><br>
              </tt><tt>2014-10-07T10:06:03+0200     info:
                /default/root_component_check/methods/'any'/default/generic_alive_check/commands/'/usr/bin/curl


                -s <a moz-do-not-send="true"
                  class="moz-txt-link-freetext"
                  href="http://localhost:8080/rudder/api/status">http://localhost:8080/rudder/api/status</a>
                |/bin/grep -q OK'[0]: Completed execution of
                '/usr/bin/curl -s <a moz-do-not-send="true"
                  class="moz-txt-link-freetext"
                  href="http://localhost:8080/rudder/api/status">http://localhost:8080/rudder/api/status</a>
                |/bin/grep -q OK'</tt><tt><br>
              </tt><tt>R:
                @@server-roles@@result_error@@server-roles@@server-roles-directive@@0@@Check


                rudder status@@None@@2014-10-07
                08:06:02+00:00##root@#The <a moz-do-not-send="true"
                  class="moz-txt-link-freetext"
                  href="http://localhost:8080/rudder/api/status">http://localhost:8080/rudder/api/status</a>
                <b>web application failed to respond for the second
                  time. Restarting jetty NOW !</b></tt><tt><br>
              </tt></small></blockquote>
          <br>
          <br>
          If so, after Rudder restarted, execute the following command
          by hand: <br>
          <br>
          <blockquote><tt>curl -v -X GET <a moz-do-not-send="true"
                class="moz-txt-link-freetext"
                href="http://localhost:8080/rudder/api/status">http://localhost:8080/rudder/api/status</a></tt><tt><br>
            </tt></blockquote>
          <br>
          If that fails to return "HTTP/1.1 200 OK" and "OK", there is
          something forbidding the test to succeed. Did you change the
          "rudder.rest.allowNonAuthenticatedUser" value in config file
          /opt/rudder/etc/rudder-web.properties ? Do you have some
          firewall filtering connection from localhost to itself ? Or
          perhaps it is something about IPv6 localhost not resolving
          correctly. <br>
          <br>
          For that last case: Java try very hard to use IPv6 over IPv4,
          so if you have in /etc/hosts:<br>
          <blockquote>::1     localhost<br>
          </blockquote>
          It will leads to problem. <br>
          <br>
          Try changing that to:<br>
          <blockquote>::1     ip6-localhost<br>
          </blockquote>
          And check that you have a line looking like:<br>
          <blockquote>127.0.0.1       localhost<br>
          </blockquote>
          <br>
          <br>
          Hope it helps, <br>
          <br>
          <br>
          <br>
          On 07/10/2014 07:03, John Robert MENDOZA wrote:<br>
        </div>
        <blockquote cite="mid:5433742C.4060502@asti.dost.gov.ph"
          type="cite">
          <meta content="text/html; charset=utf-8"
            http-equiv="Content-Type">
          Hello Francois, <br>
          <br>
          Thank you for your response. Once in a while, I encounter an
          error message "Cannot contact the server at this time." which
          refreshes the page I'm on and shows an animation "Rudder is
          loading, please wait". After then, I end up on the login page.
          Upon investigation of the log files, I found that the
          application might be triggering a "graceful" shutdown. I've
          enclosed the relevant log file for your closer inspection.<br>
          <br>
          Thanks, <br>
          Bert<br>
          <br>
          <br>
          <br>
          <br>
          <br>
          <div class="moz-cite-prefix">On Monday, 06 October, 2014 08:59
            PM, Francois Armand wrote:<br>
          </div>
          <blockquote cite="mid:5432924A.7070405@normation.com"
            type="cite">
            <meta content="text/html; charset=utf-8"
              http-equiv="Content-Type">
            <div class="moz-cite-prefix">On 05/10/2014 06:40, John
              Robert T. Mendoza wrote:<br>
            </div>
            <blockquote
cite="mid:1347832751.20291.1412484007667.JavaMail.zimbra@ne-mbox1.liham.gov.phl"
              type="cite">
              <pre wrap="">Hello,

I'm encountering periodic restarts of the rudder root service. This results of me being dropped from my current web session and prompts me to log in again. Is this an intentional behaviour or did I misconfigure something?

Thanks,

</pre>
            </blockquote>
            <br>
            <br>
            Hello, <br>
            <br>
            Periodic restart are not an intentional behavior, so there
            seems to have something not cool is happening. <br>
            <br>
            First, perhaps the application is not really restarting. Do
            you see any wainting screen ("Rudder is loading, plea wait")
            befor being redirected to the login screen ? <br>
            Does the PID of the application is changing during these
            events ? <br>
            You can know the PID of Rudder server with command: <br>
            <br>
              $ ps aux | grep rudder | grep java<br>
            <br>
            If Rudder is not restarting, perhaps the problem is on the
            authentication part (for example, at some point, the server
            is loosing your authentication cookie and so ask you a new
            authentication). <br>
            <br>
            If the application is restarting, could you please tell us
            if there is any errors  in the log:
            /var/log/rudder/webapp/xxxx_stderrout.log ?<br>
            <br>
            Thanks, <br>
            <br>
            <div class="moz-signature">-- <br>
              <meta content="text/html; charset=utf-8"
                http-equiv="Content-Type">
              <style type="text/css"><!--
    a.redlink:link { color: #962322; text-decoration: none; }
    a.redlink:visited { color: #962322; text-decoration: none; }
    .sig { font-family: sans-serif; font-size: small; }
    .sigsmall { font-family: sans-serif; font-size: x-small; }
  --></style>
              <table width="380" border="0" cellpadding="0"
                cellspacing="2">
                <tbody>
                  <tr>
                    <td colspan="2">
                      <hr></td>
                  </tr>
                  <tr>
                    <td colspan="2"><b><img alt=""
                          src="cid:part10.05040101.02080102@normation.com"
                          width="50" height="50" hspace="10"
                          align="left"> <span class="sig">François
                          ARMAND</span></b><br>
                      <span class="sig"><i>Directeur de la R&D</i></span><br>
                      <span class="sig"><a moz-do-not-send="true"
                          class="redlink"
                          href="http://www.normation.com">Normation</a></span>
                    </td>
                  </tr>
                  <tr>
                    <td colspan="2">
                      <hr></td>
                  </tr>
                  <tr>
                    <td colspan="2"><span class="sigsmall"><b>87 rue de
                          Turbigo, 75003 Paris, France</b></span></td>
                  </tr>
                  <tr>
                    <td><span class="sigsmall">Telephone:</span></td>
                    <td><span class="sigsmall">+33 (0)1 83 62 99 23</span></td>
                  </tr>
                  <tr>
                    <td><span class="sigsmall">Mobile:</span></td>
                    <td><span class="sigsmall">+33 (0)6 63 37 60 55</span></td>
                  </tr>
                  <tr>
                    <td colspan="2">
                      <hr></td>
                  </tr>
                </tbody>
              </table>
            </div>
          </blockquote>
          <br>
        </blockquote>
        <br>
        <br>
        <div class="moz-signature">-- <br>
          <meta content="text/html; charset=utf-8"
            http-equiv="Content-Type">
          <style type="text/css"><!--
    a.redlink:link { color: #962322; text-decoration: none; }
    a.redlink:visited { color: #962322; text-decoration: none; }
    .sig { font-family: sans-serif; font-size: small; }
    .sigsmall { font-family: sans-serif; font-size: x-small; }
  --></style>
          <table width="380" border="0" cellpadding="0" cellspacing="2">
            <tbody>
              <tr>
                <td colspan="2">
                  <hr></td>
              </tr>
              <tr>
                <td colspan="2"><b><img alt=""
                      src="cid:part12.02060804.04040907@normation.com"
                      width="50" height="50" hspace="10" align="left"> <span
                      class="sig">François ARMAND</span></b><br>
                  <span class="sig"><i>Directeur de la R&D</i></span><br>
                  <span class="sig"><a moz-do-not-send="true"
                      class="redlink" href="http://www.normation.com">Normation</a></span>
                </td>
              </tr>
              <tr>
                <td colspan="2">
                  <hr></td>
              </tr>
              <tr>
                <td colspan="2"><span class="sigsmall"><b>87 rue de
                      Turbigo, 75003 Paris, France</b></span></td>
              </tr>
              <tr>
                <td><span class="sigsmall">Telephone:</span></td>
                <td><span class="sigsmall">+33 (0)1 83 62 99 23</span></td>
              </tr>
              <tr>
                <td><span class="sigsmall">Mobile:</span></td>
                <td><span class="sigsmall">+33 (0)6 63 37 60 55</span></td>
              </tr>
              <tr>
                <td colspan="2">
                  <hr></td>
              </tr>
            </tbody>
          </table>
        </div>
      </blockquote>
      <br>
    </blockquote>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
      <style type="text/css"><!--
    a.redlink:link { color: #962322; text-decoration: none; }
    a.redlink:visited { color: #962322; text-decoration: none; }
    .sig { font-family: sans-serif; font-size: small; }
    .sigsmall { font-family: sans-serif; font-size: x-small; }
  --></style>
      <table width="380" border="0" cellpadding="0" cellspacing="2">
        <tbody>
          <tr>
            <td colspan="2">
              <hr></td>
          </tr>
          <tr>
            <td colspan="2"><b><img alt=""
                  src="cid:part14.02090406.00050509@normation.com"
                  width="50" height="50" hspace="10" align="left"> <span
                  class="sig">François ARMAND</span></b><br>
              <span class="sig"><i>Directeur de la R&D</i></span><br>
              <span class="sig"><a class="redlink"
                  href="http://www.normation.com">Normation</a></span> </td>
          </tr>
          <tr>
            <td colspan="2">
              <hr></td>
          </tr>
          <tr>
            <td colspan="2"><span class="sigsmall"><b>87 rue de Turbigo,
                  75003 Paris, France</b></span></td>
          </tr>
          <tr>
            <td><span class="sigsmall">Telephone:</span></td>
            <td><span class="sigsmall">+33 (0)1 83 62 99 23</span></td>
          </tr>
          <tr>
            <td><span class="sigsmall">Mobile:</span></td>
            <td><span class="sigsmall">+33 (0)6 63 37 60 55</span></td>
          </tr>
          <tr>
            <td colspan="2">
              <hr></td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>