question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Container cannot connect to node because it doesn't exist

See original GitHub issue

We recently updated our version of Jenkins to 2.176.3. And now a connection error with docker-agent randomly block the queue of jobs :

Refusing headers from remote: Unknown client name: docker-00026wu6nor9w

The docker container is ready and try to connect to the Jenkins master but the node doesn’t exist yet.

I saw in the code of docker-plugin that the container is created and started before the Jenkins node. While the connection method is JNLP, the commands to download and run the remoting.jar are executed at the start of the container. But at this moment, the node wasn’t added to Jenkins master.

Have you ever encountered this error? Is there a solution?

Is it possible to modify provision methods and create the Jenkins node before instanciate the container to fix this issue?

Jenkins version : 2.176.3 docker-plugin version : 1.1.7 docker engine version : 1.13.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
pjdartoncommented, Oct 16, 2019

As for fixing the problem you saw with JNLP, it may be curable by changing the plugin code, but it’s a tricky one. It’s tricky because, until the container has started, we don’t know everything we need to know about the slave node we return to Jenkins … but, if the container runs very quickly and has no retry logic inside it then we need to pass the slave node to Jenkins before we start the container. i.e. both events have reasons why they need to happen before the other one…

2reactions
pjdartoncommented, Nov 18, 2019

It’s the newest option. When it was originally introduced it had a bug (#628) that caused it to fail sometimes if the network wasn’t perfect between Jenkins & docker, but that’s now been fixed (in PR #693). I am not aware of there being any other problems with it, but it hasn’t had the same number of years of use that the other methods have.

I would suggest that you continue to use it and, if you do find bugs, you raise a bug report (providing awesome levels of clarity to make it easy to fix) … and ideally also follow that with a PR that fixes the issue too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NodeJS in Docker doesn't see connection - Stack Overflow
1 Answer 1 · Check if the container is started or if it exits immediately ( docker ps ) · If the container...
Read more >
Container cannot connect to node because it doesn't exist
The docker container is ready and try to connect to the Jenkins master but the node doesn't exist yet. I saw in the...
Read more >
4 Reasons Why Your Docker Containers Can't Talk to Each ...
After you finally containerise your Node.js app, you're eager to see if it works. You run it, but then this happens: "Error: connect...
Read more >
Kubernetes Error Codes: Container Not Found | Datree.io
The `container not found` error code generally indicates that kubectl can't establish communication with the pod or container you are trying to ...
Read more >
Deploy services to a swarm - Docker Documentation
This is a naive example, since you can't interact with the Nginx service. ... credspec.json) already exists, and that the nodes being deployed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found