error in haproxy configuration if multiple ports are defined in tcp_public_endpoints service section
when tryng to setup a service with multiple tcp_public_endpoints ports (i.e. jabber https://git.autistici.org/ai3/config/tree/jabber_role)
haproxy does not start:
-- Unit haproxy.service has begun starting up.
Jul 15 16:23:06 host1 haproxy[9528]: [ALERT] 195/162306 (9528) : Parsing [/etc/haproxy/haproxy.cfg:35]: frontend 'fe_jabber_ejabberd' has the same name as frontend 'fe_jabber_ejabberd' declared at /etc/haproxy/haproxy.cfg:24.
Jul 15 16:23:06 host1 haproxy[9528]: [ALERT] 195/162306 (9528) : Parsing [/etc/haproxy/haproxy.cfg:39]: backend 'be_jabber_ejabberd' has the same name as backend 'be_jabber_ejabberd' declared at /etc/haproxy/haproxy.cfg:28.
Jul 15 16:23:06 host1 haproxy[9528]: [ALERT] 195/162306 (9528) : Parsing [/etc/haproxy/haproxy.cfg:46]: frontend 'fe_jabber_ejabberd' has the same name as frontend 'fe_jabber_ejabberd' declared at /etc/haproxy/haproxy.cfg:24.
Jul 15 16:23:06 host1 haproxy[9528]: [ALERT] 195/162306 (9528) : Parsing [/etc/haproxy/haproxy.cfg:50]: backend 'be_jabber_ejabberd' has the same name as backend 'be_jabber_ejabberd' declared at /etc/haproxy/haproxy.cfg:28.
Jul 15 16:23:06 host1 haproxy[9528]: [ALERT] 195/162306 (9528) : Parsing [/etc/haproxy/haproxy.cfg:57]: frontend 'fe_jabber_ejabberd' has the same name as frontend 'fe_jabber_ejabberd' declared at /etc/haproxy/haproxy.cfg:24.
Jul 15 16:23:06 host1 haproxy[9528]: [ALERT] 195/162306 (9528) : Parsing [/etc/haproxy/haproxy.cfg:61]: backend 'be_jabber_ejabberd' has the same name as backend 'be_jabber_ejabberd' declared at /etc/haproxy/haproxy.cfg:28.
Jul 15 16:23:06 host1 haproxy[9528]: [ALERT] 195/162306 (9528) : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
because for each port a frontend/backend is defined on the config but the name is always the same
haproxy.cfg snippet:
frontend fe_jabber_ejabberd
bind :::5222
default_backend be_jabber_ejabberd
backend be_jabber_ejabberd
log global
balance leastconn
option independant-streams
server task0 host2.jabber.infra.investici.org:5222 check fall 3 id 1000 inter 5000 rise 3 slowstart 60000 weight 50
frontend fe_jabber_ejabberd
bind :::5269
default_backend be_jabber_ejabberd
backend be_jabber_ejabberd
log global
balance leastconn
option independant-streams
server task0 host2.jabber.infra.investici.org:5269 check fall 3 id 1000 inter 5000 rise 3 slowstart 60000 weight 50