This issue is archived. You can view it, but you can't modify it. Learn more

ExportXMLWordPrintable

      The EC2 plugin was working fine until we configured the jenkins master to use https.

      Now, when the slave server starts up and tries to connect to master:

      wget http://build.server.com/ci/jnlpJars/slave.jar -O slave.jar

      --2015-02-03 21:22:54--  http://build.server.com/ci/jnlpJars/slave.jar
      Resolving build.server.com (build.server.com)... 10.60.143.48
      Connecting to build.server.com (build.server.com)|10.60.143.48|:80... connected.
      HTTP request sent, awaiting response... 302 Moved Temporarily
      Location: https://build.server.com/ci/jnlpJars/slave.jar [following]
      --2015-02-03 21:22:55--  https://build.server.com/ci/jnlpJars/slave.jar
      Connecting to build.server.com (build.server.com)|10.60.143.48|:443... connected.
      HTTP request sent, awaiting response... 200 OK
      Length: 439751 (429K) [application/java-archive]
      Saving to: `slave.jar'
      
      
       0% [                                       ] 0           --.-K/s              
      100%[======================================>] 439,751     --.-K/s   in 0.1s    
      
      2015-02-03 21:22:56 (4.29 MB/s) - `slave.jar' saved [439751/439751]
      

      it's getting these errors:

      java -jar slave.jar -jnlpUrl http://build.server.com/ci/computer/153412c7-b1df-43ec-a5bc-16cf53a14a19/slave-agent.jnlp

      [Fatal Error] slave-agent.jnlp:6:3: The element type "hr" must be terminated by the matching end-tag "</hr>".
      Failing to obtain http://build.server.com/ci/computer/153412c7-b1df-43ec-a5bc-16cf53a14a19/slave-agent.jnlp
      java.io.IOException: http://build.server.com/ci/computer/153412c7-b1df-43ec-a5bc-16cf53a14a19/slave-agent.jnlp doesn't look like a JNLP file; content type was text/html
        at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:304)
        at hudson.remoting.Launcher.run(Launcher.java:219)
        at hudson.remoting.Launcher.main(Launcher.java:192)
      Waiting 10 seconds before retry
      

      This is the nginx proxy redirect configuration:

      server {
          listen 80;
          server_name build.server.com;
          return 302 https://$server_name$request_uri;
      }
      
      server {
          listen 443 ssl;
      
          ssl_certificate           ....
      
          location / {
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header Host $http_host;
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Forwarded-Proto $scheme;
              proxy_redirect http://127.0.0.1:8881 https://build.server.com;
              proxy_pass http://127.0.0.1:8881;
          }
      }
      

      It would seem that the problem is in the proxy redirect, because 169.254.169.254/latest/user-data is returning http, and that is what the slave-agent ends up using. But the error message of `The element type "hr" must be terminated` is of no help.

            Assignee:
            Francis Upton
            Reporter:
            J Knurek
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: