"Cannot connect to the Docker Daemon" after update

I’m currently running on a Raspberry Pi 4 B. I’ve been using this for about 2 years, but out of the blue the system won’t start up anymore.

I’m suspecting that it’s a problem with the SD card, or with the Raspberry Pi (time for an upgrade maybe?). However, I’m a total noob when it comes to coding, so I’m out of my element here.

Here are some of the error codes I see when I try to boot it up.

First:
Waiting for the home assistant CLI to be ready…
Write access unavailable, cannot proceed (try mounting with noload)

Then:
Cannot connect to the docker deamon at unix:///bar/run/docker.sock. Is the docker Daemon Running?
(This is repeated a bunch) followed by:
[WARN] Home Assistant CLI not starting! Jump into Emergency Console

If anyone can help, it would be really appreciated, as any of my trouble-shooting has failed.

I’ve tried a couple of thread troubleshooting suggestions, but they didn’t quite work (I suspect it wasn’t quite related to the problem I have).

EDIT:
Because I’m getting a few pings on this, editing my post to include the update in my comment below:

It turns out that it was most likely a botched update.

I bit the bullet and bought another Micro SD card and did a fresh install. That worked, and everything uploaded just fine. So I can safely rule out that it was an issue with the Pi itself.

I was also fortunately able to access the files on the old Micro SD card so that I didn’t have to start completely from scratch. I used Disk Internals Linux reader (a suggestion I did pick up from another thread) and was able to restore a solid chunk of my configuration, automations and scripts.

I can’t quite yet rule out that the SD card wasn’t bad, as I’m still using it for the files on there, but either way a fresh install solved my particular problem.

1 Like

I am really interested in this because I started getting this error as well.
I even tried a fresh install, and the issue is still there.

Really? I was thinking about doing the same, but hesitated because I don’t have a remote backup (lesson learned).

I was thinking that it might be an issue where the update process was interrupted and broke the code, but if a fresh install didn’t fix it…

I’m wondering if I need to try a new SD card, but I’d have to go buy one since I don’t have a spare.

Small update.
(My setup is on an SSD on USB3)
While booting again, I saw an error that looked something like this: ‘transfer event for unknown stream ring slot 2 ep 7’. Upon searching for this, I found some threads from other OSs that were saying this might be because of a USB3 issue.
I decided to move it to one of the USB2 ports, and it boots with no issues.

Seeing this, I assumed it’s an issue with my USB3 ports, but if you have the same issue on an SD card installation, I’m not even sure anymore what causes the issue.
Might still be something related to the USB3 in my case, because neither of the ports works correctly.

1 Like

Well, I just gave it a shot booting while using a micro SD adapter. No dice.

Curious that it started for you on a different USB port though.

Update!

It turns out that it was most likely a botched update.

I bit the bullet and bought another Micro SD card and did a fresh install. That worked, and everything uploaded just fine. So I can safely rule out that it was an issue with the Pi itself.

I was also fortunately able to access the files on the old Micro SD card so that I didn’t have to start completely from scratch. I used Disk Internals Linux reader (a suggestion I did pick up from another thread) and was able to restore a solid chunk of my configuration, automations and scripts.

I can’t quite yet rule out that the SD card wasn’t bad, as I’m still using it for the files on there, but either way a fresh install solved my particular problem.

I’m in the same boat here, too. HA worked flawlessly many months now. However, things started to look fishy when a new core update was announced, I clicked on “update” but nothing happened. I tried a few times but had no luck.
The GUI was operational so I went to the system page and clicked on the restart button/link. Nothing happened but after a while the GUI wasn’t loading anymore.
So I pulled the plug from my Raspberry 400 on which I run HA and connected a monitor and booted it up again.
Now I see a lot of problems during bootup and eventually that same “Cannot connect to the docker deamon …” message you mentioned above, @botnic.

This is a major problem and I’m kind of freaking out here.

