Possible regression from JENKINS-32326?

115 views
Skip to first unread message

Tim Downey

unread,
Aug 23, 2016, 6:31:55 PM8/23/16
to Jenkins Users
Hi,

I just updated my Jenkins to 2.7.2 and am having issues with my slave nodes.  From the looks of things, it may be related to JENKINS-32326.  I'm hoping someone familiar with the issue can either tell me I'm wrong or help me figure out the situation.

I'm running a master with multiple slave nodes.  The slave nodes are connecting using the Jenkins Swarm client (2.2).  After upgrading to 2.7.2 my slaves started refusing to connect.  They would receive the following error:

vantage-jenkins-slave_1   | Failing to obtain http://XXXXXXXXX.com/computer/d73296bbedb4-9b67a324/slave-agent.jnlp
vantage-jenkins-slave_1   | java.io.IOException: Failed to load http://XXXXXXXXX.com/computer/d73296bbedb4-9b67a324/slave-agent.jnlp: 407 Proxy Authentication Required
vantage-jenkins-slave_1   |     at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:275)
vantage-jenkins-slave_1   |     at hudson.plugins.swarm.SwarmClient.connect(SwarmClient.java:275)
vantage-jenkins-slave_1   |     at hudson.plugins.swarm.Client.run(Client.java:138)
vantage-jenkins-slave_1   |     at hudson.plugins.swarm.Client.main(Client.java:88)
vantage-jenkins-slave_1   | Waiting 10 seconds before retry

The issue seems to be related to proxy settings.  Prior to 2.7.2, my slave agents all had bash environment variables for http_proxy, https_proxy, and no_proxy all set prior to launch.  As long as these variables were set, I am unable to connect my slave to the master.  The issue seems to be occurring because the slaves are getting their http_proxy setting from the master, but NOT the no proxy settings.  This error is coming from my corporate proxy which should not be needed by the slave to connect to the master since it is an internal network.

When I changed the slave to not set http_proxy, https_proxy, and no proxy, the slaves are able to successfuly connect to the master.  The problem is that now slaves are unable to perform npm or bower builds since they are no longer using the proxy settings to get to the internet.

Am I understanding correctly that the slave should be picking up the proxy settings from the master?  If so, is it supposed to be picking it up from the preferences in the Manage Plugins panel?  Is it supposed to be somewhere else.

Thanks....hopefully I'm missing something small here.

Tim

Daniel Beck

unread,
Aug 23, 2016, 7:31:42 PM8/23/16
to jenkins...@googlegroups.com

> On 23.08.2016, at 20:31, Tim Downey <timothy...@gmail.com> wrote:
>
> Am I understanding correctly that the slave should be picking up the proxy settings from the master? If so, is it supposed to be picking it up from the preferences in the Manage Plugins panel? Is it supposed to be somewhere else.
>

Slaves are not supposed to inherit environment variables from master unless explicitly configured that way. I'd check the slave configuration (.bash_profile, /etc/profile, …) for these.

Tim Downey

unread,
Aug 23, 2016, 7:39:43 PM8/23/16
to Jenkins Users, m...@beckweb.net
Hi Daniel,

Thanks for responding.  A little more research on my part is showing the change is occuring when moving from Swarm 2.0 client to Swarm 2.2.  Possibly a result of this change in Swarm 2.1.
  • Updating jenkins remoting dependency. Swarm client now matches the jenkins-remoting version in Jenkins-1.625.3 LTS

Basically the issue is that the Swarm client in 2.1+ seems to be taking some part of the proxy information from the master and ignoring or otherwise mangling the environment variables.  It may be precedent related.  With Swarm 2.0 client, I am successfully setting the bash variables for http_proxy and no_proxy before launching the client.  In this configuration, everything works well.

When using Swarm 2.2, the client seems to be ignoring the bash settings and getting proxy settings from somewhere else (I'm assuming the master).  I'm not sure if it is getting all of the settings though, since my master has proxy settings that include a username and password.  The error that I receive leads me to think that the Swarm 2.2 client is getting the proxy url and port, but not the username and password creds.

See again from the error highlighted below..

vantage-jenkins-slave_1   | Failing to obtain http://XXXXXXXXX.com/computer/d73296bbedb4-9b67a324/slave-agent.jnlp
vantage-jenkins-slave_1   | java.io.IOException: Failed to load http://XXXXXXXXX.com/computer/d73296bbedb4-9b67a324/slave-agent.jnlp: 407 Proxy Authentication Required
vantage-jenkins-slave_1   |     at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:275)
vantage-jenkins-slave_1   |     at hudson.plugins.swarm.SwarmClient.connect(SwarmClient.java:275)
vantage-jenkins-slave_1   |     at hudson.plugins.swarm.Client.run(Client.java:138)
vantage-jenkins-slave_1   |     at hudson.plugins.swarm.Client.main(Client.java:88)
vantage-jenkins-slave_1   | Waiting 10 seconds before retry

Reply all
Reply to author
Forward
0 new messages