K
K
KIRNESS2021-03-10 10:41:14
HAproxy
KIRNESS, 2021-03-10 10:41:14

What to do if Haproxy immediately crashes on VirtualBox?

Please help, I'm working on a project and need a balancer.
I created 2 virtualbox machines, installed Ubuntu 18 on them and installed Apache.
I put Haproxy on one of the machines, the machines between them ping themselves and have different ips.
I wrote some simple HTML with text to distinguish which machine is running.
On the first car I go in /etc/haproxy/haproxy.confand put

frontend my_http_front
bind *:80
default_backend my httpd_back

backend my_httpd_back
balance roundrobin
server myserver1  192.168.56.101:80
server myserver2  192.168.56.102:80

as a result, I restart haproxy and it immediately crashes - it just turns off.
What to do in this case, help to understand the problem.

screenshot of how he fell.
604877a6a0cd4763700274.png

и вот скрин с journalctl -xe
6048780fc045d646063576.png

HELP PLEASE! ASK

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
Hanneman, 2021-03-10
@Hanneman

"What to do in such a case?" - view logs. There is no Vanga here, who will remotely understand what configuration you have there.
To analyze the cause of the error - you can see that it says "Can not open configuration file / direc ....." (further cut off) immediately after recording and starting HAProxy.
That's right, it's written exactly like this:
60487dc138af5192777595.png
PS "put Ubuntu 18 on them" - installing an OS with a graphical interface for such purposes is evil.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question