Closed eyalcha closed 1 month ago
Having this issue as well. I left it on overnight and saw it recorded short intervals with long gaps between them. The above error appearing whenever the logging stops in the below screenshot. How did you fix this if at all?
2022-12-30 22:06:38.943 ERROR (Thread-2 (RunDocker)) [custom_components.monitor_docker.helpers] [Docker] domoticz: Container not available anymore (3) (DockerError(900, 'Cannot connect to Docker Engine via tcp://192.168.178.XX:2375 [Server disconnected]'))
If this still needs fixing then for reference, I'm using a RBPi 4 with Raspberry Pi OS 64bit running HA in a container.
My docker-compose.yml for HA:
version: '3'
services:
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
volumes:
- /opt/homeassistant:/config
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock
restart: unless-stopped
privileged: true
network_mode: host
# devices:
# - "/dev/serial/by-id/usb-0658_0200-if00:/dev/serial/by-id/usb-0658_0200-if00"
The HA configuration.yml file includes this:
monitor_docker:
- name: Docker
url: tcp://192.168.178.XX:2375
(Real IP different of course)
And the dockerproxy docker-compose.yml file:
# Proxy the Docker sock so that we can pick up stats for HomeAssistant
dockerproxy:
image: tecnativa/docker-socket-proxy
container_name: dockerproxy
privileged: true
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 2375:2375
environment:
- BUILD=1
- COMMIT=1
- CONFIGS=1
- CONTAINERS=1
- DISTRIBUTION=1
- EXEC=1
- IMAGES=1
- INFO=1
- NETWORKS=1
- NODES=1
- PLUGINS=1
- SERVICES=1
- SESSSION=1
- SWARM=1
- POST=1
@Zoeff your issue is different. You should monitor the network traffic, maybe the TCP/IP connection gets disconnected and that could be the cause. Depending on your findings, it is possible you need to fix your setup yourself (if it is outside the integration). I am not sure you can do a tcpdump, but if you got that - you can check which side closes the connection and when it accepts it again.
Looks like I can use tcpdump however I have zero expertise when it comes to TCP/IP connections or networking in general. I've tried filtering by port 2375 and there is something different happening around the time of the graph being cut off but I have no idea how to interpret it.
See here:
And the above section in graph form:
Filtering by docker0 instead of by port 2375 showed this scary looking red entry right as the graph stopped updating in HomeAssistant:
This issue still persists with v1.18?
I will close this one, if it happens again, please raise a new issue.
After some time I am starting to see error logs when using remote dockermonitor (dockerproxy) and data is not received any more to the sensors
Note that after restarting Home Assistant, errors are gone and data is received, which means that the issue is not with the remote system, but with Home Assistant integration.