**Request error: tunneling socket could not be established, statusCode=500**

I have an issue with an edge device. We’ve identified a memory leak on a device in our code, in the meantime the disk space has filled up.

While attempting to purge the device the following error has occurred.

Request error: tunneling socket could not be established, statusCode=500

The device status says online with a VPN only warning but says heartbeat not received when I hover over the warning.

Here is a link to the device summary:
https://dashboard.balena-cloud.com/devices/7e3ffa9fdc070283ef3f46757c450d98/summary

I’ve activated support access.

Hello,
I am taking a look at your device, trying to see what could be done.
Sharing JFYI, in case you wonder where that ssh is coming from :slight_smile:

Best regards,
Pranav

Just saw that you are posting for the first time. Welcome to Balena Forums and hope you find them useful.
Cheers! :+1:

1 Like

Hi,
Took a look at the device’s filesystem. Filling up all available disk space is what is causing this issue. Balena and docker services need a small amount of space free in /var/lib to start up properly. Since there is absolutely no space, the docker engine fails to start saying: failed to start daemon: Unable to get the TempDir under /var/lib/docker: mkdir /var/lib/docker/tmp: no space left on device.
Without the docker engine, the balena stack cannot function, and hence you are not able to purge the device. The VPN (via which SSH works) doesn’t need to allocate any disk space and continues to work.
A solution I can think of is: you could ssh into the device and delete any data that your application has stored in /mnt/data. Once some space (say 10-15MB) is freed up, you could start the docker engine manually or just reboot the device. The device should come up properly and you should be able to use the purge option.
Another option is to clean-up /var/lib/docker manually but I think the above option is simpler.

Hope that helps.
Thanks.

1 Like

Thank so much Pranav.

This resolved my issue. I SSH’d into the Host OS and deleted files in the /mnt/data/docker/volumes/…/…, which then allowed me to reboot and then purge after the system came back online.

Thanks for your help!

Excellent! Glad I was able to help.

Cheers!