Mender update fails with Download: Update Module returned non-zero status

Description

I have an IMX8MP-axon-wizard, I was able to install mender and did some tests. I was able to do a update release with no problem. I modify my image to have the data partition encrypted. And now when I try to do an update I get this error:

2025-08-29 22:21:23.008 +0000 UTC info: Running Mender client 5.0.1
2025-08-29 22:21:23.008 +0000 UTC info: Deployment with ID 04829307-ef35-4b0b-b69a-ad823764bf9f started.
2025-08-29 22:21:23.009 +0000 UTC info: Sending status update to server
2025-08-29 22:21:23.931 +0000 UTC info: Installing artifact...
2025-08-29 22:21:24.082 +0000 UTC info: Update Module output (stderr): Cannot initialize environment
2025-08-29 22:21:24.084 +0000 UTC error: Process returned non-zero exit status: Download: Update Module returned non-zero status: Process exited with status 1
2025-08-29 22:21:24.085 +0000 UTC error: Operation canceled: GET https://c271964d41749feb10da762816c952ee.r2.cloudflarestorage.com/mender-artifacts-us/XXXXXXXX/XXXXXXXXX?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=XXXXXXXXXXus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250829T222122Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3D%22Straights_v0.3.1.mender%22&response-content-type=application%2Fvnd.mender-artifact&x-id=GetObject&X-Amz-Signature=XXXXXXXXXXXXXXX: HTTP request cancelled
2025-08-29 22:21:24.104 +0000 UTC info: Sending status update to server

I also tried doing it manually by executing: mender-update install imx-image-core-axon-imx8mp-0.3.1.mender. And I got this:

Installing artifact...
record_id=1 severity=info time="2025-Aug-29 22:53:03.046607" name="Global" msg="Update Module output (stderr): Cannot initialize environment" 
record_id=2 severity=error time="2025-Aug-29 22:53:03.047833" name="Global" msg="Streaming failed: Process returned non-zero exit status: Download: Update Module returned non-zero status: Process exited with status 1" 
record_id=3 severity=error time="2025-Aug-29 22:53:03.076739" name="Global" msg="Process returned non-zero exit status: Download: Update Module returned non-zero status: Process exited with status 1" 
Streaming failed.
System not modified.
Could not fulfill request: Process returned non-zero exit status: Download: Update Module returned non-zero status: Process exited with status 1
imx8mp-0.3.1.menderata# mender-update --skipverify install imx-image-reach-axon-i
Installing artifact...
record_id=1 severity=info time="2025-Aug-29 23:08:02.992270" name="Global" msg="Update Module output (stderr): Cannot initialize environment" 
record_id=2 severity=error time="2025-Aug-29 23:08:02.993410" name="Global" msg="Streaming failed: Process returned non-zero exit status: Download: Update Module returned non-zero status: Process exited with status 1" 
record_id=3 severity=error time="2025-Aug-29 23:08:03.025086" name="Global" msg="Process returned non-zero exit status: Download: Update Module returned non-zero status: Process exited with status 1" 
Streaming failed.
System not modified.
Could not fulfill request: Process returned non-zero exit status: Download: Update Module returned non-zero status: Process exited with status 1

I’m confused on why this is happening.

Hi @zetacu,

Thanks for reaching out! Hitting an error in the Download stage is definitely strange. Not sure if that relates to the changes concerning encryption or not. Maybe you can go digging a bit where it falls over?

The actual implementation of this stage is in /usr/share/mender/modules/v3/rootfs-image, you can see the sources at mender/support/modules/rootfs-image at 9b7c9806687279d66c9fbbfdd1154ac487619397 · mendersoftware/mender · GitHub.

I would suggest to add some debug output there to try and find out which actual command fails, and then work from there.

Greetz,
Josef

1 Like