Change By: J Knurek (04/Feb/15 5:59 PM)
Summary: slaves not connecting slave-agent.jnlp provides unclear error when failing to connect  through https
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 :
bq.wget http://build.server.com/ci/jnlpJars/slave.jar -O slave.jar
{code}
--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]
{code}

it's getting these errors:
bq.java -jar slave.jar -jnlpUrl http://build.server.com/ci/computer/153412c7-b1df-43ec-a5bc-16cf53a14a19/slave-agent.jnlp
{code}
[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
{code}

This is the nginx proxy redirect configuration:
{code}
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;
    }
}
{code}
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. 
Priority: Major Minor
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