Hello, I am using Rancher v1.24.0 with kubernetes ...
# rancher-desktop
b
Hello, I am using Rancher v1.24.0 with kubernetes v1.36.4. I am seeing a frequent error message "Error response from daemon: failed to connect to the backend: timed out dialing Hyper-V socket". I am seeing this both on the Containers tab and when I try to run any Docker command using PowerShell. Can anybody help me figure this out?
πŸ‘€ 1
b
Hi @billowy-yak-5387, I ran into this exact same issue on v1.24.0!
The root cause is a healthcheck bug: in
/etc/init.d/docker
, it runs
curl --url http://./_ping
, but newer versions of
curl
reject the
http://.
format with
URL rejected: Bad hostname
. Because the healthcheck fails, Rancher Desktop assumes Docker is dead and drops the Hyper-V socket connection.
Here is the fix to resolve it permanently:
1. Open PowerShell and run this one-liner to create a persistent provisioning script:
powershell
$dir = "$env:LOCALAPPDATA\rancher-desktop\provisioning"
if (!(Test-Path $dir)) { New-Item -ItemType Directory -Path $dir }
[System.IO.File]::WriteAllText("$dir\fix-docker-healthcheck.start", "#!/bin/sh`nsed -i 's|http://./_ping|http://localhost/_ping|' /etc/init.d/docker`n", [System.Text.UTF8Encoding]::new($false))
2. Completely quit Rancher Desktop (right-click the tray icon β†’ Quit).
3. Restart Rancher Desktop.
This changes
http://./_ping
to
<http://localhost/_ping>
, which returns
200 OK
. The Hyper-V socket timeout will completely stop happening!
πŸ™Œ 1
πŸ™ 1
b
Thank you, @brief-jelly-34205. This fix seems to be working. I had already noticed this workaround on github and have been running it for a couple of days now.
πŸ‘ 1