# Automatic netdata Updater fails

**URL:** <https://community.netdata.cloud/t/automatic-netdata-updater-fails/2420>\
**Category:** Help\
**Tags:** agent, agent-health\
**Created:** [January 17, 2022, 9:53am UTC](https://community.netdata.cloud/t/automatic-netdata-updater-fails/2420 "2022-01-17T09:53:27Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bernd](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/bernd/32/1460_2.png) [@Bernd](https://community.netdata.cloud/u/Bernd)\
**Post date:** [January 17, 2022, 9:53am UTC](https://community.netdata.cloud/t/automatic-netdata-updater-fails/2420/1 "2022-01-17T09:53:27Z")

</div>

Hi, I’m deeply impressed from this fine tool.

I did this ask @discord, without an reply, Anyway, posting with code tags is more clear. 🙂

## Environment

Debian Buster native installation. installed netdata with **bash \<(curl -Ss [https://my-netdata.io/kickstart-static64.sh](https://my-netdata.io/kickstart-static64.sh))**

It works so far, but Updates are failing.

## Problem/Question

Updates fails with an Error “Permission denied” every time

```auto
# bash <(curl -Ss https://my-netdata.io/kickstart-static64.sh)
 --- Found existing install of Netdata under: /opt/netdata --- 
 --- Attempting to update existing install instead of creating a new one --- 
[/var/lib/fail2ban]# /opt/netdata/usr/libexec/netdata/netdata-updater.sh --not-running-from-cron 
Mo 17. Jan 10:38:29 CET 2022 : INFO: Checking if a newer version of the updater script is available.
/opt/netdata/usr/libexec/netdata/netdata-updater.sh: line 120: /tmp/netdata-test.pcBiIZOo7D: Permission denied
/opt/netdata/usr/libexec/netdata/netdata-updater.sh: line 120: /tmp/netdata-test.M5DBi1vyIm: Permission denied
Mo 17. Jan 10:38:30 CET 2022 : INFO: Entering /tmp/netdata-updater-0RZujQJrGk
Mo 17. Jan 10:38:30 CET 2022 : INFO: Current Version: 00103200100071
Mo 17. Jan 10:38:30 CET 2022 : INFO: Latest Version: 00103200100078
Mo 17. Jan 10:38:30 CET 2022 : INFO: Update available
Mo 17. Jan 10:38:30 CET 2022 : ERROR: FAILED TO UPDATE NETDATA : Static binary checksum validation failed. Stopping netdata installation and leaving binary in /tmp/netdata-updater-0RZujQJrGk\nUsually this is a result of an older copy of the file being cached somewhere and can be resolved by simply retrying in an hour.
 FAILED  

 ABORTED Failed to update existing Netdata install 

```

## What I expected to happen

Can anyone lead me to the solution? What can I do?  
Regards

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [January 17, 2022, 10:52am UTC](https://community.netdata.cloud/t/automatic-netdata-updater-fails/2420/2 "2022-01-17T10:52:31Z")

</div>

Hi, @Bernd.

> [@Bernd](#):
>
> but Updates are failing

Was it once? This looks similar to [Installation fails with "Tarball checksum validation failed" due to geoblock · Issue #11939 · netdata/netdata · GitHub](https://github.com/netdata/netdata/issues/11939) (a temporary issue we couldn’t debug so far).

I’d suggest re-running the updater manually (or waiting until the next cron run) and checking if the issue is gone or not.

---

<div class="post-metadata">

**Author:** ![Bernd](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/bernd/32/1460_2.png) [@Bernd](https://community.netdata.cloud/u/Bernd)\
**Post date:** [January 17, 2022, 10:54am UTC](https://community.netdata.cloud/t/automatic-netdata-updater-fails/2420/3 "2022-01-17T10:54:09Z")

</div>

No, the issue persists since some days. I did test it round about 10 times

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [January 17, 2022, 10:54am UTC](https://community.netdata.cloud/t/automatic-netdata-updater-fails/2420/4 "2022-01-17T10:54:38Z")

</div>

Have you tried to run the updater script manually?

> /opt/netdata/usr/libexec/netdata/netdata-updater.sh

---

<div class="post-metadata">

**Author:** ![Bernd](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/bernd/32/1460_2.png) [@Bernd](https://community.netdata.cloud/u/Bernd)\
**Post date:** [January 17, 2022, 10:56am UTC](https://community.netdata.cloud/t/automatic-netdata-updater-fails/2420/5 "2022-01-17T10:56:04Z")

</div>

> [@ilyam8](#):
>
> > /opt/netdata/usr/libexec/netdata/netdata-updater.sh

Yes several times, always the error @line 120 appears

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [January 17, 2022, 4:32pm UTC](https://community.netdata.cloud/t/automatic-netdata-updater-fails/2420/6 "2022-01-17T16:32:37Z")

</div>

I think I’ve found the problem - fixed in [fix(updater): checksum validation for static build by ilyam8 · Pull Request #11986 · netdata/netdata · GitHub](https://github.com/netdata/netdata/pull/11986).

Updating should start working fine after the fix is merged.

---

<div class="post-metadata">

**Author:** ![Bernd](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/bernd/32/1460_2.png) [@Bernd](https://community.netdata.cloud/u/Bernd)\
**Post date:** [January 17, 2022, 6:59pm UTC](https://community.netdata.cloud/t/automatic-netdata-updater-fails/2420/7 "2022-01-17T18:59:22Z")

</div>

Now I get this it is getting better

```auto
/opt/netdata/usr/libexec/netdata/netdata-updater.sh
Mon 17 Jan 2022 07:24:54 PM CET : INFO: Checking if a newer version of the updater script is available.
Mon 17 Jan 2022 07:24:55 PM CET : INFO: Downloading newest version of updater script.
/opt/netdata/usr/libexec/netdata/netdata-updater.sh: line 120: /tmp/netdata-test.asd1ZONNKe: Permission denied
/opt/netdata/usr/libexec/netdata/netdata-updater.sh: line 120: /tmp/netdata-test.eZZX7iWTkO: Permission denied
/opt/netdata/usr/libexec/netdata/netdata-updater.sh: line 233: /tmp/netdata-updater-Oz8emSkRcb/netdata-updater.sh: Permission denied

# ll /tmp/netdata-updater-Oz8emSkRcb/netdata-updater.sh 
-rwxr-xr-x 1 root root 21012 Jan 17 19:24 /tmp/netdata-updater-Oz8emSkRcb/netdata-updater.sh

```

Ok, My problem is, I do have the mount option noexec for /tmp  
Must be omitted,  
I did mount /tmp/ -o remount  
then a second try was successul

As a newbie to netdata, I would say build the updater to be called using sh, then there is no harm if someone has mounted their /tmp with noxec, or use a different path…

But otherwise great feature, I’m thrilled.  
Thanks for your time and thanks for netdata.  
Bernd

---

<div class="post-metadata">

**Author:** ![Austin\_Hemmelgarn](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/austin_hemmelgarn/32/4495_2.png) [@Austin\_Hemmelgarn](https://community.netdata.cloud/u/Austin_Hemmelgarn)\
**Post date:** [January 17, 2022, 7:48pm UTC](https://community.netdata.cloud/t/automatic-netdata-updater-fails/2420/8 "2022-01-17T19:48:07Z")

</div>

The updater itself should work fine if invoked with a plain, POSIX-compliant shell, and it should be handling temporary directories correctly (it should try `$TMPDIR`, `/tmp`, and then the current working directory, in that order, searching for the first that is both writable and allows execution). It looks like you may have stumbled across a bug in the updater itself here, independent of the checksum validation issue for static builds.

---

<div class="post-metadata">

**Author:** ![Bernd](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/bernd/32/1460_2.png) [@Bernd](https://community.netdata.cloud/u/Bernd)\
**Post date:** [January 19, 2022, 8:39am UTC](https://community.netdata.cloud/t/automatic-netdata-updater-fails/2420/9 "2022-01-19T08:39:20Z")

</div>

Hi,  
the Checksum error is here, again

```auto
mount /tmp -o remount,exec
/opt/netdata/usr/libexec/netdata/netdata-updater.sh
Mi 19. Jan 09:36:51 CET 2022 : INFO: Checking if a newer version of the updater script is available.
Mi 19. Jan 09:36:51 CET 2022 : INFO: Entering /tmp/netdata-updater-XB48GRLcP1
Mi 19. Jan 09:36:51 CET 2022 : INFO: Current Version: 00103200100078
Mi 19. Jan 09:36:51 CET 2022 : INFO: Latest Version: 00103200100096
Mi 19. Jan 09:36:51 CET 2022 : INFO: Update available
Mi 19. Jan 09:36:52 CET 2022 : ERROR: FAILED TO UPDATE NETDATA : Static binary checksum validation failed. Stopping netdata installation and leaving binary in /tmp/netdata-updater-XB48GRLcP1\nUsually this is a result of an older copy of the file being cached somewhere and can be resolved by simply retrying i

```

🤔

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [January 19, 2022, 3:30pm UTC](https://community.netdata.cloud/t/automatic-netdata-updater-fails/2420/10 "2022-01-19T15:30:16Z")

</div>

Hm, could be your “netdata-updater.sh” doesn’t contain the fix and the script self auto-update doesn’t work for some reason.

> Mi 19. Jan 09:36:51 CET 2022 : INFO: Checking if a newer version of the updater script is available.  
> Mi 19. Jan 09:36:51 CET 2022 : INFO: Entering /tmp/netdata-updater-XB48GRLcP1

I see no [“Downloading newest version of updater script”](https://github.com/netdata/netdata/blob/28ce8f4445394714077150ea1abc3de2a8a42c27/packaging/installer/netdata-updater.sh#L225) log line.

> Mi 19. Jan 09:36:51 CET 2022 : INFO: Current Version: 00103200100078

The fix is 82nd (since the latest tag) commit:

```cmd
[ilyam@pc netdata]$ git log --pretty="%s (%an)" $(git describe --tags --abbrev=0)..HEAD --reverse | awk '{print "["NR"]\t" $s}' | grep "checksum va"
[82]	fix(updater): checksum validation for static build (#11986) (Ilya Mashchenko)

```

Try

> touch -t 1970-01-01T00:00:00 /opt/netdata/usr/libexec/netdata/netdata-updater.sh

And then re-run the updater script.

---

<div class="post-metadata">

**Author:** ![Bernd](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/bernd/32/1460_2.png) [@Bernd](https://community.netdata.cloud/u/Bernd)\
**Post date:** [January 19, 2022, 5:28pm UTC](https://community.netdata.cloud/t/automatic-netdata-updater-fails/2420/11 "2022-01-19T17:28:39Z")

</div>

> [@ilyam8](#):
>
> touch -t 1970-01-01T00:00:00 /opt/netdata/usr/libexec/netdata/netdata-updater.sh

**touch -t “197001011800” /opt/netdata/usr/libexec/netdata/netdata-updater.sh** #Did the trick. Thank you 🙂

---

<div class="post-metadata">

**Author:** ![Bernd](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/bernd/32/1460_2.png) [@Bernd](https://community.netdata.cloud/u/Bernd)\
**Post date:** [January 20, 2022, 8:36am UTC](https://community.netdata.cloud/t/automatic-netdata-updater-fails/2420/12 "2022-01-20T08:36:00Z")

</div>

I can confirm the autoupdate worked fine last night.  
👌