I really don’t want to go all the way with a complete new installation.
Now if there was a way to repair this from the commandline I’d be happy to try.
However, I cannot even connect via ssh as root from another computer to the Raspi 400, ssh is simply not answering at all. Tried with the computer’s local name (homeassistant.local) and its IP address. Even ping requests time out!

So I’m currently stuck at the emergency console with a simple # prompt as user root and hope for help from somewhere/someone.

Okay here’s a small update but still no solution.

At the emergency console prompt I checked with the dmesg command what was going on during bootup and saw many I/O errors from the /dev/mmcblk0 device – that’s the SD card. :see_no_evil:

The sector numbers showed that mostly partitions 7 and 8 had problems.

Trying to repair these errors with fsck.ext4 /dev/mmcblk0px (where x stands for a 7 or an 8) didn’t work, unfortunately. Here’s the output of two commands I tried:

# fsck.ext4 /dev/mmcblk0p7
e2fsck 1.46.5 (30-Dec-2021)
hassos-overlay: recovering journal
Superblock needs_recovery flag is clear, but journal has data.
Run journal anyway<y>? yes
fsck.ext4: unable to set superblock flags on hassos-overlay
[ 1668.1808791] bik_update_request: I/0 error, dev mmcblk0, sector 1296384 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0
[ 1668.1823541] Buffer I/0 error on dev mmcblk0p7, logical block 8192, lost async page write

hassos-overlay: ********** WARNING: Filesystem still has errors **********


# fsck.ext4 /dev/mmcblk0p8
e2fsck 1.46.5 (30-Dec-2021)
hassos-data: recovering journal
[ 1736.698727] blk_update_request: I/0 error, dev mmcblk0, sector 1919272 op 0x1: (WRITE) flags 0x800 phys_seg 8 prio class 0
[ 1736.700703] Buffer I/O error on dev mmcblk0p8, logical block 491816, lost async page write
[ 1736.702622] Buffer I/O error on dev mmcblk0p8, logical block 491817, lost async page write
[ 1736.704543] Buffer I/O error on dev mmcblk0p8, logical block 491818, lost async page write
[ 1736.706451] Buffer I/O error on dev mmcblk0p8, logical block 491819, lost async page write
[ 1736.708364] Buffer I/O error on dev mmcblk0p8, logical block 491820, lost async page write
[ 1736.710248] Buffer I/O error on dev mmcblk0p8, logical block 491821, lost async page write
[ 1736.712133] Buffer I/O error on dev mmcblk0p8, logical block 491822, lost async page write
[ 1736.713982] Buffer I/O error on dev mmcblk0p8, logical block 491823, lost async page write
[ 1736.716185] blk_update_request: I/0 error, dev mmcblk0, sector 2476032 op 0x1: (WRITE) flags 0x800 phys_seg 8 prio class 0
[ 1736.718066] Buffer I/O error on dev mmcblk0p8, logical block 1048576, lost async page write
[ 1736.719495] Buffer I/O error on dev mmcblk0p8, logical block 1048577, lost async page write
[ 1736.721126] blk_update request: I/O error, dev mmcblk0, sector 5621888 op 0x1:(WRITE) flags Ox800 phys_seg 8 prio class 0
[ 1736.722711] blk_update request: I/O error, dev mmcblk0, sector 5622016 op 0x1:(WRITE) flags Ox800 phys_seg 8 prio class 0
[ 1736.724575] blk_update request: I/O error, dev mmcblk0, sector 5622192 op 0x1:(WRITE) flags Ox800 phys_seg 8 prio class 0
[ 1736.725875] blk_update request: I/O error, dev mmcblk0, sector 5622536 op 0x1:(WRITE) flags Ox800 phys_seg 8 prio class 0
[ 1736.727550] blk_update request: I/O error, dev mmcblk0, sector 5690856 op 0x1:(WRITE) flags Ox800 phys_seg 8 prio class 0
[ 1736.730353] blk_update request: I/O error, dev mmcblk0, sector 18288088 op 0x1:(WRITE) flags Ox800 phys_seg 8 prio class 0
Superblock needs_recovery flag is clear, but journal has data.
Run journal anyway<y>? yes
fsck.ext4: Input/output error while recovering journal of hassos-data
fsck.ext4: unable to set superblock flags on hassos-data

