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

Cannot specify private IP address for JNLP Windows containers to use for Jenkins master #228

Open
rtargosz opened this issue Apr 24, 2018 · 4 comments

Comments

@rtargosz
Copy link

  1. Our Jenkins server has multiple IP addresses (internal, local 10.206.x.x and external, public IP). The load balancer doesn’t allow any traffic except ports 80 and 443 through, so we have to connect to Docker JNLP containers using the local IP address (this isn’t an issue for SSH since the master ‘pushes’ to the slave, but we have some Windows nodes and need them to have access to the Jenkins master to ‘pull’). We’ve tried a bunch of ways to force the Docker JNLP containers to pick up the private IP, including:
    a. JENKINS_TUNNEL variable set to private URL
    b. JENKINS_URL variable set to private URL
    c. Jenkins Slave config, Launch method, JNLP, Different Jenkins master URL
    d. Modifying the JNLP java launch script to force the IP address
    But it always seems to default to the Jenkins Configuration global setting for ‘Jenkins Location->Jenkins URL’.
    We’ve temporarily changed this to the local IP (http://10.206.x.x:8080), but this causes other problems, including links redirecting users to the local IP and asking them to re-login. Ideally, we want to have the Jenkins location set to https://jenkins.serverdns.com, but cannot due to this issue.
@samrocketman
Copy link
Contributor

samrocketman commented Apr 25, 2018

image

Using Linux containers...

This works for me by configuring the Different jenkins master URL under the Launch method of yet another docker plugin cloud settings in the Jenkins global config.

Yet Another Docker Plugin 0.1.0-rc47

@rtargosz
Copy link
Author

That option isn't working for us; I had tried it before posting here and confirmed it again last week.

@denami
Copy link
Contributor

denami commented Jun 7, 2018

JnlpAgentEndpointResolver receive list of Jenkins URLs ({Jenkins URL}, {Different jenkins master URL}). It check and sort each of URL and return jnlp port for wienerJenkinsURL. But JnlpAgentEndpointResolver do not check port for available and return it. Yet-another-docker-plugin will be try to recreate container because jenkins slave can`t connect to master in time.
I think it is not yet-another-docker-plugin issue.

@denami
Copy link
Contributor

denami commented Jun 12, 2018

It is remoting issue JENKINS-51818. Can be fixed by this PR: jenkinsci/remoting#275

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

No branches or pull requests

3 participants