-
Notifications
You must be signed in to change notification settings - Fork 319
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
JNLP launcher broken since 1.1.3 #635
Comments
...my expectation is as described in the docs:
No mention of a special script or the remoting JAR, which -- from my point of view -- doesn't make any sense to duplicate into every custom image, when it can be provisioned by Jenkins (as it has ben the case). |
ran into the same problem.... can this please be fixed? |
I've recently had to do some investigation in this area (docker + JNLP) and I've found out some information that may be useful. FYI the basic expectation of the plugin code seems to be that any container that's connecting via JNLP will have the same kind of entry point as https://hub.docker.com/r/jenkins/jnlp-slave/ It does, however, highlight a discrepancy between https://hub.docker.com/r/jenkins/jnlp-slave/ and what other users (such as yourselves) "reasonable expectations" might be - personally, I don't think you're being unreasonable in expecting it to be possible to use a custom image for JNLP without having to copy/paste the script that the "official" JNLP image uses. |
I've had a go at implementing a solution for this. Can you both (@fxnn and @magn2) please try it out and see if it resolves the situation? To test it, download the .hpi file from https://ci.jenkins.io/job/Plugins/job/docker-plugin/view/change-requests/job/PR-654/lastSuccessfulBuild/artifact/target/, install it into a test Jenkins server, then drill down to the JNLP configuration for your container (Manage Jenkins -> Configure System -> Cloud -> your docker cloud -> Templates -> your JNLP-using template -> "Connect method") and then take a look at the new field "EntryPoint Arguments". If you can try this out for me, and also let me know any comments/feedback you have (e.g. suggestions on different names, different wording on the help text), then there's a good chance we can get this enhancement included in the next official version of the docker-plugin. |
Nice job, thank you for looking into this!! I'll comment as soon as I have the test plugin installed. |
Thanks for looking into this @pjdarton. Only thing that got me confused in the first place is the multiline mode (turn it on before pasting the example!) |
Confused? Could you explain in more detail? If you could describe exactly what it did that was confusing, and what you think it should do instead, it's possible that I might be able to make it less confusing. |
Confused meaning: The example (sh -c ....) did only work when I pasted it in multiline mode, not as one line. |
Ah, ok. Understood. OK, I'll edit the help-text and see if I can make it clearer. |
OK, I've enhanced the help text for...
See ad68a22 for details of the changes. There's a new hpi at https://ci.jenkins.io/job/Plugins/job/docker-plugin/view/change-requests/job/PR-654/lastSuccessfulBuild/artifact/target/ with the new help text. |
Thanks, jeah that should make it clear 👍 The following is unrelated: After having it running a bit, I still seem to have issues with my connectivity, closing connections and random timeouts after some time of the containers running..... this is similar to the "attach" method.
I mean, this all can be caused by our company network/proxy stuff. |
Re: unrelated I've experienced disconnection issues where I work too, and debugging them is very difficult :-(
w.r.t. configuring logging: On a docker container, for it to be useful, it'd have to log to a file that was on a non-temporary filesystem, e.g. something mounted from the host (and, as the logfiles would be shared, you'd need to include something like hostname/container-names/slave-names in the log entries in order to avoid ambiguity). |
@fxnn Any further comment? Does this fix it for you? |
@pjdarton Tested with Jenkins LTS 2.107.3 and work's like a charm for me! I wonder whether the prerequisite text of the connect method could be misleading. It says:
To me, this sounds a bit like "okay, there's a slave.jar somewhere, Jenkins will somehow find and launch it". My suggestion would be
Anyways, thanks a lot for looking into this! |
Text updated. See afefa53 . This will be "fixed in the next release". |
When will it be released? Any idea? |
There's some work in progress at present. Once that's done (1-2 weeks?) and soak-tested (1-2 weeks) then, if there's nothing else urgent in progress... In the meantime, download the hpi (see above for URL) of the dev build. |
@pjdarton I cannot download them directly (404). Thank you |
Ah, yes, oops - my mistake. As the changes have already been merged, the PR is closed, so the Jenkins CI system tidies it all up, hence 404. All these changes are now in the main code, albeit not released yet. |
Since update to 1.1.3, docker-plugin fails to launch containers on our Jenkins instance.
We use containers with java preinstalled, and the
Connect with JNLP
option. We did not need to configure any entrypoint or command, neither inDockerfile
, nor in Jenkins. Therefore, we could keep minimal configuration (convention over configuration).This worked, but since 1.1.3, we get the following log messages:
Seems that docker-plugin doesn't invoke
java
anymore, but simply passes-url
, which obviously doesn't work without manually configuring an entrypoint:\"exec: \\"-url\\": executable file not found in $PATH\"
Seems to be introduced through commit 4ae1f17df29, where you dropped the
java
etc. arguments. The commit message says something from a "default behaviour", but I don't see how to switch back to the old behaviour.Thank you for your work and for looking into this!
docker-plugin version: 1.1.3
jenkins version: 2.110
docker engine: 17.09.1-ce
The text was updated successfully, but these errors were encountered: