Download Enter script is not working

Hi there,

I have been unable to run Download_Enter_01_test.py script. It is located in /etc/mender/scripts directory, it has 755 permission configuration. The mender server shows pending all the time.

Here is the log for “sudo journalctl -u mender-client”

– Logs begin at Fri 2021-02-12 12:17:01 GMT, end at Sun 2021-02-14 09:35:11 GMT. –
Feb 12 12:25:06 projectzero systemd[1]: Started Mender OTA update service.
Feb 14 06:25:23 projectzero mender[618]: time=“2021-02-14T06:25:23Z” level=info msg=“Loaded configuration file: /etc/mender/mender.conf”
Feb 14 06:25:23 projectzero mender[618]: time=“2021-02-14T06:25:23Z” level=info msg=“No dual rootfs configuration present”
Feb 14 06:25:27 projectzero mender[618]: time=“2021-02-14T06:25:27Z” level=error msg="Failed to Load the Server certificate. Err SSL errors: "
Feb 14 06:25:27 projectzero mender[618]: time=“2021-02-14T06:25:27Z” level=error msg="Failed to Load the Server certificate. Err SSL errors: "
Feb 14 06:25:27 projectzero mender[618]: time=“2021-02-14T06:25:27Z” level=warning msg="Failed to load the server TLS certificate settings: SSL errors: "
Feb 14 06:25:27 projectzero mender[618]: time=“2021-02-14T06:25:27Z” level=warning msg="Failed to load the server TLS certificate settings: SSL errors: "
Feb 14 06:25:27 projectzero mender[618]: time=“2021-02-14T06:25:27Z” level=error msg="Failed to Load the Server certificate. Err SSL errors: "
Feb 14 06:25:27 projectzero mender[618]: time=“2021-02-14T06:25:27Z” level=error msg="Failed to Load the Server certificate. Err SSL errors: "
Feb 14 06:25:27 projectzero mender[618]: time=“2021-02-14T06:25:27Z” level=warning msg="Failed to load the server TLS certificate settings: SSL errors: "
Feb 14 06:25:27 projectzero mender[618]: time=“2021-02-14T06:25:27Z” level=warning msg="Failed to load the server TLS certificate settings: SSL errors: "
Feb 14 06:25:27 projectzero mender[618]: time=“2021-02-14T06:25:27Z” level=info msg=“State transition: init [none] → init [none]”
Feb 14 06:25:27 projectzero mender[618]: time=“2021-02-14T06:25:27Z” level=info msg=“State transition: init [none] → idle [Idle]”
Feb 14 06:25:28 projectzero mender[618]: time=“2021-02-14T06:25:28Z” level=info msg=“State transition: idle [Idle] → check-wait [Idle]”
Feb 14 06:25:28 projectzero mender[618]: time=“2021-02-14T06:25:28Z” level=info msg=“State transition: check-wait [Idle] → inventory-update [Sync]”
Feb 14 06:25:40 projectzero mender[618]: time=“2021-02-14T06:25:40Z” level=warning msg=“Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 3”
Feb 14 06:25:40 projectzero mender[618]: time=“2021-02-14T06:25:40Z” level=warning msg=“Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 3”
Feb 14 06:25:40 projectzero mender[864]: time=“2021-02-14T06:25:40Z” level=error msg="Failed to Load the Server certificate. Err SSL errors: "
Feb 14 06:25:40 projectzero mender[864]: time=“2021-02-14T06:25:40Z” level=warning msg="Failed to load the server TLS certificate settings: SSL errors: "
Feb 14 06:25:42 projectzero mender[618]: time=“2021-02-14T06:25:42Z” level=info msg=“State transition: inventory-update [Sync] → check-wait [Idle]”
Feb 14 06:25:42 projectzero mender[618]: time=“2021-02-14T06:25:42Z” level=info msg=“State transition: check-wait [Idle] → update-check [Sync]”
Feb 14 06:25:42 projectzero mender[618]: time=“2021-02-14T06:25:42Z” level=info msg="Correct request for getting image from: https://s3.amazonaws.com/hosted-mender-artifacts/5f9febf5f3379557fad08339/f58c979
Feb 14 06:25:42 projectzero mender[618]: time=“2021-02-14T06:25:42Z” level=info msg=“State transition: update-check [Sync] → update-fetch [Download_Enter]”
Feb 14 06:25:44 projectzero mender[618]: time=“2021-02-14T06:25:44Z” level=error msg="transient error: error calling enter script for (error) update-fetch state: error running enter state script(s) for Down
Feb 14 06:25:44 projectzero mender[618]: time=“2021-02-14T06:25:44Z” level=error msg="transient error: error calling enter script for (error) update-fetch state: error running enter state script(s) for Down
Feb 14 06:25:44 projectzero mender[618]: time=“2021-02-14T06:25:44Z” level=info msg=“State transition: update-fetch [Download_Enter] → error [Error]”
Feb 14 06:25:44 projectzero mender[618]: time=“2021-02-14T06:25:44Z” level=info msg="Handling error state, current error: transient error: error calling enter script for (error) update-fetch state: error ru
Feb 14 06:25:44 projectzero mender[618]: time=“2021-02-14T06:25:44Z” level=info msg=“State transition: error [Error] → idle [Idle]”
Feb 14 06:25:44 projectzero mender[618]: time=“2021-02-14T06:25:44Z” level=info msg=“State transition: idle [Idle] → check-wait [Idle]”
Feb 14 06:25:44 projectzero mender[618]: time=“2021-02-14T06:25:44Z” level=info msg=“State transition: check-wait [Idle] → inventory-update [Sync]”
Feb 14 06:25:47 projectzero mender[618]: time=“2021-02-14T06:25:47Z” level=warning msg=“Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 3”
Feb 14 06:25:47 projectzero mender[618]: time=“2021-02-14T06:25:47Z” level=warning msg=“Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 3”
Feb 14 06:25:47 projectzero mender[915]: time=“2021-02-14T06:25:47Z” level=error msg="Failed to Load the Server certificate. Err SSL errors: "
Feb 14 06:25:47 projectzero mender[915]: time=“2021-02-14T06:25:47Z” level=warning msg="Failed to load the server TLS certificate settings: SSL errors: "
Feb 14 06:25:52 projectzero mender[618]: time=“2021-02-14T06:25:52Z” level=info msg=“State transition: inventory-update [Sync] → check-wait [Idle]”
Feb 14 06:25:52 projectzero mender[618]: time=“2021-02-14T06:25:52Z” level=info msg=“State transition: check-wait [Idle] → update-check [Sync]”
Feb 14 06:25:52 projectzero mender[618]: time=“2021-02-14T06:25:52Z” level=info msg="Correct request for getting image from: https://s3.amazonaws.com/hosted-mender-artifacts/5f9febf5f3379557fad08339/f58c979
Feb 14 06:25:52 projectzero mender[618]: time=“2021-02-14T06:25:52Z” level=info msg=“State transition: update-check [Sync] → update-fetch [Download_Enter]”
Feb 14 06:25:58 projectzero mender[618]: time=“2021-02-14T06:25:58Z” level=error msg="transient error: error calling enter script for (error) update-fetch state: error running enter state script(s) for Down
Feb 14 06:25:58 projectzero mender[618]: time=“2021-02-14T06:25:58Z” level=error msg="transient error: error calling enter script for (error) update-fetch state: error running enter state script(s) for Down
Feb 14 06:25:58 projectzero mender[618]: time=“2021-02-14T06:25:58Z” level=info msg=“State transition: update-fetch [Download_Enter] → error [Error]”
Feb 14 06:25:58 projectzero mender[618]: time=“2021-02-14T06:25:58Z” level=info msg="Handling error state, current error: transient error: error calling enter script for (error) update-fetch state: error ru
Feb 14 06:25:58 projectzero mender[618]: time=“2021-02-14T06:25:58Z” level=info msg=“State transition: error [Error] → idle [Idle]”
Feb 14 06:25:59 projectzero mender[618]: time=“2021-02-14T06:25:59Z” level=info msg=“State transition: idle [Idle] → check-wait [Idle]”
Feb 14 06:25:59 projectzero mender[618]: time=“2021-02-14T06:25:59Z” level=info msg=“State transition: check-wait [Idle] → inventory-update [Sync]”
Feb 14 06:26:13 projectzero mender[618]: time=“2021-02-14T06:26:13Z” level=warning msg=“Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 3”
Feb 14 06:26:13 projectzero mender[618]: time=“2021-02-14T06:26:13Z” level=warning msg=“Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 3”
Feb 14 06:26:14 projectzero mender[988]: time=“2021-02-14T06:26:14Z” level=error msg="Failed to Load the Server certificate. Err SSL errors: "
Feb 14 06:26:14 projectzero mender[988]: time=“2021-02-14T06:26:14Z” level=warning msg="Failed to load the server TLS certificate settings: SSL errors: "
Feb 14 06:26:14 projectzero mender[618]: time=“2021-02-14T06:26:14Z” level=info msg=“State transition: inventory-update [Sync] → check-wait [Idle]”
Feb 14 06:26:14 projectzero mender[618]: time=“2021-02-14T06:26:14Z” level=info msg=“State transition: check-wait [Idle] → update-check [Sync]”
Feb 14 06:26:15 projectzero mender[618]: time=“2021-02-14T06:26:15Z” level=info msg="Correct request for getting image from: https://s3.amazonaws.com/hosted-mender-artifacts/5f9febf5f3379557fad08339/f58c979
Feb 14 06:26:15 projectzero mender[618]: time=“2021-02-14T06:26:15Z” level=info msg=“State transition: update-check [Sync] → update-fetch [Download_Enter]”
Feb 14 06:26:15 projectzero mender[618]: time=“2021-02-14T06:26:15Z” level=error msg="transient error: error calling enter script for (error) update-fetch state: error running enter state script(s) for Down
Feb 14 06:26:15 projectzero mender[618]: time=“2021-02-14T06:26:15Z” level=error msg="transient error: error calling enter script for (error) update-fetch state: error running enter state script(s) for Down
Feb 14 06:26:15 projectzero mender[618]: time=“2021-02-14T06:26:15Z” level=info msg=“State transition: update-fetch [Download_Enter] → error [Error]”
Feb 14 06:26:15 projectzero mender[618]: time=“2021-02-14T06:26:15Z” level=info msg="Handling error state, current error: transient error: error calling enter script for (error) update-fetch state: error ru
Feb 14 06:26:15 projectzero mender[618]: time=“2021-02-14T06:26:15Z” level=info msg=“State transition: error [Error] → idle [Idle]”
Feb 14 06:26:15 projectzero mender[618]: time=“2021-02-14T06:26:15Z” level=info msg=“State transition: idle [Idle] → check-wait [Idle]”
Feb 14 06:26:15 projectzero mender[618]: time=“2021-02-14T06:26:15Z” level=info msg=“State transition: check-wait [Idle] → inventory-update [Sync]”
Feb 14 06:26:17 projectzero mender[618]: time=“2021-02-14T06:26:17Z” level=warning msg=“Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 3”
Feb 14 06:26:17 projectzero mender[618]: time=“2021-02-14T06:26:17Z” level=warning msg=“Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 3”
Feb 14 06:26:18 projectzero mender[1036]: time=“2021-02-14T06:26:18Z” level=error msg="Failed to Load the Server certificate. Err SSL errors: "
Feb 14 06:26:18 projectzero mender[1036]: time=“2021-02-14T06:26:18Z” level=warning msg="Failed to load the server TLS certificate settings: SSL errors: "
Feb 14 06:26:18 projectzero mender[618]: time=“2021-02-14T06:26:18Z” level=info msg=“State transition: inventory-update [Sync] → check-wait [Idle]”
Feb 14 06:26:19 projectzero mender[618]: time=“2021-02-14T06:26:19Z” level=info msg=“State transition: check-wait [Idle] → update-check [Sync]”
Feb 14 06:26:20 projectzero mender[618]: time=“2021-02-14T06:26:20Z” level=info msg="Correct request for getting image from: https://s3.amazonaws.com/hosted-mender-artifacts/5f9febf5f3379557fad08339/f58c979
Feb 14 06:26:20 projectzero mender[618]: time=“2021-02-14T06:26:20Z” level=info msg=“State transition: update-check [Sync] → update-fetch [Download_Enter]”
Feb 14 06:26:20 projectzero mender[618]: time=“2021-02-14T06:26:20Z” level=error msg="transient error: error calling enter script for (error) update-fetch state: error running enter state script(s) for Down
Feb 14 06:26:20 projectzero mender[618]: time=“2021-02-14T06:26:20Z” level=error msg="transient error: error calling enter script for (error) update-fetch state: error running enter state script(s) for Down
Feb 14 06:26:20 projectzero mender[618]: time=“2021-02-14T06:26:20Z” level=info msg=“State transition: update-fetch [Download_Enter] → error [Error]”
Feb 14 06:26:20 projectzero mender[618]: time=“2021-02-14T06:26:20Z” level=info msg="Handling error state, current error: transient error: error calling enter script for (error) update-fetch state: error ru
Feb 14 06:26:20 projectzero mender[618]: time=“2021-02-14T06:26:20Z” level=info msg=“State transition: error [Error] → idle [Idle]”
Feb 14 06:26:20 projectzero mender[618]: time=“2021-02-14T06:26:20Z” level=info msg=“State transition: idle [Idle] → check-wait [Idle]”
Feb 14 06:26:20 projectzero mender[618]: time=“2021-02-14T06:26:20Z” level=info msg=“State transition: check-wait [Idle] → inventory-update [Sync]”
Feb 14 06:26:21 projectzero mender[618]: time=“2021-02-14T06:26:21Z” level=warning msg=“Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 3”
Feb 14 06:26:21 projectzero mender[618]: time=“2021-02-14T06:26:21Z” level=warning msg=“Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 3”
Feb 14 06:26:22 projectzero mender[1097]: time=“2021-02-14T06:26:22Z” level=error msg="Failed to Load the Server certificate. Err SSL errors: "
Feb 14 06:26:22 projectzero mender[1097]: time=“2021-02-14T06:26:22Z” level=warning msg="Failed to load the server TLS certificate settings: SSL errors: "
Feb 14 06:26:22 projectzero mender[618]: time=“2021-02-14T06:26:22Z” level=info msg=“State transition: inventory-update [Sync] → check-wait [Idle]”
Feb 14 06:26:24 projectzero mender[618]: time=“2021-02-14T06:26:24Z” level=info msg=“State transition: check-wait [Idle] → update-check [Sync]”
Feb 14 06:26:25 projectzero mender[618]: time=“2021-02-14T06:26:25Z” level=info msg="Correct request for getting image from: https://s3.amazonaws.com/hosted-mender-artifacts/5f9febf5f3379557fad08339/f58c979
Feb 14 06:26:25 projectzero mender[618]: time=“2021-02-14T06:26:25Z” level=info msg=“State transition: update-check [Sync] → update-fetch [Download_Enter]”
Feb 14 06:26:25 projectzero mender[618]: time=“2021-02-14T06:26:25Z” level=error msg="transient error: error calling enter script for (error) update-fetch state: error running enter state script(s) for Down
Feb 14 06:26:25 projectzero mender[618]: time=“2021-02-14T06:26:25Z” level=error msg="transient error: error calling enter script for (error) update-fetch state: error running enter state script(s) for Down
Feb 14 06:26:25 projectzero mender[618]: time=“2021-02-14T06:26:25Z” level=info msg=“State transition: update-fetch [Download_Enter] → error [Error]”
Feb 14 06:26:25 projectzero mender[618]: time=“2021-02-14T06:26:25Z” level=info msg="Handling error state, current error: transient error: error calling enter script for (error) update-fetch state: error ru
Feb 14 06:26:25 projectzero mender[618]: time=“2021-02-14T06:26:25Z” level=info msg=“State transition: error [Error] → idle [Idle]”
Feb 14 06:26:25 projectzero mender[618]: time=“2021-02-14T06:26:25Z” level=info msg=“State transition: idle [Idle] → check-wait [Idle]”
Feb 14 06:26:25 projectzero mender[618]: time=“2021-02-14T06:26:25Z” level=info msg=“State transition: check-wait [Idle] → inventory-update [Sync]”
Feb 14 06:26:27 projectzero mender[618]: time=“2021-02-14T06:26:27Z” level=warning msg=“Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 3”
Feb 14 06:26:27 projectzero mender[618]: time=“2021-02-14T06:26:27Z” level=warning msg=“Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 3”
Feb 14 06:26:28 projectzero mender[1147]: time=“2021-02-14T06:26:28Z” level=error msg="Failed to Load the Server certificate. Err SSL errors: "
Feb 14 06:26:28 projectzero mender[1147]: time=“2021-02-14T06:26:28Z” level=warning msg="Failed to load the server TLS certificate settings: SSL errors: "
Feb 14 06:26:28 projectzero mender[618]: time=“2021-02-14T06:26:28Z” level=info msg=“State transition: inventory-update [Sync] → check-wait [Idle]”
Feb 14 06:26:29 projectzero mender[618]: time=“2021-02-14T06:26:29Z” level=info msg=“State transition: check-wait [Idle] → update-check [Sync]”
Feb 14 06:26:30 projectzero mender[618]: time=“2021-02-14T06:26:30Z” level=info msg="Correct request for getting image from: https://s3.amazonaws.com/hosted-mender-artifacts/5f9febf5f3379557fad08339/f58c979
Feb 14 06:26:30 projectzero mender[618]: time=“2021-02-14T06:26:30Z” level=info msg=“State transition: update-check [Sync] → update-fetch [Download_Enter]”
Feb 14 06:26:30 projectzero mender[618]: time=“2021-02-14T06:26:30Z” level=error msg="transient error: error calling enter script for (error) update-fetch state: error running enter state script(s) for Down
Feb 14 06:26:30 projectzero mender[618]: time=“2021-02-14T06:26:30Z” level=error msg="transient error: error calling enter script for (error) update-fetch state: error running enter state script(s) for Down
Feb 14 06:26:30 projectzero mender[618]: time=“2021-02-14T06:26:30Z” level=info msg=“State transition: update-fetch [Download_Enter] → error [Error]”
Feb 14 06:26:30 projectzero mender[618]: time=“2021-02-14T06:26:30Z” level=info msg="Handling error state, current error: transient error: error calling enter script for (error) update-fetch state: error ru
Feb 14 06:26:30 projectzero mender[618]: time=“2021-02-14T06:26:30Z” level=info msg=“State transition: error [Error] → idle [Idle]”
Feb 14 06:26:30 projectzero mender[618]: time=“2021-02-14T06:26:30Z” level=info msg=“State transition: idle [Idle] → check-wait [Idle]”
Feb 14 06:26:30 projectzero mender[618]: time=“2021-02-14T06:26:30Z” level=info msg=“State transition: check-wait [Idle] → inventory-update [Sync]”
Feb 14 06:26:31 projectzero mender[618]: time=“2021-02-14T06:26:31Z” level=warning msg=“Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 3”
Feb 14 06:26:31 projectzero mender[618]: time=“2021-02-14T06:26:31Z” level=warning msg=“Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 3”
Feb 14 06:26:32 projectzero mender[1195]: time=“2021-02-14T06:26:32Z” level=error msg="Failed to Load the Server certificate. Err SSL errors: "
Feb 14 06:26:32 projectzero mender[1195]: time=“2021-02-14T06:26:32Z” level=warning msg="Failed to load the server TLS certificate settings: SSL errors: "
Feb 14 06:26:32 projectzero mender[618]: time=“2021-02-14T06:26:32Z” level=info msg=“State transition: inventory-update [Sync] → check-wait [Idle]”
Feb 14 06:26:34 projectzero mender[618]: time=“2021-02-14T06:26:34Z” level=info msg=“State transition: check-wait [Idle] → update-check [Sync]”
Feb 14 06:26:35 projectzero mender[618]: time=“2021-02-14T06:26:35Z” level=info msg="Correct request for getting image from: https://s3.amazonaws.com/hosted-mender-artifacts/5f9febf5f3379557fad08339/f58c979
Feb 14 06:26:35 projectzero mender[618]: time=“2021-02-14T06:26:35Z” level=info msg=“State transition: update-check [Sync] → update-fetch [Download_Enter]”
Feb 14 06:26:36 projectzero mender[618]: time=“2021-02-14T06:26:36Z” level=error msg="transient error: error calling enter script for (error) update-fetch state: error running enter state script(s) for Down
Feb 14 06:26:36 projectzero mender[618]: time=“2021-02-14T06:26:36Z” level=error msg="transient error: error calling enter script for (error) update-fetch state: error running enter state script(s) for Down
Feb 14 06:26:36 projectzero mender[618]: time=“2021-02-14T06:26:36Z” level=info msg=“State transition: update-fetch [Download_Enter] → error [Error]”
Feb 14 06:26:36 projectzero mender[618]: time=“2021-02-14T06:26:36Z” level=info msg="Handling error state, current error: transient error: error calling enter script for (error) update-fetch state: error ru
Feb 14 06:26:36 projectzero mender[618]: time=“2021-02-14T06:26:36Z” level=info msg=“State transition: error [Error] → idle [Idle]”
Feb 14 06:26:36 projectzero mender[618]: time=“2021-02-14T06:26:36Z” level=info msg=“State transition: idle [Idle] → check-wait [Idle]”
Feb 14 06:26:36 projectzero mender[618]: time=“2021-02-14T06:26:36Z” level=info msg=“State transition: check-wait [Idle] → inventory-update [Sync]”
Feb 14 06:26:42 projectzero mender[618]: time=“2021-02-14T06:26:42Z” level=warning msg=“Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 3”
Feb 14 06:26:42 projectzero mender[618]: time=“2021-02-14T06:26:42Z” level=warning msg=“Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 3”

