<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    That's neat. Thanks again. <br>
    <br>
    <div class="moz-cite-prefix">On Wednesday, 08 October, 2014 03:48
      PM, Francois Armand wrote:<br>
    </div>
    <blockquote cite="mid:5434EC36.7080404@normation.com" type="cite">
      <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
      <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 moz-do-not-send="true" 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 cellpadding="0" cellspacing="2" border="0"
                  width="380">
                  <tbody>
                    <tr>
                      <td colspan="2">
                        <hr></td>
                    </tr>
                    <tr>
                      <td colspan="2"><b><img alt=""
                            src="cid:part11.08040802.07040601@asti.dost.gov.ph"
                            align="left" height="50" hspace="10"
                            width="50"> <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 cellpadding="0" cellspacing="2" border="0"
              width="380">
              <tbody>
                <tr>
                  <td colspan="2">
                    <hr></td>
                </tr>
                <tr>
                  <td colspan="2"><b><img alt=""
                        src="cid:part13.08010705.08090403@asti.dost.gov.ph"
                        align="left" height="50" hspace="10" width="50">
                      <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 cellpadding="0" cellspacing="2" border="0" width="380">
          <tbody>
            <tr>
              <td colspan="2">
                <hr></td>
            </tr>
            <tr>
              <td colspan="2"><b><img alt=""
                    src="cid:part15.07080409.06010103@asti.dost.gov.ph"
                    align="left" height="50" hspace="10" width="50"> <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>
  </body>
</html>