Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home Assistant 2024.8.x - Failed Docker connect: tcp://A.B.C.D:2375/version #157

Closed
ualex73 opened this issue Aug 4, 2024 · 11 comments
Closed

Comments

@ualex73
Copy link
Owner

ualex73 commented Aug 4, 2024

Home Assistant seem to have made internal changes with aiohttp and it will not accept remote URLs like:
tcp://192.168.1.1:2376

But the format is changed to (replace tcp with http):
http://192.168.1.1:2376

NOTE - this should make it work again with not-TLS connections, no testing has been done (yet) with TLS connections.

@firstof9
Copy link

firstof9 commented Aug 4, 2024

This also seems to block unix socket calls as well.

2024-08-04 13:34:38.168 ERROR (MainThread) [custom_components.monitor_docker] Failed Docker connect: unix://localhost/version

@ualex73
Copy link
Owner Author

ualex73 commented Aug 5, 2024

I did not test that one yet, but it seems Home Assistent 2024.8 seem to break it all :-(
Only quick workaround is to switch to URL.

BTW: it has been raised with the aiohttp team:
aio-libs/aiohttp#8600

@aneisch
Copy link

aneisch commented Aug 5, 2024

Affected as well. Solution for me was to modify docker daemon to listen on a localhost port (my Home Assistant container uses the host network), restart docker daemon, then configure the url key in monitor_docker config. YMMV.

https://docs.docker.com/config/daemon/remote-access/

[andrew~]$ cat /etc/docker/daemon.json 
{
  "hosts": ["unix:///var/run/docker.sock", "tcp://127.0.0.1:2375"]
}

configuration.yaml:

monitor_docker:
  url: "http://localhost:2375"

@walk0080
Copy link

walk0080 commented Aug 8, 2024

The workaround is not working for me either (sudo systemctl edit docker.service).
Have Docker on Debian Linux and HA is in Docker w/ nginxproxymanager (not host network).
Will wait for a future update to hopefully fix it.

@bdraco
Copy link

bdraco commented Aug 8, 2024

Is this solved with aiohttp 3.10.2 ?

@bdraco
Copy link

bdraco commented Aug 8, 2024

docker exec -it homeassistant /bin/bash
pip3 install --upgrade aiohttp

restart

@firstof9
Copy link

firstof9 commented Aug 9, 2024

Is this solved with aiohttp 3.10.2 ?

I've confirmed it does fix it on my container.

@bdraco
Copy link

bdraco commented Aug 9, 2024

Thanks for confirming

@ualex73
Copy link
Owner Author

ualex73 commented Aug 10, 2024

HA 2024.8.1 is out, so please upgrade to that one.

@ualex73
Copy link
Owner Author

ualex73 commented Aug 11, 2024

Ok, let's leave this issue open for a few days for other people to read it, afterwards we will close it.

@firstof9
Copy link

You could also pin the issue 👍

@ualex73 ualex73 closed this as completed Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants