<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><br>
      <div class="moz-signature">
        <meta http-equiv="content-type" content="text/html;
          charset=ISO-8859-1">
        <br>
        <div class="moz-signature"><br>
          <meta http-equiv="content-type" content="text/html;
            charset=ISO-8859-1">
          <title></title>
          <br>
        </div>
      </div>
      Le 03/12/2013 11:32, Jonathan Clarke a écrit :<br>
    </div>
    <blockquote cite="mid:529DB337.5080701@normation.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">On 03/12/13 11:27, Olivier Desport
        wrote:<br>
      </div>
      <blockquote cite="mid:529DB227.2090505@ac-versailles.fr"
        type="cite">
        <meta content="text/html; charset=ISO-8859-1"
          http-equiv="Content-Type">
        <div class="moz-cite-prefix"><br>
          <div class="moz-signature">
            <meta http-equiv="content-type" content="text/html;
              charset=ISO-8859-1">
            <br>
            <div class="moz-signature"><br>
              <meta http-equiv="content-type" content="text/html;
                charset=ISO-8859-1">
              <title></title>
              <br>
            </div>
          </div>
          Le 03/12/2013 11:17, Jonathan Clarke a écrit :<br>
        </div>
        <blockquote cite="mid:529DAFC8.8040105@normation.com"
          type="cite">
          <meta content="text/html; charset=ISO-8859-1"
            http-equiv="Content-Type">
          <div class="moz-cite-prefix">Hi Olivier,<br>
            <br>
            On 03/12/13 11:13, Olivier Desport wrote:<br>
          </div>
          <blockquote cite="mid:529DAEC3.8020105@ac-versailles.fr"
            type="cite">
            <meta content="text/html; charset=ISO-8859-1"
              http-equiv="Content-Type">
            <div class="moz-cite-prefix"><br>
              <div class="moz-signature">
                <meta http-equiv="content-type" content="text/html;
                  charset=ISO-8859-1">
                <br>
                <div class="moz-signature"><br>
                  <meta http-equiv="content-type" content="text/html;
                    charset=ISO-8859-1">
                  <title></title>
                  <br>
                </div>
              </div>
              Le 03/12/2013 10:43, Matthieu CERDA a écrit :<br>
            </div>
            <blockquote cite="mid:529DA7A4.60400@normation.com"
              type="cite">
              <meta content="text/html; charset=ISO-8859-1"
                http-equiv="Content-Type">
              <div class="moz-cite-prefix">Le 02/12/2013 14:36, Olivier
                Desport a écrit :</div>
              <blockquote cite="mid:529C8CD2.90503@ac-versailles.fr"
                type="cite">
                <div class="moz-cite-prefix">
                  <div class="moz-signature">
                    <meta http-equiv="content-type" content="text/html;
                      charset=ISO-8859-1">
                    <br>
                  </div>
                  Le 02/12/2013 14:27, Matthieu CERDA a écrit :<br>
                </div>
                <blockquote cite="mid:529C8AC6.2070302@normation.com"
                  type="cite">
                  <meta content="text/html; charset=ISO-8859-1"
                    http-equiv="Content-Type">
                  <div class="moz-cite-prefix">Le 02/12/2013 13:28,
                    Olivier Desport a écrit :<br>
                  </div>
                  <blockquote
                    cite="mid:529C7D07.5090508@ac-versailles.fr"
                    type="cite">
                    <meta content="text/html; charset=ISO-8859-1"
                      http-equiv="Content-Type">
                    OK, so the invocation looks good manually too. <br>
                    <blockquote
                      cite="mid:529C73E5.2040200@normation.com"
                      type="cite"> <br>
                      Can you please send me the output of "grep
                      <NODE IP ADDRESS>
                      /var/log/rudder/apache2/access.log", to be
                      executed on the Rudder server ? (replacing the
                      node ip address by the IP of the node unable to be
                      registered) <br>
                    </blockquote>
                    The output of the grep is empty.<br>
                  </blockquote>
                  OK, and if you try with the Proxy IP ?<br>
                </blockquote>
                /usr/bin/curl  --proxy 'http://proxy-ip:port' <a
                  moz-do-not-send="true" class="moz-txt-link-freetext"
                  href="http://172.31.136.121/uuid">http://172.31.136.121/uuid</a>
                :<br>
                <br>
                it works (output : root)<br>
              </blockquote>
              Hi Olivier,<br>
              <br>
              OK, I do think it might be a proxy issue. Can you please
              run these commands to test if curl obeys the "no proxy"
              parameter ?<br>
              <br>
              First, on the client:<br>
              <br>
              - /usr/bin/curl --proxy '' -o "/var/rudder/tmp/uuid.txt" <a
                moz-do-not-send="true" class="moz-txt-link-freetext"
                href="http://172.31.0.61/uuid">http://172.31.0.61/uuid</a><br>
              - unset http_proxy<br>
              - unset ftp_proxy<br>
              - unset https_proxy<br>
              - unset no_proxy<br>
              - /usr/bin/curl --proxy '' -o "/var/rudder/tmp/uuid.txt" <a
                moz-do-not-send="true" class="moz-txt-link-freetext"
                href="http://172.31.0.61/uuid">http://172.31.0.61/uuid</a><br>
              <br>
            </blockquote>
            <br>
            It still doesn't work :<br>
            <br>
            % Total    % Received % Xferd  Average Speed   Time   
            Time     Time  Current<br>
                                             Dload  Upload   Total  
            Spent    Left  Speed<br>
            100  3159  100  3159    0     0   175k      0 --:--:--
            --:--:-- --:--:--  192k<br>
          </blockquote>
          <br>
          What indicates to you that this doesn't work? This is the
          expected output for the curl command. Can you look at the
          contents of the file /var/rudder/tmp/uuid.txt? It should
          contain the string "root". If it does, then this command is
          working.<br>
        </blockquote>
        <br>
        This file contains an html error page :<br>
        <br>
        <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" <a
          moz-do-not-send="true" class="moz-txt-link-rfc2396E"
          href="http://www.w3.org/TR/html4/strict.dtd">"http://www.w3.org/TR/html4/strict.dtd"</a>><br>
        <html><head><br>
        <meta http-equiv="Content-Type" content="text/html;
        charset=utf-8"><br>
        <title>ERROR: The requested URL could not be
        retrieved</title><br>
        [...]<br>
        </head><body id=ERR_INVALID_URL><br>
        <div id="titles"><br>
        <h1>ERROR</h1><br>
        <h2>The requested URL could not be retrieved</h2><br>
        </div><br>
        <hr><br>
        <br>
        <div id="content"><br>
        <p>The following error was encountered while trying to
        retrieve the URL: <a
        href="/uuid">/uuid</a></p><br>
        <br>
        <blockquote id="error"><br>
        <p><b>Invalid URL</b></p><br>
        </blockquote><br>
        <br>
        <p>Some aspect of the requested URL is
        incorrect.</p><br>
        <br>
        <p>Some possible problems are:</p><br>
        <ul><br>
        <li><p>Missing or incorrect access protocol (should
        be <q><a moz-do-not-send="true"
          class="moz-txt-link-freetext" href="http://">http://</a></q>
        or similar)</p></li><br>
        <li><p>Missing hostname</p></li><br>
        <li><p>Illegal double-escape in the
        URL-Path</p></li><br>
        <li><p>Illegal character in hostname; underscores
        are not allowed.</p></li><br>
        </ul><br>
        <br>
        <p>Your cache administrator is <a href=<a
          moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:webmaster?subject=CacheErrorInfo%20-%20ERR_INVALID_URL&amp;body=CacheHost%3A%20localhost%0D%0AErrPage%3A%20ERR_INVALID_URL%0D%0AErr%3A%20%5Bnone%5D%0D%0ATimeStamp%3A%20Tue,%2003%20Dec%202013%2010%3A10%3A36%20GMT%0D%0A%0D%0AClientIP%3A%20172.31.0.107%0D%0A%0D%0AHTTP%20Request%3A%0D%0A%0D%0A%0D%0A">"mailto:webmaster?subject=CacheErrorInfo%20-%20ERR_INVALID_URL&amp;body=CacheHost%3A%20localhost%0D%0AErrPage%3A%20ERR_INVALID_URL%0D%0AErr%3A%20%5Bnone%5D%0D%0ATimeStamp%3A%20Tue,%2003%20Dec%202013%2010%3A10%3A36%20GMT%0D%0A%0D%0AClientIP%3A%20172.31.0.107%0D%0A%0D%0AHTTP%20Request%3A%0D%0A%0D%0A%0D%0A"</a>>webmaster</a>.</p><br>
        <br><br>
        </div><br>
        <br>
        <hr><br>
        <div id="footer"><br>
        <p>Generated Tue, 03 Dec 2013 10:10:36 GMT by localhost
        (squid/3.1.19)</p><br>
        <!-- ERR_INVALID_URL --><br>
        </div><br>
        </body></html><br>
      </blockquote>
      <br>
      Right. This makes it very clear: this is definitely an error
      message coming from your proxy server (see "squid/3.1.19" at the
      end).<br>
      <br>
      This means that for some reason curl is using the proxy, despite
      the "--proxy ''" option, and the $no_proxy environment variable. I
      suggest you simply "unset http_proxy" before running the agent,
      and this should then work. Can you confirm that is indeed the
      case?<br>
      <br>
      We can look into why this is happening in curl aswell.<br>
      <br>
      Jonathan<br>
    </blockquote>
    I've unset  http_proxy and no_proxy, stopped and start the agent,
    and launched :<br>
    <br>
     var/rudder/cfengine-community/bin/cf-agent -KI<br>
    <br>
    The command is still curl -s -f --proxy '' ...<br>
    <br>
    output :<br>
    <br>
    R:
    @@Common@@log_info@@hasPolicyServer-root@@common-root@@00@@common@@StartRun@@2013-12-03
    12:32:13+01:00##7e00f086-0ead-4526-aed5-34490f24808f@#Start
    execution<br>
    Can't stat
    /var/rudder/share/7e00f086-0ead-4526-aed5-34490f24808f/rules/cfengine-community/rudder_promises_generated
    in files.copyfrom promise<br>
    R:
    @@Common@@result_error@@hasPolicyServer-root@@common-root@@00@@Update@@None@@2013-12-03
    12:32:13+01:00##7e00f086-0ead-4526-aed5-34490f24808f@#Cannot update
    node's policy or dependencies<br>
    R:
    @@Common@@result_success@@hasPolicyServer-root@@common-root@@00@@Security
    parameters@@None@@2013-12-03
    12:32:13+01:00##7e00f086-0ead-4526-aed5-34490f24808f@#The internal
    environment security is acceptable<br>
    R: @@Common@@result_success@@&TRACKINGKEY&@@Process
    checking@@None@@2013-12-03
    12:32:13+01:00##7e00f086-0ead-4526-aed5-34490f24808f@#There is an
    acceptable number of cf-execd processes (between 0 and 2) and
    cf-agent processes (between 0 and 5)<br>
    R:
    @@Common@@result_success@@hasPolicyServer-root@@common-root@@00@@CRON
    Daemon@@None@@2013-12-03
    12:32:13+01:00##7e00f086-0ead-4526-aed5-34490f24808f@#The CRON
    daemon is running<br>
    R:
    @@Common@@result_success@@hasPolicyServer-root@@common-root@@00@@Binaries
    update@@None@@2013-12-03
    12:32:13+01:00##7e00f086-0ead-4526-aed5-34490f24808f@#The CFengine
    binaries in /var/rudder/cfengine-community/bin are up to date<br>
     -> Executing '/usr/bin/curl -s -f --proxy '' -o
    "/var/rudder/tmp/uuid.txt" <a class="moz-txt-link-freetext" href="http://172.31.0.61/uuid">http://172.31.0.61/uuid</a>' ... (no timeout)<br>
     !! Finished command related to promiser "/usr/bin/curl" -- an error
    occurred (returned 22)<br>
    cf-agent aborted on defined class "could_not_download_uuid"<br>
  </body>
</html>