[ 1741.383973] blk_update_request: I/O error, dev mmcblk0, sector 2476032 op Ox1:(WRITE) flags ox800 phys_seg 8 prio class 0

hassos-data: ********** WARNING: Filesysten still has errors **********

Now is there a way to repair these partitions? Anything else I could try?
Or am I screwed? (HA backup only on the SD card somewhere …)

Additional info: The SD card is from SanDisk which never failed me before. :man_shrugging:

Maybe you have an idea, @francisp ? :flushed:

Can confirm I’m running into the exact same issues after core up2023.1.7. I’ve had success with pulling files from the card onto my laptop (Ubuntu), but boy was it a hassle. Basically had to create new Mount points, then run “mount -o ro,noload /dev/mmcblk0p7 /home/tony/mount_point”. Was able to get it mounted, but for the life of me cannot change anything to r/w; it’s all read-only.

Trued hdparm -r0 /dev/mmcblk0p7 (as well as all other partitions) and still wouldn’t take the change.

Pretty frustrating. Fsck won’t even run, but from the Disk Manager I can check the file system, and mmcblk0p1 says something is wrong.

@Tony_waggles @botnic

I am also struggling with this problem.

I am not all that well versed in linux and was hoping you might be able to provide a more detailed step-by-step of your solution involving extracting the files from the SD card so as not to have to start from scratch on a fresh install. (I have years of automations and devices set up on my HA install)

[I’m using HAOS on an RPi4B]

I am getting the exact same errors you got when I boot…

Waiting for the home assistant CLI to be ready…

Write access unavailable, cannot proceed (try mounting with noload)

Cannot connect to the docker deamon at unix:///var/run/docker.sock. Is the docker Daemon Running?
Cannot connect to the docker deamon at unix:///var/run/docker.sock. Is the docker Daemon Running?
Cannot connect to the docker deamon at unix:///var/run/docker.sock. Is the docker Daemon Running?
Cannot connect to the docker deamon at unix:///var/run/docker.sock. Is the docker Daemon Running?
Cannot connect to the docker deamon at unix:///var/run/docker.sock. Is the docker Daemon Running?
Cannot connect to the docker deamon at unix:///var/run/docker.sock. Is the docker Daemon Running?
(Etc…)

[WARN] Home Assistant CLI not starting! Jump into Emergency Console
# _

Any help would be very much appreciated.
TIA

I am getting the same problem after trying to migrate to a USB3 SSD disk (ADATA SD600Q SSD 240GB). Everytime I run the “os datadisk move”, I end up in the situation described above. I am using HAOS 9.5 on a Raspberry Pi4. Could anyone help figure out what’s wrong, please?

Hey mate,having the same issue with the same drive,did you find a solution?

Just updated my post to include my final solution.

Long story short, no, I didn’t find a fix and had to do a completely fresh install.

I was able to save myself a ton of work, however, by using the software Disk Internal Linux Reader to salvage my files and avoid having to re-code everything from scratch.

I had the same issue and fixed it by reflashing my SD card, after I “erased” it using Disk Utility. Loosing my existing installation was not a problem for me. “Format” was set to “MS-DOS (FAT)” and “Scheme” to “Master Boot Record”. The last option did it for me.

Thanks so much for this response! This helped figuring out why my Raspberry Pi 4 was acting up with an SSD. Switched to USB2 and it’s SMOOTH via PoE!

I was experiencing this too. Ended up fetching a new usb-stick (I run on an old laptop) for a fresh install.
After restoring backup on the new install, It took a couple of days before I experienced this again. I´m now left with two dead usb-sticks and a dark house for two weeks because non of my light-switches work without HA