haproxy configuration errors

Veerendra Kakumanu

Here's my configuration

global
        log /dev/log   local0
        log 127.0.0.1   local1 notice
        maxconn 4096
        user haproxy
        group haproxy
        daemon

defaults
        log     global
        mode    http
        option  httplog
        option  dontlognull
        retries 3
        option redispatch
        maxconn 2000
        contimeout     5000
        clitimeout     50000
        srvtimeout     50000

listen webfarm 0.0.0.0:80
    mode http
    stats enable
    stats uri /haproxy?stats
    balance roundrobin
    option httpclose
    option forwardfor
    server apache 192.168.1.10:8001 weight 1  maxconn 512 check

After the configuration I restarted the haproxy service, that I got the following message

root@d32b2eb97bf0:/# service haproxy start
 * Starting haproxy haproxy                                                                                                        [WARNING] 144/130034 (436) : parsing [/etc/haproxy/haproxy.cfg:17] : the 'contimeout' directive is now deprecated in favor of 'timeout connect', and will not be supported in future versions.
[WARNING] 144/130034 (436) : parsing [/etc/haproxy/haproxy.cfg:18] : the 'clitimeout' directive is now deprecated in favor of 'timeout client', and will not be supported in future versions.
[WARNING] 144/130034 (436) : parsing [/etc/haproxy/haproxy.cfg:19] : the 'srvtimeout' directive is now deprecated in favor of 'timeout server', and will not be supported in future versions.
[ALERT] 144/130034 (436) : parsing [/etc/haproxy/haproxy.cfg:21] : 'listen' cannot handle unexpected argument '0.0.0.0:80'.
[ALERT] 144/130034 (436) : parsing [/etc/haproxy/haproxy.cfg:21] : please use the 'bind' keyword for listening addresses.
[ALERT] 144/130034 (436) : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
[WARNING] 144/130034 (436) : config : proxy 'webfarm' has no 'bind' directive. Please declare it as a backend if this was intended.
[WARNING] 144/130034 (436) : config : missing timeouts for proxy 'webfarm'.
   | 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'.
[ALERT] 144/130034 (436) : Fatal errors found in configuration.

I did above steps in docker container. How to reslove??

Thanks.

Guest

The syntax has changed in recent HAProxy Version. I had that issue in Version 1.6.5:

Change: listen webfarm 0.0.0.0:80

To:

listen webfarm

bind 0.0.0.0:80

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

PostgreSQL Configuration for HAProxy

configuration for haproxy in ubuntu?

HAproxy + Varnish Cache configuration

HAProxy basic configuration - defining primary backend

working configuration for haproxy with the force-persist setting

HAProxy and reqrep path rewriting with redirect configuration

Console Errors NodeJS configuration

Android configuration errors

Configuration file contains errors

Haproxy seems to not send logs to 127.0.0.1:514 despite configuration

IntegrationTest raises errors from configuration?

How to test for errors in Spring Configuration?

Ubuntu initial configuration script errors

SVN with apache2 configuration path errors

Unknown configuration 'errors.deadletterqueue.topic.name'

Python celery configuration returning exchange errors

Spring, Java : Get email for critical errors configuration.

gradle: switching to implementation/testImplementation causing errors when accessing configuration

Errors during configuration of the neo4j django-neomodel

Update TSLint Errors : Could not find implementations for the following rules specified in the configuration

Configuration Errors: Elastic Load Balancer + EC2 + Route 53

Neo4j javascript driver configuration errors

@Given or @When annotation of cucumber is throwing errors related spring boot configuration

dependency problems: Errors while processing: keyboard-configuration

Static IP configuration causing apt-get errors

Multi configuration Matrix job fails to start emulator with some errors

Redirect on HAProxy

Crontab and haproxy

No log4j2 configuration file found. Using default configuration: logging only errors to the console