What might be the problem with it?

Thanks in advance.

Regards,
Saman

Given that I can see lots of ssl/TLS certificate errors, have you installed the cacerts package/recipe on your device if using online hosted mender server?

Also, what happens if you manually run the script from a shell prompt?
Drew

I am not sure what kind of packages you are addressing. Can you be more specific or send some references?

Thanks.

Saman

The script runs flawlessly when I run manually. The interpreter and code should be fine.

Thanks.

Saman

Can you share the script?
Drew

If you running a Debian based linux distribution it should be the “ca-certificates” package:

sudo apt install ca-certificates

If you managing a yocto linux project then the recipe to add to your local.conf or image conf file should be ‘ca-certificates’ which should be in:

poky/meta/recipes-support/ca-certificates

either way you should have a load of certificate authority certificates in /usr/share/ca-certificates/mozilla/ and /etc/ssl/certs

If you are self-hosting then you may need to add any missing certificate-authority certificates yourself

If you can give us more details about your build process and mender server your using it could help to narrow down the problem

It is just a test script right now. I made sure the interpreter is available in the bin folder.

#!/usr/bin/python3.7

import tkinter
import os, pwd

os.environ[“DISPLAY”] = “:0”
pwstruct = pwd.getpwnam(“pi”)
os.setgid(pwstruct.pw_uid)
os.setuid(pwstruct.pw_gid)

