[JIRA] (JENKINS-5401) Swarm client should support environment variables and tool locations from command line

0 views
Skip to first unread message

jimklimov@gmail.com (JIRA)

unread,
Feb 21, 2019, 7:20:03 PM2/21/19
to jenkinsc...@googlegroups.com
Jim Klimov commented on Improvement JENKINS-5401
 
Re: Swarm client should support environment variables and tool locations from command line

Actually... no

As an example, I wanted to set envvars for HTTP proxy to be used by the build processes, same as I had on static nodes.

If I export https_proxy et al in the wrapper script that starts the swarm client, this client also tries to connect to Jenkins through the proxy, rather than directly:
````
Feb 22 00:09:39 ci-image jenkins-swarm-client.sh[32634]: Feb 22, 2019 12:09:39 AM hudson.remoting.jnlp.Main$CuiListener status
Feb 22 00:09:39 ci-image jenkins-swarm-client.sh[32634]: INFO: Connecting to jenkins2.localdomain:39595 (retrying:11)
Feb 22 00:09:39 ci-image jenkins-swarm-client.sh[32634]: java.io.IOException: Failed to connect to jenkins2.localdomain:39595 through proxy thunderbolt.localdomain/10.20.30.40:8081
Feb 22 00:09:39 ci-image jenkins-swarm-client.sh[32634]: at org.jenkinsci.remoting.engine.JnlpAgentEndpoint.open(JnlpAgentEndpoint.java:242)
Feb 22 00:09:39 ci-image jenkins-swarm-client.sh[32634]: at hudson.remoting.Engine.connect(Engine.java:698)
Feb 22 00:09:39 ci-image jenkins-swarm-client.sh[32634]: at hudson.remoting.Engine.innerRun(Engine.java:552)
Feb 22 00:09:39 ci-image jenkins-swarm-client.sh[32634]: at hudson.remoting.Engine.run(Engine.java:474)
Feb 22 00:09:39 ci-image jenkins-swarm-client.sh[32634]: Caused by: java.io.IOException: Got a bad response from proxy: HTTP/1.1 403 Forbidden
Feb 22 00:09:39 ci-image jenkins-swarm-client.sh[32634]: at org.jenkinsci.remoting.engine.JnlpAgentEndpoint.open(JnlpAgentEndpoint.java:223)
Feb 22 00:09:39 ci-image jenkins-swarm-client.sh[32634]: ... 3 more
Feb 22 00:09:39 ci-image jenkins-swarm-client.sh[32634]: Feb 22, 2019 12:09:39 AM hudson.remoting.jnlp.Main$CuiListener error
Feb 22 00:09:39 ci-image jenkins-swarm-client.sh[32634]: SEVERE: Failed to connect to jenkins2.localdomain:39595 through proxy thunderbolt.localdomain/10.20.30.40:8081
Feb 22 00:09:39 ci-image jenkins-swarm-client.sh[32634]: java.io.IOException: Failed to connect to jenkins2.localdomain:39595 through proxy thunderbolt.localdomain/10.20.30.40:8081
Feb 22 00:09:39 ci-image jenkins-swarm-client.sh[32634]: at org.jenkinsci.remoting.engine.JnlpAgentEndpoint.open(JnlpAgentEndpoint.java:242)
Feb 22 00:09:39 ci-image jenkins-swarm-client.sh[32634]: at hudson.remoting.Engine.connect(Engine.java:698)
Feb 22 00:09:39 ci-image jenkins-swarm-client.sh[32634]: at hudson.remoting.Engine.innerRun(Engine.java:552)
Feb 22 00:09:39 ci-image jenkins-swarm-client.sh[32634]: at hudson.remoting.Engine.run(Engine.java:474)
Feb 22 00:09:39 ci-image jenkins-swarm-client.sh[32634]: Caused by: java.io.IOException: Got a bad response from proxy: HTTP/1.1 403 Forbidden
Feb 22 00:09:39 ci-image jenkins-swarm-client.sh[32634]: at org.jenkinsci.remoting.engine.JnlpAgentEndpoint.open(JnlpAgentEndpoint.java:223)
Feb 22 00:09:39 ci-image jenkins-swarm-client.sh[32634]: ... 3 more
````

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

jimklimov@gmail.com (JIRA)

unread,
Feb 25, 2019, 2:50:02 PM2/25/19
to jenkinsc...@googlegroups.com

FWIW, in the end I quickly worked around the issue above on the squid side, allowing port 39595 (as if "SSL_ports").

But it is still an unclean solution, with the swarm client going through the proxy at all (just because we want the building processes to use the proxy)... Same or worse may apply to e.g. customized PATH or some similar settings.

me@basilcrow.com (JIRA)

unread,
Aug 13, 2019, 4:08:03 PM8/13/19
to jenkinsc...@googlegroups.com
Basil Crow reopened an issue
 
Jenkins / Improvement JENKINS-5401
Change By: Basil Crow
Resolution: Won't Fix
Status: Closed Reopened
Assignee: Basil Crow

me@basilcrow.com (JIRA)

unread,
Aug 13, 2019, 4:09:02 PM8/13/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages