Tecnativa / docker-socket-proxy

Proxy over your Docker socket to restrict which requests it accepts
Apache License 2.0
1.41k stars 161 forks source link

Warning in log since latest update #123

Open chris-1243 opened 5 months ago

chris-1243 commented 5 months ago

Since the last update of the container, i am getting this warning in my log


14:56:07 
[WARNING] While not properly invalid, you will certainly encounter various problems with such a configuration. To fix this, please ensure that all following timeouts are set to a non-zero value: 'client', 'connect', 'server'.

14:56:07
[WARNING] 096/125607 (1) : Can't open global server state file '/var/lib/haproxy/server-state': No such file or directory

Any idea how to solve those?

stefgo commented 5 months ago

Since the last update of the container, i am getting this warning in my log


14:56:07 
[WARNING] While not properly invalid, you will certainly encounter various problems with such a configuration. To fix this, please ensure that all following timeouts are set to a non-zero value: 'client', 'connect', 'server'.

14:56:07
[WARNING] 096/125607 (1) : Can't open global server state file '/var/lib/haproxy/server-state': No such file or directory

Any idea how to solve those?

same here

ahmadkakarr commented 3 months ago

yes same for me

socket-proxy | 2024-06-20T12:36:44.836766108Z [WARNING] 171/123644 (1) : config : missing timeouts for backend 'docker-events'. socket-proxy | 2024-06-20T12:36:44.836777173Z | While not properly invalid, you will certainly encounter various problems socket-proxy | 2024-06-20T12:36:44.836780022Z | with such a configuration. To fix this, please ensure that all following socket-proxy | 2024-06-20T12:36:44.836782185Z | timeouts are set to a non-zero value: 'client', 'connect', 'server'. socket-proxy | 2024-06-20T12:36:44.836784325Z [WARNING] 171/123644 (1) : Can't open global server state file '/var/lib/haproxy/server-state': No such file or directory

theses are in the logs of socket-proxy .

these warning are related to ha proxy.

chris-1243 commented 2 months ago

As a workaround, the file haproxy.cfg.template in /usr/local/etc/haproxyneeds to be edited as followed:

...
backend docker-events
    server dockersocket $SOCKET_PATH
    timeout server 30s
...

I chose 30 seconds but any value according to your need and haproxy documentation should be fine.

Restart your container and the timeout warning should be removed. This is not persistent if you remove the container. A volume should be created to avoid such scenario.

mrclschstr commented 2 months ago

As a workaround, the file haproxy.cfg.template in /usr/local/etc/haproxyneeds to be edited as followed:

...
backend docker-events
    server dockersocket $SOCKET_PATH
    timeout server 30s
...

This workaround does not work for me. If I adjust the timeout as specified, Traefik can no longer establish a connection to the proxy. I may have made a mistake in the configuration...

chris-1243 commented 2 months ago
[WARNING] While not properly invalid, you will certainly encounter various problems with such a configuration. To fix this, please ensure that all following timeouts are set to a non-zero value: 'client', 'connect', 'server'.

The warning comes due to a zero value. Maybe try a greater value. See haproxy docs