Application won't update, thinks it's running and needs to be deployed?

support
raspberrypi3

#1

Hello,

I have a device that somehow has the container in a frozen state stuck at an old commit, that when in the original project seems to function fine. I have tried moving it between projects and enabling the lock override and nothing seems to work. Seems like something is wrong with the application locking…

HOST OS VERSION
Resin OS 2.13.6+rev1

In the working project: Occasionally displaying: Service is already running ‘main sha256:8fb2fef60f519d4a1ea5165a72bf5f4cc88acd11fb27b365e6b979d80bace058’

If I move to another project and try to restart, I get this message: Request error: Cannot read property ‘services’ of undefined

Container area in the dashboard is now just blank, but again, the container works fine (in any project)…

Any ideas?

Thanks,
Kevin


#4

Thanks to support, determined NTP was not working, indeed the date was days out of sync. Manually setting the correct date in the Host OS caused everything to work again.


#8

Hi Kevin,

Would it be possible for you to run chronyc sources and check the output of that command in the Host OS

That will help us trace why NTP wasn’t sync-ing. Once a device is connected to the internet, NTP should sync unless a firewall is blocking it.

Regards
ZubairLK


#11

Thank you, this might indeed the culprit. Here is the output:
root@ac6920d:~# chronyc sources
506 Cannot talk to daemon


#13

Hi Kevin,
I see. We have just merged a few chrony fixes in meta-resin that will trickle through to devices in a while. They should help.

PR #1126: Fixes for ntp scripts and resin-ntp-config by ZubairLK in resin-os/meta-resin on GitHub

On the board that you see 506 Cannot talk to daemon, can you please run
systemctl status chronyd on the host os and share the output of that. Just to narrow down if its the same issue fixed by the PR above or if it is something else.

And to fix the root cause, you might have to run systemctl restart chronyd. But please run the status command first and share the output.

Thanks

Regards
ZubairLK


#14

Sorry for the delay, next time I have the problem I will follow your instructions.

Thank you,
Kevin


#16

Flashed a card this morning and having this problem, the date the RPi thinks it is 2018-07-16 and the Logs says
16.07.18 10:16:35 (-0700) Failed to download image ‘registry2.resin.io/v2/’ due to '(HTTP code 500) server error - Get https://registry2.resin.io/v2/v2/: x509: certificate has expired or is not yet valid ’

As you suspected, looks like the output of systemctl status chronyd indicates it was not started and timed out:

chronyc sources returns: 506 Cannot talk to daemon as expected.

systemctl restart chronyd did sync the time and get the image to begin downloading. Here is the output of chronyc sources now:
image

Thanks for the help!

FWIW, if there is an image already loaded on my unit (not an initial onboard), i have just run the following as part of the startup script (which fixes the time and gets subsequent deltas to download):

alpine:
image

On debian, just replace the ntpd command and options with ntpdate

-Kevin


#25

Hey Kevin, thanks for the detailed report :slight_smile:

Looks like that was indeed the issue; 2.14.3+rev1 has just been released and it contains the fix ZubairLK mentioned above. Let us know if it works for you.

Best regards,
Giovanni