Service 'lb' check

Hello guys,

Could you check what am I doing wrong here, please?

I am trying to set up an HAproxy on my consul and I am facing the following error:

GUI:

Get "http://localhost": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

Instance:

2020-07-19T16:56:58.977Z [WARN]  agent: Check is now critical: check=service:lb
    2020-07-19T16:57:18.978Z [WARN]  agent: Check is now critical: check=service:lb
    2020-07-19T16:57:38.979Z [WARN]  agent: Check is now critical: check=service:lb
    2020-07-19T16:57:58.979Z [WARN]  agent: Check is now critical: check=service:lb
    2020-07-19T16:58:18.985Z [WARN]  agent: Check is now critical: check=service:lb
    2020-07-19T16:58:38.988Z [WARN]  agent: Check is now critical: check=service:lb

haproxy.cfg:

global
    maxconn 4096

defaults
    mode http
    timeout connect 5s
    timeout client 50s
    timeout server 50s

listen http-in
    bind *:80
    server web1 172.20.20.21:8080
    server web2 172.20.20.22:8080
    server web3 172.20.20.23:8080

setup.lb.sh

#!/usr/bin/env bash

cp /vagrant/provision/haproxy.cfg /home/vagrant/.

# Run haproxy in a docker container
# Mount the haproxy config file
docker run -d \
        --name haproxy \
        -p 80:80 \
        --restart unless-stopped \
        -v /home/vagrant/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro \
        haproxy:2.2.0-alpine

Thank you in advance.

Regards
RG

Consul HTTP server listens on port 8500. What is running on the port 8080???

1 Like
listen http-in
    bind *:80
    server web1 172.20.20.21:8500
    server web2 172.20.20.22:8500
    server web3 172.20.20.23:8500