Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent infinite retry in hudson.remoting.Launcher.parseJnlpArguments() #61

Merged
merged 1 commit into from
Dec 7, 2017

Conversation

jan-z
Copy link
Contributor

@jan-z jan-z commented Nov 25, 2017

Sometimes when restarting the jenkins master the swarm-client gets stuck in an infinite retry loop in hudson.remoting.Launcher.parseJnlpArguments().

The error looks like this:

Failing to obtain http://jenkins:8080/computer/slave1/slave-agent.jnlp
java.io.IOException: Failed to load http://jenkins:8080/computer/slave1/slave-agent.jnlp: 404 Not Found
	at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:399)
	at hudson.plugins.swarm.SwarmClient.connect(SwarmClient.java:284)
	at hudson.plugins.swarm.Client.run(Client.java:135)
	at hudson.plugins.swarm.Client.main(Client.java:87)
Waiting 10 seconds before retry
Failing to obtain http://jenkins:8080/computer/slave1/slave-agent.jnlp
java.io.IOException: Failed to load http://jenkins:8080/computer/slave1/slave-agent.jnlp: 404 Not Found
	at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:399)
	at hudson.plugins.swarm.SwarmClient.connect(SwarmClient.java:284)
	at hudson.plugins.swarm.Client.run(Client.java:135)
	at hudson.plugins.swarm.Client.main(Client.java:87)
Waiting 10 seconds before retry
...
(Log from swarm-client-3.5)

Setting launcher.noReconnect makes Launcher throw an IOException that gets handled by the swarm-plugin retry mechanism.

@oleg-nenashev
Copy link
Member

I need to review potential issues with the external failover logic, but LGTM in general

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it yesterday. It works as explained in the PR description. 👍

@oleg-nenashev oleg-nenashev merged commit 8c7e7e1 into jenkinsci:master Dec 7, 2017
@oleg-nenashev
Copy link
Member

Thanks @jan-z! It has been released in 3.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants