R
Railway•3d ago
Jaymart

unable to point HAProxy to RabbitMQ services

[NOTICE] (7) : haproxy version is 2.7.12-5e21fc9
[NOTICE] (7) : path to executable is /usr/local/sbin/haproxy
[ALERT] (7) : config : [/usr/local/etc/haproxy/haproxy.cfg:23] : 'server rabbitmq_back/rabbit1' : could not resolve address 'rabbitmq-main.railway.internal'.
[ALERT] (7) : config : Failed to initialize server(s) addr.
[NOTICE] (7) : haproxy version is 2.7.12-5e21fc9
[NOTICE] (7) : path to executable is /usr/local/sbin/haproxy
[ALERT] (7) : config : [/usr/local/etc/haproxy/haproxy.cfg:23] : 'server rabbitmq_back/rabbit1' : could not resolve address 'rabbitmq-main.railway.internal'.
[ALERT] (7) : config : Failed to initialize server(s) addr.
[NOTICE] (7) : haproxy version is 2.7.12-5e21fc9
[NOTICE] (7) : path to executable is /usr/local/sbin/haproxy
[ALERT] (7) : config : [/usr/local/etc/haproxy/haproxy.cfg:23] : 'server rabbitmq_back/rabbit1' : could not resolve address 'rabbitmq-main.railway.internal'.
[ALERT] (7) : config : Failed to initialize server(s) addr.
[NOTICE] (7) : haproxy version is 2.7.12-5e21fc9
[NOTICE] (7) : path to executable is /usr/local/sbin/haproxy
[ALERT] (7) : config : [/usr/local/etc/haproxy/haproxy.cfg:23] : 'server rabbitmq_back/rabbit1' : could not resolve address 'rabbitmq-main.railway.internal'.
[ALERT] (7) : config : Failed to initialize server(s) addr.
[NOTICE] (7) : haproxy version is 2.7.12-5e21fc9
[NOTICE] (7) : path to executable is /usr/local/sbin/haproxy
[ALERT] (7) : config : [/usr/local/etc/haproxy/haproxy.cfg:23] : 'server rabbitmq_back/rabbit1' : could not resolve address 'rabbitmq-main.railway.internal'.
[ALERT] (7) : config : Failed to initialize server(s) addr.
[NOTICE] (7) : haproxy version is 2.7.12-5e21fc9
[NOTICE] (7) : path to executable is /usr/local/sbin/haproxy
[ALERT] (7) : config : [/usr/local/etc/haproxy/haproxy.cfg:23] : 'server rabbitmq_back/rabbit1' : could not resolve address 'rabbitmq-main.railway.internal'.
[ALERT] (7) : config : Failed to initialize server(s) addr.
not sure what i'm missing here? is it somethign to do with how HA resolves the names ?
Solution:
switch to v2
Jump to solution
18 Replies
Percy
Percy•3d ago
Project ID: 148eb60b-cb64-411a-8789-fbfd534512b7
Jaymart
Jaymart•3d ago
148eb60b-cb64-411a-8789-fbfd534512b7
Brody
Brody•3d ago
are you trying to expose the metrics endpoint for rabbitmq?
Jaymart
Jaymart•3d ago
no im tryna use this as a load balancer for 2 different rabbitMQ instances
Brody
Brody•3d ago
HAProxy supports layer 4 load balancing?
Jaymart
Jaymart•3d ago
yes
Jaymart
Jaymart•3d ago
HAProxy Technologies
Layer 4 vs Layer 7 Proxy Mode (Understanding the Difference)
With HAProxy you can switch between proxying traffic at layer 4 (TCP) or layer 7 (HTTP). This blog post describes the features available to you in each mode.
Brody
Brody•3d ago
oh cool are the two rabbitmq services in the same project?
Jaymart
Jaymart•3d ago
yes
Brody
Brody•3d ago
are those logs from the deploy logs?
Jaymart
Jaymart•3d ago
yeeea for HAProxy
Brody
Brody•3d ago
is the haproxy service on the v2 runtime?
Jaymart
Jaymart•3d ago
no legacy
Solution
Brody
Brody•3d ago
switch to v2
Jaymart
Jaymart•3d ago
try v2? brother they need to put you on payroll lmaooo thank you so much.
Brody
Brody•3d ago
haha i know this because i read the changelogs 😉
Jaymart
Jaymart•3d ago
true true. thanks a bunch
Brody
Brody•3d ago
no problem!