ualex73 / monitor_docker

Monitor Docker containers from Home Assistant
Apache License 2.0
267 stars 34 forks source link

Cannot connect to docker API #112

Closed jondotnet closed 1 year ago

jondotnet commented 1 year ago

Having a few issues with this.
home assistant running in docker.
docker.sock mounted as a volume in docker-compose.

Tried default config and get: [Docker]: Can not connect to Docker API (Missing valid docker_host.Either DOCKER_HOST or local sockets are not available.)

Enable remote API in docker.service by adding -H=tcp://0.0.0.0:2376 and get:

Docker: Docker URL is 'tcp://192.168.1.31:2376'
[Docker]: Docker environment 'DOCKER_TLS_VERIFY' is NOT set
[Docker]: Docker environment 'DOCKER_CERT_PATH' is NOT set
Failed Docker connect: DockerError(900, "Cannot connect to Docker Engine via tcp://192.168.1.31:2376 [Cannot connect to host 192.168.1.31:2376 ssl:default [Connect call failed ('192.168.1.31', 2376)]]")

Docker API is responding to curl requests

Tried using: url: unix:///var/run/docker.sock in the config and get: Failed Docker connect: DockerError(900, 'Cannot connect to Docker Engine via unix:///var/run/docker.sock [Cannot connect to unix socket /var/run/docker.sock ssl:default [No such file or directory]]')

Its possibly user error but I have checked all the settings I can think of and get no further.

Thanks

J

jondotnet commented 1 year ago

Seems to have fixed its self with an update from 2022.10.2 to 2022.10.5