Issue Type: Bug Bug
Assignee: Francis Upton
Components: ec2-plugin
Created: 03/Feb/15 9:58 PM
Description:

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, it's getting these errors:

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]

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 is of no help.

Environment: 1.598
nginx
Project: Jenkins
Priority: Major Major
Reporter: J Knurek
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to