Device stuck in updating, despite app, terminal and logs and vpn working

I have a Raspberry Pi 3that has been working and upgrading perfectly for the last few years. Now it seems to be stuck in updating, despite everything like terminalm logs, vpn working, except stuff that fails upon the “device is busy configuring (updating)” message.

Any idea how to fix this remotely?

Hello @philkunz first of all welcome to the balena community!

What change did you perform on this device? just trying to deploy a new release? What hostOS are you running?

On the other hand, did you try to run the Diagnostics for the device? What errors do you see there?

It happened after a os upgrade. Checks are all green, except ipv6 networking.

Host OS version is balenaOS 2.83.21+rev1

Could you please go to the HostOS terminal and type

cd /mnt/data/balenahup/

and then print and share the latest file that you can find there?

Could you please share a screenshot of this? Thanks!

The red message is shown when e.g. trying to update again.
Everything else is working, also rebooting etc.

Just this state of Updating, rebooting never goes away. And hence also the Device is busy message.

Thanks for sharing @philkunz let me research more!

@philkunz could you please try to update the hostOS of your device again? If this fail, the issue might be related with the supervisor.

Yeah, that fails with the red message, device is busy.

Hi, did the device not reboot after the hostOS update?

The logs say:

[000000000][LOG]Raw target version: 2.113.18
[000000002][LOG]Loading info from config.json
[000000004][LOG]Target version supports hostapps, no device type support check required.
[000000004][LOG]Target OS version "2.113.18" OK.
[000000004][LOG]OS variant: 2.83.21
[000000004][LOG]Host OS version "2.83.21+rev1" OK.
...
[000001648][LOG]Rebooting into new OS in 5 seconds...

So given the screenshot above still reports 2.83.21+rev1 and the status is Update successful, rebooting, it seems it did not reboot after the update. Are you able to log into the hostOS to see if there is a reboot command stuck?

1 Like

The device is working alright in every other aspect. Its up, I can launch shells from the dashboard, the services are launching etc.

Could you please share the UUID of the device and make sure it has support access enabled? Thanks.

1 Like

You can also share by direct message if you prefer.

Hi, I just had a quick look and the supervisor is not able to report the target state:

Event: Device state report failure {"error":"getaddrinfo EAI_AGAIN api.resin.io"}

Which explains why the status does not change.

However, api.resin.io should still work fine except for logs forwarding.

curl -L https://api.resin.io/ping
OK

If it’s only this device with problems, you could try and configure it to use the balena-cloud.com endpoints by doing:

cp /mnt/boot/config.json /mnt/boot/config.old.json
cat /mnt/boot/config.json | sed 's/resin.io/balena-cloud.com/g' | jq '.vpnEndpoint = "cloudlink.balena-cloud.com"' > /mnt/boot/config.new.json
cat /mnt/boot/config.new.json | jq . > /mnt/boot/config.json

The device might need to be rebooted afterwards.

If you have several devices needing update, you can use the Configizer script:

In any case, we recommend care and testing first on a lab device to try the procedure before running it production, because an invalid config.json file can render a device inaccessible.

Its fixed. Thank you!