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

master deployment: slaves can't connect due to "JNLP TCP port" set to "disabled" #177

Closed
gavanderhoorn opened this issue Jan 11, 2018 · 14 comments

Comments

@gavanderhoorn
Copy link
Contributor

As per subject really.

Not sure whether this is due to configuration by puppet not completing because of other issues, but none of my slaves/agents can connect initially.

Errors seen: "slaveAgentPort.disabled Go to security configuration screen and change it."

Indeed after a master reconfigure the TCP port for JNLP agents is set to Disable in the Configure Global Security panel of the master configuration.

@gavanderhoorn
Copy link
Contributor Author

Setting this to Random, saving and restarting Jenkins makes all slaves come up.

@inigomartinez
Copy link

Setting this to Random, saving and restarting Jenkins makes all slaves come up.

When I tried this, the slaves disappeared 😞.

@gavanderhoorn
Copy link
Contributor Author

gavanderhoorn commented Jan 19, 2018

I had to restart the slaves after restarting Jenkins.

@gavanderhoorn
Copy link
Contributor Author

@inigomartinez: did restarting the slaves work for you?

@nuclearsandwich
Copy link
Contributor

There's a new resource that will be introduced by #183 for running Groovy scripts via puppet.

http://javadoc.jenkins.io/jenkins/model/Jenkins.html#setSlaveAgentPort-int- and http://javadoc.jenkins.io/jenkins/model/Jenkins.html#setAgentProtocols-java.util.Set- are the API methods of relevance.

In the interest of secure defaults, even as they deviate from build.ros.org I think it would be best to try and only enable the v4 agent protocol (which uses TLS for secure communication).

@inigomartinez
Copy link

@inigomartinez: did restarting the slaves work for you?

No, it didn't worked just restarting, but the issue is fixed now. I didn't realize the JNLP2 option was disabled, so after enabling it, the slaves connected seamlessly 😃.

@gavanderhoorn
Copy link
Contributor Author

Ah, ok.

Simply restarting without changing the setting was not going to solve it no :)

@gavanderhoorn
Copy link
Contributor Author

@nuclearsandwich: just brought up a master deployment and without changing anything only the Java Web Start Agent Protocol/4 (TLS encryption) option is enabled.

@gavanderhoorn
Copy link
Contributor Author

Hm. Now I understand @inigomartinez's #177 (comment): Jenkins 2.89.3 appears to by default disable all slave protocols except version 4 with TLS.

The slaves/agents seem to only support JNLP2, and can't connect now.

@gavanderhoorn
Copy link
Contributor Author

Only agents v3.3 and up seem to support JNLP4, but that jar doesn't seem to want to cooperate when I drop it in-place of the v2.2 that is currently deployed.

(is there some swarm plugin doc I'm missing that details which protocols are supported? Cause it's really hard to find)

@gavanderhoorn
Copy link
Contributor Author

Unfortunately enabling JNLP2 to get the agents to connect results in Jenkins (2.89.3) to display the following warning:

This Jenkins instance uses deprecated protocols: JNLP2-connect. It may impact stability of the instance. If newer protocol versions are supported by all system components (agents, CLI and other clients), it is highly recommended to disable the deprecated protocols.

@nuclearsandwich
Copy link
Contributor

Until we have a chance to test an updated swarm plugin I think we'll have to enable JNLP2 as well and live with the warning.

@jonazpiazu
Copy link
Contributor

Only agents v3.3 and up seem to support JNLP4, but that jar doesn't seem to want to cooperate when I drop it in-place of the v2.2 that is currently deployed.

I am not sure if it is still relevant, but I just tried to "drop in place" the latest available version for the agent, which is v3.4 and it seems to be working nicely.

Using Jenkins version 2.89.2 and JNLP4.

@nuclearsandwich
Copy link
Contributor

One of the changes in #207 was a forked version of the jenkins module we're using to allow proper installation of more recent swarm client versions. The version is now specified in the buildfarm_deployment_config, here's the relevant entries in the example config.

I believe that with the move to more recent swarm clients and Jenkins' current defaults that no changes are needed for a secure instance with functioning swarm agents, so I'll close this one. But if someone is still having issues I am happy to re-open and/or help them investigate.

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

No branches or pull requests

4 participants