# Exec node results in Docker inconsistent

**URL:** <https://discourse.nodered.org/t/exec-node-results-in-docker-inconsistent/75610>\
**Category:** General\
**Tags:** docker\
**Created:** [23 February 2023 01:49 UTC](https://discourse.nodered.org/t/exec-node-results-in-docker-inconsistent/75610 "2023-02-23T01:49:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)\
**Post date:** [23 February 2023 01:49 UTC](https://discourse.nodered.org/t/exec-node-results-in-docker-inconsistent/75610/1 "2023-02-23T01:49:40Z")

</div>

For over a year I've been charting my Internet connection metrics as reported by speedtest-cli run from an Exec node:

![Screenshot_2023-02-22_16-20-05](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/0/800a94498d2f1a8c2a794fcd0429a4d2f752f57d.png)

With this configuration:

![Screenshot_2023-02-22_16-19-35](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/7/87186059245d20f6d4b1d133124f9e4302894051.png)

It has always had occasional fails but in the last few months the failure rate has been getting steadily much worse. The error is:

![Screenshot_2023-02-22_16-20-30](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/b/bb492db6e558197c1650bc0c3f8f8635cc2cc9b1.png)

NR 3.0.2 is running in Docker on the same Linux host it's been on for years and what really puzzles me is that I can run the same command from a host terminal window and it succeeds every time. It also succeeds every time I click the tab on the cronplus node. For the life of me I cannot figure out why the hourly run fails roughly 70% of the time overall.

I thought adding the timeout might help as it defaults to 10s but no such luck. I have also specified the host machine by it's DNS name and IP address in addition to localhost and it makes no difference.

I'll be grateful to anyone who can explain what the difference is that gives such disparate results.

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [23 February 2023 08:31 UTC](https://discourse.nodered.org/t/exec-node-results-in-docker-inconsistent/75610/2 "2023-02-23T08:31:34Z")

</div>

Does the speedtest-cli works from the Docker exec prompt?  
Can you ping speedtest from the Docker exec prompt?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [23 February 2023 09:40 UTC](https://discourse.nodered.org/t/exec-node-results-in-docker-inconsistent/75610/3 "2023-02-23T09:40:30Z")

</div>

That appears to be an error from speedtest-cli (Cannot retrieve speedtest configuration) complaining that it cannot resolve the soeedtest url due to a DNS problem. So that suggests that the problem is not with the ssh connection, but with running the speedtest. Why the DNS should fail under the circumstances you describe, I have no idea.

If you detect the failure and immediately retry, does it recover?

---

<div class="post-metadata">

**Author:** ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)\
**Post date:** [23 February 2023 15:26 UTC](https://discourse.nodered.org/t/exec-node-results-in-docker-inconsistent/75610/4 "2023-02-23T15:26:47Z")

</div>

> [@Colin](#):
>
> So that suggests that the problem is not with the ssh connection, but with running the speedtest. Why the DNS should fail under the circumstances you describe, I have no idea.

Welcome to the boat, @Colin 😀

> [@Colin](#):
>
> If you detect the failure and immediately retry, does it recover?

Yes! Crazy, huh?

> [@edje11](#):
>
> Does the speedtest-cli works from the Docker exec prompt?

Yes (I assume you mean "shell")

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [23 February 2023 17:18 UTC](https://discourse.nodered.org/t/exec-node-results-in-docker-inconsistent/75610/5 "2023-02-23T17:18:22Z")

</div>

@LosinIt \>Yes (I assume you mean "shell")

He means from the shell within the container.

---

<div class="post-metadata">

**Author:** ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)\
**Post date:** [23 February 2023 17:43 UTC](https://discourse.nodered.org/t/exec-node-results-in-docker-inconsistent/75610/6 "2023-02-23T17:43:08Z")

</div>

> [@bakman2](#):
>
> He means from the shell within the container.

And so do I

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [24 April 2023 17:43 UTC](https://discourse.nodered.org/t/exec-node-results-in-docker-inconsistent/75610/7 "2023-04-24T17:43:23Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
