Persistent "Failed to download image due to 'connect ECONNREFUSED /var/run/balena-engine.sock" error

Hi there,

I’m trying to set up the Balena.io National Rail sign project on my Raspberry Pi 4, and I keep hitting the above error on first download-from-cloud device setup. Log snippets below:

14.05.20 18:45:07 (+0100) Supervisor starting
14.05.20 18:45:11 (+0100) Applying configuration change {“SUPERVISOR_POLL_INTERVAL”:“900000”,“SUPERVISOR_DELTA”:“1”,“SUPERVISOR_DELTA_VERSION”:“3”}
14.05.20 18:45:11 (+0100) Applied configuration change {“SUPERVISOR_POLL_INTERVAL”:“900000”,“SUPERVISOR_DELTA”:“1”,“SUPERVISOR_DELTA_VERSION”:“3”}
14.05.20 18:45:12 (+0100) Creating network ‘default’
14.05.20 18:45:12 (+0100) Creating volume ‘resin-data’
14.05.20 18:45:13 (+0100) Downloading image [link removed to allow post]
14.05.20 18:50:51 (+0100) Failed to download image [link removed to allow post] due to ‘connect ECONNREFUSED /var/run/balena-engine.sock’
14.05.20 18:51:53 (+0100) Supervisor starting
14.05.20 18:52:03 (+0100) Downloading image [link removed to allow post]
14.05.20 18:57:48 (+0100) Failed to download image [link removed to allow post]due to ‘connect ECONNREFUSED /var/run/balena-engine.sock’
14.05.20 18:59:25 (+0100) Supervisor starting
14.05.20 18:59:26 (+0100) Downloading image '[link removed to allow post]

(This repeats over and over)

My Raspberry Pi 4 is connected to Ethernet, but it does the same over wifi as well, with refreshed SD card images on each occasion. It gets to anywhere between 20 and 60 percent complete before I get a ECONNREFUSED error. Does anyone have any advice?

I’ve granted 12 hours of support access for UDID 4dbdad259c01df1443125fa0ac23e27b. I’m new to balena so I’ve probably noobed it up somewhere…

Cheers in advance!

Hi there, looking at the device diagnostics log, it would appear this device has issues with slow/corrupted SD card. Do you have another SD card you could try to re-provision with?

I’ll dig around in the tat drawer and report back.

No such luck - new one on order and will report back. Thanks!

Cheers, please let us know how it goes with the new hardware.

New SD card arrived from Amazon and that’s sorted everything! Thanks!

Got the same problem here :frowning:

image

There’s some really strange stuff going on here but I can still remote in.

Could somebody from balena pop in and have a look if I grant support access?

Hello @ajlennon
Please grant support access and post the device UUID - we will take a look.

1 Like

This is thoroughly strange! Now when I go to the device it forwards to a summary page which is blank!

I’ve granted support access on the “motioneye” app - based on the balena-motioneye one.

There’s only one device in there which is the problem

https://dashboard.balena-cloud.com/apps/1819046/actions

Thanks!

The blank summary page is related to an issue that our team are currently investigating at this end. See https://status.balena.io/ for details.

1 Like

Ah great - well anyway you should be able to get into the device now

I’ve had a look at the logs and can see that balena-engine is continually restarting. I’ve pinged our balena-engine team to look into this further.
Do you have other devices running the same application and the same version of OS without any issues?

Hello @ajlennon
It seems that the application has filled the /mnt/data partition completely which is preventing balena-engine from starting. The /mnt/data/docker/volumes/1819046_media/ contains most of the data. Try clearing the contents of this volume, after backing it up as necessary, and see whether the device will then run normally.

1 Like

Doh! I wish I had thought of that. Didn’t think it would fill up so quickly! Thanks very point for pointing it out to me.

A comment I would make is that overloading CPU or memory is always a cause of unexpected failure. It would be very good if the Balena framework could protect us from ourselves when we get these things wrong :wink:

So I removed the data from the path as you suggested @markcorbinuk but I am still not fixed. Wondering if it to do with overlay being full?

I can probably get in and reflash this over the weekend but I wondered if you had any thoughts in the meantime @markcorbinuk ? Thanks!

@ajlennon ,faced similar issue.
Fixed it by purging the data on my machine