Os update

I am trying to update the os with raspberry pi3, I am using mender production server with self sign certificates.

in the raspberrypi i have installed the mender supported operating system [raspbian-buster-lite-mender.img.xz amd artifacrt is release-1

so when i am deploying after download and reboot it got fail i am getting error which i am sharing below for refereence

2020-10-23 05:20:41 +0000 UTC error: Failed to send status report to server: transient error: reporting status failed: Put https://serverdemo.westus2.cloudapp.azure.com/api/devices/v1/deployments/device/deployments/650ca846-2e25-44e3-ad80-b3d2fc7afea5/status: x509: certificate signed by unknown authority

Also i am sharing logs

2020-10-23 05:29:24 +0000 UTC info: Running Mender version 2.2.0
2020-10-23 05:29:24 +0000 UTC debug: handle update fetch state
2020-10-23 05:29:24 +0000 UTC debug: status reported, response 204 No Content
2020-10-23 05:29:25 +0000 UTC debug: Received fetch update response &{200 OK 200 HTTP/1.1 1 1 map[Server:[openresty/1.13.6.2] Connection:[keep-alive] Last-Modified:[Sun, 02 Aug 2020 05:03:32 GMT] Vary:[Origin] X-Xss-Protection:[1; mode=block] Content-Type:[application/vnd.mender-artifact] Content-Length:[454363136] Accept-Ranges:[bytes] Etag:[“d2c2799c2cf0d7982d97644d98eec8f4”] Date:[Fri, 23 Oct 2020 05:29:25 GMT] Strict-Transport-Security:[max-age=63072000; includeSubdomains; preload] X-Content-Type-Options:[nosniff] Content-Security-Policy:[block-all-mixed-content] X-Amz-Request-Id:[164087F7B3DF1030] X-Frame-Options:[DENY]] 0x268e050 454363136 [] false false map[] 0x2662580 0x247ec00}+
2020-10-23 05:29:25 +0000 UTC info: State transition: update-fetch [Download_Enter] -> update-store [Download_Enter]
2020-10-23 05:29:25 +0000 UTC debug: handle update install state
2020-10-23 05:29:25 +0000 UTC debug: status reported, response 204 No Content
2020-10-23 05:29:25 +0000 UTC debug: Read data from device manifest file: device_type=raspberrypi3
2020-10-23 05:29:25 +0000 UTC debug: Current manifest data: raspberrypi3
2020-10-23 05:29:25 +0000 UTC info: no public key was provided for authenticating the artifact
2020-10-23 05:29:25 +0000 UTC debug: checking if device [raspberrypi3] is on compatible device list: [raspberrypi3]
2020-10-23 05:29:25 +0000 UTC debug: installer: successfully read artifact [name: release-1; version: 3; compatible devices: [raspberrypi3]]
2020-10-23 05:29:25 +0000 UTC debug: Active partition: /dev/mmcblk0p2
2020-10-23 05:29:25 +0000 UTC debug: Detected inactive partition /dev/mmcblk0p3, based on active partition /dev/mmcblk0p2
2020-10-23 05:29:25 +0000 UTC info: opening device /dev/mmcblk0p3 for writing
2020-10-23 05:29:25 +0000 UTC debug: Open block-device for installing update of size: 1715804160
2020-10-23 05:29:25 +0000 UTC debug: Device: /dev/mmcblk0p3 is a ubi device: false
2020-10-23 05:29:25 +0000 UTC info: native sector size of block device /dev/mmcblk0p3 is 512, we will write in chunks of 1048576
2020-10-23 05:29:25 +0000 UTC debug: Opening device: /dev/mmcblk0p3 for writing with flag: 2
2020-10-23 05:37:19 +0000 UTC info: 0 bytes remaining to be written
2020-10-23 05:37:19 +0000 UTC info: The optimized block-device writer wrote a total of 1637 frames, where 98 frames did need to be rewritten
2020-10-23 05:37:19 +0000 UTC info: Wrote 1715804160/1715804160 bytes to the inactive partition
2020-10-23 05:37:20 +0000 UTC debug: status reported, response 204 No Content
2020-10-23 05:37:20 +0000 UTC info: State transition: update-store [Download_Enter] -> update-after-store [Download_Leave]
2020-10-23 05:37:20 +0000 UTC info: State transition: update-after-store [Download_Leave] -> update-install [ArtifactInstall]
2020-10-23 05:37:20 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds
2020-10-23 05:37:20 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds
2020-10-23 05:37:20 +0000 UTC debug: status reported, response 204 No Content
2020-10-23 05:37:20 +0000 UTC debug: Inactive partition: /dev/mmcblk0p3
2020-10-23 05:37:20 +0000 UTC debug: Marking inactive partition (/dev/mmcblk0p3) as the new boot candidate.
2020-10-23 05:37:20 +0000 UTC info: Enabling partition with new image installed to be a boot candidate: 3
2020-10-23 05:37:20 +0000 UTC debug: Have U-Boot variable: mender_check_saveenv_canary=1
2020-10-23 05:37:20 +0000 UTC debug: List of U-Boot variables:map[mender_check_saveenv_canary:1]
2020-10-23 05:37:20 +0000 UTC debug: Have U-Boot variable: mender_saveenv_canary=1
2020-10-23 05:37:20 +0000 UTC debug: List of U-Boot variables:map[mender_saveenv_canary:1]
2020-10-23 05:37:20 +0000 UTC debug: Marking inactive partition as a boot candidate successful.
2020-10-23 05:37:20 +0000 UTC info: State transition: update-install [ArtifactInstall] -> reboot [ArtifactReboot_Enter]
2020-10-23 05:37:20 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds
2020-10-23 05:37:20 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds
2020-10-23 05:37:21 +0000 UTC debug: handling reboot state
2020-10-23 05:37:21 +0000 UTC debug: status reported, response 204 No Content
2020-10-23 05:37:21 +0000 UTC info: rebooting device(s)
2020-10-23 05:37:21 +0000 UTC info: Mender rebooting from active partition: /dev/mmcblk0p2
2020-02-05 16:02:13 +0000 UTC info: Running Mender version 2.2.0
2020-02-05 16:02:13 +0000 UTC info: State transition: init [none] -> after-reboot [ArtifactReboot_Leave]
2020-02-05 16:02:13 +0000 UTC debug: Have U-Boot variable: mender_check_saveenv_canary=1
2020-02-05 16:02:13 +0000 UTC debug: List of U-Boot variables:map[mender_check_saveenv_canary:1]
2020-02-05 16:02:13 +0000 UTC debug: Have U-Boot variable: mender_saveenv_canary=1
2020-02-05 16:02:14 +0000 UTC debug: List of U-Boot variables:map[mender_saveenv_canary:1]
2020-02-05 16:02:14 +0000 UTC debug: Have U-Boot variable: upgrade_available=1
2020-02-05 16:02:14 +0000 UTC debug: List of U-Boot variables:map[upgrade_available:1]
2020-02-05 16:02:14 +0000 UTC info: State transition: after-reboot [ArtifactReboot_Leave] -> after-reboot [ArtifactReboot_Leave]
2020-02-05 16:02:14 +0000 UTC debug: handling state after reboot
2020-02-05 16:02:14 +0000 UTC info: State transition: after-reboot [ArtifactReboot_Leave] -> update-commit [ArtifactCommit_Enter]
2020-02-05 16:02:14 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds
2020-02-05 16:02:14 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds
2020-02-05 16:02:14 +0000 UTC debug: handle update commit state
2020-02-05 16:02:14 +0000 UTC error: failed to report status: Put https://serverdemo.westus2.cloudapp.azure.com/api/devices/v1/deployments/device/deployments/7e293ab3-7868-43eb-ae49-423a6a7e8978/status: dial tcp: lookup serverdemo.westus2.cloudapp.azure.com on 8.8.8.8:53: dial udp 8.8.8.8:53: connect: network is unreachable
2020-02-05 16:02:14 +0000 UTC error: error reporting update status: reporting status failed: Put https://serverdemo.westus2.cloudapp.azure.com/api/devices/v1/deployments/device/deployments/7e293ab3-7868-43eb-ae49-423a6a7e8978/status: dial tcp: lookup serverdemo.westus2.cloudapp.azure.com on 8.8.8.8:53: dial udp 8.8.8.8:53: connect: network is unreachable
2020-02-05 16:02:14 +0000 UTC error: Failed to send status report to server: transient error: reporting status failed: Put https://serverdemo.westus2.cloudapp.azure.com/api/devices/v1/deployments/device/deployments/7e293ab3-7868-43eb-ae49-423a6a7e8978/status: dial tcp: lookup serverdemo.westus2.cloudapp.azure.com on 8.8.8.8:53: dial udp 8.8.8.8:53: connect: network is unreachable
2020-02-05 16:02:14 +0000 UTC info: State transition: update-commit [ArtifactCommit_Enter] -> update-pre-commit-status-report-retry [ArtifactCommit_Enter]
2020-10-23 05:38:16 +0000 UTC debug: wait complete
2020-10-23 05:38:16 +0000 UTC info: State transition: update-pre-commit-status-report-retry [ArtifactCommit_Enter] -> update-commit [ArtifactCommit_Enter]
2020-10-23 05:38:16 +0000 UTC debug: handle update commit state
2020-10-23 05:38:17 +0000 UTC error: failed to report status: Put https://serverdemo.westus2.cloudapp.azure.com/api/devices/v1/deployments/device/deployments/7e293ab3-7868-43eb-ae49-423a6a7e8978/status: x509: certificate signed by unknown authority
2020-10-23 05:38:17 +0000 UTC error: error reporting update status: reporting status failed: Put https://serverdemo.westus2.cloudapp.azure.com/api/devices/v1/deployments/device/deployments/7e293ab3-7868-43eb-ae49-423a6a7e8978/status: x509: certificate signed by unknown authority
2020-10-23 05:38:17 +0000 UTC error: Failed to send status report to server: transient error: reporting status failed: Put https://serverdemo.westus2.cloudapp.azure.com/api/devices/v1/deployments/device/deployments/7e293ab3-7868-43eb-ae49-423a6a7e8978/status: x509: certificate signed by unknown authority
2020-10-23 05:38:17 +0000 UTC info: State transition: update-commit [ArtifactCommit_Enter] -> update-pre-commit-status-report-retry [ArtifactCommit_Enter]
2020-10-23 05:38:47 +0000 UTC debug: wait complete
2020-10-23 05:38:47 +0000 UTC info: State transition: update-pre-commit-status-report-retry [ArtifactCommit_Enter] -> update-commit [ArtifactCommit_Enter]
2020-10-23 05:38:47 +0000 UTC debug: handle update commit state
2020-10-23 05:38:48 +0000 UTC error: failed to report status: Put https://serverdemo.westus2.cloudapp.azure.com/api/devices/v1/deployments/device/deployments/7e293ab3-7868-43eb-ae49-423a6a7e8978/status: x509: certificate signed by unknown authority
2020-10-23 05:38:48 +0000 UTC error: error reporting update status: reporting status failed: Put https://serverdemo.westus2.cloudapp.azure.com/api/devices/v1/deployments/device/deployments/7e293ab3-7868-43eb-ae49-423a6a7e8978/status: x509: certificate signed by unknown authority
2020-10-23 05:38:48 +0000 UTC error: Failed to send status report to server: transient error: reporting status failed: Put https://serverdemo.westus2.cloudapp.azure.com/api/devices/v1/deployments/device/deployments/7e293ab3-7868-43eb-ae49-423a6a7e8978/status: x509: certificate signed by unknown authority
2020-10-23 05:38:48 +0000 UTC info: State transition: update-commit [ArtifactCommit_Enter] -> update-pre-commit-status-report-retry [ArtifactCommit_Enter]
2020-10-23 05:39:18 +0000 UTC debug: wait complete
2020-10-23 05:39:18 +0000 UTC info: State transition: update-pre-commit-status-report-retry [ArtifactCommit_Enter] -> update-commit [ArtifactCommit_Enter]
2020-10-23 05:39:18 +0000 UTC debug: handle update commit state
2020-10-23 05:39:18 +0000 UTC error: failed to report status: Put https://serverdemo.westus2.cloudapp.azure.com/api/devices/v1/deployments/device/deployments/7e293ab3-7868-43eb-ae49-423a6a7e8978/status: x509: certificate signed by unknown authority
2020-10-23 05:39:18 +0000 UTC error: error reporting update status: reporting status failed: Put https://serverdemo.westus2.cloudapp.azure.com/api/devices/v1/deployments/device/deployments/7e293ab3-7868-43eb-ae49-423a6a7e8978/status: x509: certificate signed by unknown authority
2020-10-23 05:39:18 +0000 UTC error: Failed to send status report to server: transient error: reporting status failed: Put https://serverdemo.westus2.cloudapp.azure.com/api/devices/v1/deployments/device/deployments/7e293ab3-7868-43eb-ae49-423a6a7e8978/status: x509: certificate signed by unknown authority
2020-10-23 05:39:18 +0000 UTC info: State transition: update-commit [ArtifactCommit_Enter] -> update-pre-commit-status-report-retry [ArtifactCommit_Enter]
2020-10-23 05:39:18 +0000 UTC error: transient error: Tried sending status report maximum number of times.
2020-10-23 05:39:18 +0000 UTC info: State transition: update-pre-commit-status-report-retry [ArtifactCommit_Enter] -> rollback [ArtifactRollback]
2020-10-23 05:39:18 +0000 UTC debug: transitioning to error state
2020-10-23 05:39:18 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds
2020-10-23 05:39:18 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds
2020-10-23 05:39:18 +0000 UTC info: performing rollback
2020-10-23 05:39:18 +0000 UTC debug: Have U-Boot variable: mender_check_saveenv_canary=1
2020-10-23 05:39:18 +0000 UTC debug: List of U-Boot variables:map[mender_check_saveenv_canary:1]
2020-10-23 05:39:18 +0000 UTC debug: Have U-Boot variable: mender_saveenv_canary=1
2020-10-23 05:39:18 +0000 UTC debug: List of U-Boot variables:map[mender_saveenv_canary:1]
2020-10-23 05:39:18 +0000 UTC debug: Have U-Boot variable: upgrade_available=1
2020-10-23 05:39:18 +0000 UTC debug: List of U-Boot variables:map[upgrade_available:1]
2020-10-23 05:39:18 +0000 UTC debug: Active partition: /dev/mmcblk0p3
2020-10-23 05:39:18 +0000 UTC debug: Detected inactive partition /dev/mmcblk0p2, based on active partition /dev/mmcblk0p3
2020-10-23 05:39:18 +0000 UTC debug: Marking inactive partition (/dev/mmcblk0p2) as the new boot candidate.
2020-10-23 05:39:18 +0000 UTC info: setting partition for rollback: 2
2020-10-23 05:39:18 +0000 UTC debug: Have U-Boot variable: mender_check_saveenv_canary=1
2020-10-23 05:39:18 +0000 UTC debug: List of U-Boot variables:map[mender_check_saveenv_canary:1]
2020-10-23 05:39:18 +0000 UTC debug: Have U-Boot variable: mender_saveenv_canary=1
2020-10-23 05:39:18 +0000 UTC debug: List of U-Boot variables:map[mender_saveenv_canary:1]
2020-10-23 05:39:18 +0000 UTC debug: Marking inactive partition as a boot candidate successful.
2020-10-23 05:39:18 +0000 UTC debug: will try to rollback reboot the device
2020-10-23 05:39:18 +0000 UTC info: State transition: rollback [ArtifactRollback] -> rollback-reboot [ArtifactRollbackReboot_Enter]
2020-10-23 05:39:18 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds
2020-10-23 05:39:18 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds
2020-10-23 05:39:18 +0000 UTC info: rebooting device(s) after rollback
2020-10-23 05:39:18 +0000 UTC info: Mender rebooting from inactive partition: /dev/mmcblk0p3
2020-10-23 05:37:31 +0000 UTC info: Running Mender version 2.2.0
2020-10-23 05:37:31 +0000 UTC info: Update was interrupted in state: rollback-reboot
2020-10-23 05:37:31 +0000 UTC info: State transition: init [none] -> verify-rollback-reboot [ArtifactRollbackReboot_Leave]
2020-10-23 05:37:31 +0000 UTC debug: transitioning to error state
2020-10-23 05:37:31 +0000 UTC debug: Have U-Boot variable: mender_check_saveenv_canary=1
2020-10-23 05:37:31 +0000 UTC debug: List of U-Boot variables:map[mender_check_saveenv_canary:1]
2020-10-23 05:37:31 +0000 UTC debug: Have U-Boot variable: mender_saveenv_canary=1
2020-10-23 05:37:31 +0000 UTC debug: List of U-Boot variables:map[mender_saveenv_canary:1]
2020-10-23 05:37:31 +0000 UTC debug: Have U-Boot variable: upgrade_available=0
2020-10-23 05:37:31 +0000 UTC debug: List of U-Boot variables:map[upgrade_available:0]
2020-10-23 05:37:31 +0000 UTC info: State transition: verify-rollback-reboot [ArtifactRollbackReboot_Leave] -> after-rollback-reboot [ArtifactRollbackReboot_Leave]
2020-10-23 05:37:32 +0000 UTC debug: handling state after rollback reboot
2020-10-23 05:37:32 +0000 UTC info: State transition: after-rollback-reboot [ArtifactRollbackReboot_Leave] -> update-error [ArtifactFailure]
2020-10-23 05:37:32 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds
2020-10-23 05:37:32 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds
2020-10-23 05:37:32 +0000 UTC debug: handle update error state
2020-10-23 05:37:32 +0000 UTC info: State transition: update-error [ArtifactFailure] -> cleanup [Error]
2020-10-23 05:37:32 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds
2020-10-23 05:37:32 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds
2020-10-23 05:37:32 +0000 UTC debug: Handling Cleanup state
2020-10-23 05:37:32 +0000 UTC info: State transition: cleanup [Error] -> update-status-report [none]
2020-10-23 05:37:32 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds
2020-10-23 05:37:32 +0000 UTC debug: handle update status report state
2020-10-23 05:37:32 +0000 UTC error: failed to report status: Put https://serverdemo.westus2.cloudapp.azure.com/api/devices/v1/deployments/device/deployments/7e293ab3-7868-43eb-ae49-423a6a7e8978/status: dial tcp 51.143.22.248:443: connect: network is unreachable
2020-10-23 05:37:32 +0000 UTC error: error reporting update status: reporting status failed: Put https://serverdemo.westus2.cloudapp.azure.com/api/devices/v1/deployments/device/deployments/7e293ab3-7868-43eb-ae49-423a6a7e8978/status: dial tcp 51.143.22.248:443: connect: network is unreachable
2020-10-23 05:37:32 +0000 UTC error: failed to send status to server: transient error: reporting status failed: Put https://serverdemo.westus2.cloudapp.azure.com/api/devices/v1/deployments/device/deployments/7e293ab3-7868-43eb-ae49-423a6a7e8978/status: dial tcp 51.143.22.248:443: connect: network is unreachable
2020-10-23 05:37:32 +0000 UTC info: State transition: update-status-report [none] -> update-retry-report [none]
2020-10-23 05:40:11 +0000 UTC debug: wait complete
2020-10-23 05:40:11 +0000 UTC info: State transition: update-retry-report [none] -> update-status-report [none]
2020-10-23 05:40:11 +0000 UTC debug: handle update status report state
2020-10-23 05:40:12 +0000 UTC debug: status reported, response 204 No Content
2020-10-23 05:40:12 +0000 UTC debug: attempting to upload deployment logs for failed update

Please suggest the solution for this

With a self-signed certificate, you need to arrange for the verification key to be installed in the client and added to the mender.conf file. Details are here

Drew

Hi Drew,

Thanks for your suggestion I am working on it.

i have some other doubt in OS update how to expose the bootloader partition of the software in means how to get to know after every update in which partition OS is running.

how to expose the active partition after every update.

thanks for your valuable suggestion in advance.

Kind Regards
Avi999

Mender handles that automatically using bootloader environment variables. It’s stored in mender_boot_part_hex which you can view with fw_printenv. But I’m not sure why you need that information. Can you share your use case?

Drew