Download_Enter script not working

For some reason, my Download_Enter_01_User_confirmation.py wouldnt execute. I made sure that the script resided in etc/mender/scripts directory. When I check in Mender server after deployment, it just waits for device showing “pending”. When I check all processes in my device using “ps -aux”, the script is not seen in the list.

When I try the same script but with the artifact as ArtifactInstall_Enter_01_User_confirmation.py , it executes flawlessly.

What might I be missing ? Is there something I need to do to run Download or sync scripts ?
(Side note: I followed this link for the state script)

Hi Samanratna,
i also remind having a problem similar like this a while ago,
do you have an file that specifies the version of the state scripts?
like the example here

rootfs_overlay_production-server/etc/
└── mender
    ├── mender.conf
    ├── scripts
    │   └── version <- this file with value 3 
    └── server.crt

Greets Gene

Hi @genedupre,

Yes I do. I do not have the sever.crt file though. What does it have ? And how did you solve the issue ?

hi @SamanRatna
for the server.crt see


Gene

You only need the server.crt if you are running a self-hosted Mender server with a self-signed certificate.

As for the Download_Enter script, can you provide the output of the following two commands when run on the device in question?

$ sudo ls -l /etc/mender/scripts

$ sudo journaltcl -u mender-client

Drew

the version was not created when installing mender client, so I made a file myself with value 3.
It didn’t work. The deployment gave “pending” like before. I tried with value 2 too because my mender-client version is 2.4.0.1. ( I am assuming that setting that values manually was dumb, but I gave a shot anyway )

( Also, the version was there at /var/lib/mender/scripts instead with value 3 inside by default after mender client installation )

You need to make your script executable:

$ sudo chmod 755 /etc/mender/scripts/Download_Enter_01_yes.py

The second command is “journalctl” not “journaltcl”.

1 Like

Hi @drewmoseley,

Thanks man, I didn’t know I had to make that executable. Dumb me but thanks for tolerating me, lol. I really appreciate your support and quick followups buddy.

Here is the log for the $ sudo journalctl -u mender-client

The same messages continue forever. What does this log mean ? Is it something related to continuous polling made my the mender-client daemon ?

Yes, that’s the standard logging you will see as the mender client polls the server for updates.

Drew

1 Like