HAProxy community

Missing timeouts for backend warning message

HAProxy 2.1.3
Alpine 3.11.3

I’ve installed HAProxy and it works as expected. My question is, why I cannot get rid of this warning message and is my timeout configuration in the defaults section not being picked up by the backend:

[WARNING] 071/135712 (11) : config : missing timeouts for backend 'ignite'.
       | 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'.

Have about a dozen backends defined, and I am getting the above message for each. I have common timeout configuration in a defaults section (simplified below) of my configuration file:

defaults 
    timeout connect 5s
    timeout client 1m
    timeout server 1m    

backend ignite
    mode http
    balance roundrobin
    option forwardfor except 127.0.0.0/8
    server serverx serverx:7080 check inter 10s fall 3 rise 2

I assumed each backend would ‘default’ to those timeouts unless I override them in the backend block if needed. I see a lot of posted log examples with that message in them, but, nothing about this being an issue, nor how to address it.

Any ideas why my configuration produces this warning? Are the timeouts defined in the default section being applied to each backend with my configuration setup?

Thanks,
James

I assume the configuration you just posted does not actually produce those warnings, it doesn’t for me.

As per the documentation:
https://cbonte.github.io/haproxy-dconv/2.1/configuration.html#4

A “defaults” section sets default parameters for all other sections following
its declaration. Those default parameters are reset by the next “defaults”
section. See below for the list of parameters which can be set in a “defaults”
section. The name is optional but its use is encouraged for better readability.

Can you confirm that is the case for your actual configuration?

Thanks for the reply Lukas!

Went back and checked all configuration files and I found a stray “defaults” section. Removed that second section and now have no warnings in the log.

Since I have so many configuration files, I am starting HAProxy using this command line:

/usr/local/sbin/haproxy -db -f 000-file.cfg -f 005-file.cfg ...

where the config files are combined by sorted order (using numeric prefix in the file name) and ‘000’ has the global and defaults sections. Another file (with a higher prefix) defined a defaults section instead of having the specific timeout and option overrides defined.

James

1 Like