docker-socket-proxy icon indicating copy to clipboard operation
docker-socket-proxy copied to clipboard

Warning in log since latest update

Open chris-1243 opened this issue 1 year ago • 5 comments
trafficstars

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?

chris-1243 avatar Apr 07 '24 14:04 chris-1243

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

stefgo avatar Apr 07 '24 14:04 stefgo

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.

ahmadkakarr avatar Jun 20 '24 13:06 ahmadkakarr

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.

chris-1243 avatar Jul 09 '24 21:07 chris-1243

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...

mrclschstr avatar Jul 27 '24 08:07 mrclschstr

[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

chris-1243 avatar Jul 27 '24 18:07 chris-1243

is there a way to set this through env variables?

scrapix avatar Dec 29 '24 19:12 scrapix

same here

[WARNING] 027/104750 (1) : Can't open global server state file '/var/lib/haproxy/server-state': No such file or directory

MikeDeltaHH avatar Jan 28 '25 10:01 MikeDeltaHH

I have the same issue, I also added to the environment variables in my docker compose the following:

  • PROXY_READ_TIMEOUT=240
  • PROXY_CONNECT_TIMEOUT=60
  • PROXY_SERVER_TIMEOUT=300

But this doesn't remove the errors. anyone have an idea how to solve the log errors as mention in above posts?

TheDude1972 avatar Mar 15 '25 10:03 TheDude1972