Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Frequently asked questions when HAProxy starts

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

When combining rabbitmq and haproxy, the following problems were encountered

Configuration of a section:

Listen rabbitmq_local_cluster 127.0.0.1:5670 mode tcp balance roundrobin server rabbit1 127.0.0.1:5672 check inter 5000 rise 2 fall 3 server rabbit2 127.0.0.1:5673 check inter 5000 rise 2 fall 3 server rabbit3 127.0.0.1:5674 check inter 5000 rise 2 fall 3listen private_monitoring: 8100 mode http option httplog stats enable stats uri / stats stats refresh 5s

Error report:

[ALERT] 167ALERT 151633 (56845): parsing [haproxy.cfg.local_cluster:27]: 'listen' cannot handle unexpected argument' 127.0.0.1 listen' cannot handle unexpected argument 5670mm. [ALERT] 167ALERT 151633 (56845): parsing [haproxy.cfg.local_cluster:27]: please use the 'bind' keyword for listening addresses. [ALERT] 167Accord 15151633 (56845): parsing [haproxy.cfg.local_cluster:40]:' listen' cannot handle unexpected argument': 8100mm. [ ALERT] 167Universe 151633 (56845): parsing [haproxy.cfg.local_cluster:40]: please use the 'bind' keyword for listening addresses.

Modify it to either

Listen rabbitmq_local_cluster bind 127.0.0.1:5670 mode tcp balance roundrobin server rabbit1 127.0.0.1:5672 check inter 5000 rise 2 fall 3 server rabbit2 127.0.0.1:5673 check inter 5000 rise 2 fall 3 server rabbit3 127.0.0.1:5674 check inter 5000 rise 2 fall 3listen private_monitoring bind: 8100 mode http option httplog stats enable stats uri / stats stats refresh 5s

Restart [haproxy-f haproxy.cfg.local_cluster] error:

[ALERT] 167gamma 151959 (58789): Starting frontend GLOBAL: cannot change UNIX socket ownership [/ tmp/haproxy.socket]

Change it to sudo haproxy-f haproxy.cfg.local_cluster.

All configuration: https://github.com/rabbitinaction/sourcecode/blob/master/configs/haproxy/haproxy.cfg.local_cluster

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report