print(“This is a test”)

tkinter.sys.exit(0)

The ca-certificates are already in the newest version.

sudo apt install ca-certificates
Reading package lists… Done
Building dependency tree
Reading state information… Done
ca-certificates is already the newest version (20200601~deb10u2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

are you self-hosting or using the mender hosted option?

It does look like the error is coming from the underlying openssl library as that error message is coming from the mender openssl C binding

I assume openssl is installed, helpfully there doesn’t seem to be any underlying error from the lib propagating back up the stack.

What linux distro and version of the distro are you running?
What version of openssl are you running?
What version of Mender Client are you running?

Hosted.mender.io
Using mender hosted server

Saman

At this point it would be helpful to know more about your system.

What hardware?
What distro and version?
Mender client version?
Openssl version?

I have the following configuration:

Raspberry pi 4
Raspberry pi Lite OS, Raspbian GNU/Linux 10 (buster), Kernel version 5.10.11-v7l+ #1399
Mender client version 2.5.0
openssl version 1.1.1d

Has there been any changes in the platform? I was able to successfully run the Download_Enter script few months back by same method. I was using Raspberry Pi OS instead of Raspberry Pi Lite. I think that is the only difference between now and then.

How did you install Mender? I see in your log that you do not have the dual-rootfs setup so I assume you used the setup from our docs using “mender setup” right?

Do you have all the latest package updates installed? Can you run the following?

$ sudo apt update
$ sudo apt dist-upgrade

Can you share your /etc/mender/mender.conf and /data/mender/mender.conf files? Note that your tenant token should be in one of them and you’ll want to blank that out before posting

Drew

Content from /etc/mender/mender.conf

{
“ClientProtocol”: “https”,
“ArtifactVerifyKey”: “”,
“HttpsClient”: {
“Certificate”: “”,
“Key”: “”,
“SSLEngine”: “”
},
“Security”: {
“AuthPrivateKey”: “”,
“SSLEngine”: “”
},
“RootfsPartA”: “”,
“RootfsPartB”: “”,
“DeviceTypeFile”: “/var/lib/mender/device_type”,
“DBus”: {
“Enabled”: true
},
“UpdatePollIntervalSeconds”: 5,
“InventoryPollIntervalSeconds”: 5,
“SkipVerify”: false,
“RetryPollIntervalSeconds”: 30,
“StateScriptTimeoutSeconds”: 0,
“StateScriptRetryTimeoutSeconds”: 0,
“StateScriptRetryIntervalSeconds”: 0,
“ModuleTimeoutSeconds”: 0,
“ServerCertificate”: “”,
“ServerURL”: “”,
“UpdateLogPath”: “”,
“TenantToken”: <MY_TOKEN_HERE>
“Servers”: [
{
“ServerURL”: “https://hosted.mender.io
}
]
}

I don’t have the /data/mender/mender.conf in my system. I don’t even have the /data directory.

The results from the apt update and apt dist-upgrade are all up-to-date.

I used the ‘CONNECT A DEVICE’ option from the hosted mender dashboard to install mender client on my raspberry pi.

Saman

OK so you’re not setup for system updates given that you don’t have a /data. partition. I just setup a system from scratch and do get occasional SSL errors so I think that may be OK in your case. (although @kacf we may want to investigate this since it’s explicitly listed as an error in the logs:

Feb 15 19:07:11 raspberrypi mender[7613]: time="2021-02-15T19:07:11Z" level=info msg="State transition: check-wait [Idle] -> inventory-update [Sync]"
Feb 15 19:07:11 raspberrypi mender[8275]: time="2021-02-15T19:07:11Z" level=error msg="Failed to Load the Server certificate. Err SSL errors: "
Feb 15 19:07:11 raspberrypi mender[8275]: time="2021-02-15T19:07:11Z" level=warning msg="Failed to load the server TLS certificate settings: SSL errors: "

As for the download enter script, the only thing I can suggest is to edit your script so that it outputs some text to a log file and see if it’s getting executed and how far. Just putting in “echo” commands redirected to /home/pi/log.txt or some such should help figure out where it is failing.
Drew

Are you able to run Download_Enter scripts in your setup? If yes, can you share a sample script that you could run successfully?

Saman

Yes, mine work. First create the script dir and version file:

sudo mkdir /etc/mender/scripts
sudo sh -c 'echo -n 3 > /etc/mender/scripts/version'

and then create the script as shown here:

pi@raspberrypi:~$ ls -l /etc/mender/scripts/Download_Enter_01_Testing 
-rwxr-xr-x 1 root root 84 Feb 15 22:32 /etc/mender/scripts/Download_Enter_01_Testing
pi@raspberrypi:~$ cat /etc/mender/scripts/Download_Enter_01_Testing 
#!/bin/sh

echo "Called into $0 at $(date)" >> /home/pi/state-script-log.txt
exit 0

Then when I start a deployment the log message appears in /home/pi/state-script-log.txt

Drew

What should be inside the version file?