Failed Install and Configure HaProxy LBR

Hi Team,
Assignment was to configure HA proxy on the LBR server with all the appservers. Please see below configuration. however, I was failed. Please help check for me


Screenshot 2023-07-25 at 5.45.06 PM
Screenshot 2023-07-25 at 5.45.20 PM
Screenshot 2023-07-25 at 5.45.37 PM
Screenshot 2023-07-25 at 5.46.07 PM

On your screenshots only httpd configs. But you must install and configure HAproxy.
Did you install it?
yum install -y haproxy
And configure haproxy.
For example How To Install HaProxy On CentOS 7 - LookLinux (first found manual for configure, you can take olny parts you need).

1 Like

Yes I installed, but still I’m getting failed

You must install it on 172.16.238.14 (Nautilus HTTP LBR).
Config will be something like this (only examle, correct it for your case):

frontend balance_http
    bind 172.16.238.14:80
    default_backend webserver
backend webserver
    balance     roundrobin
    server  stapp01 172.16.238.10:80
    server  stapp02 172.16.238.11:80
    server  stapp03 172.16.238.12:80

Enable service (sudo systemctl enable haproxy --now)

this may be help you to solve self learning Haproxy LBR Troubleshooting Linux Server KodeKloud Engineer Task

again facing the same error
it saying

  • apache is not running on port ‘3000’ on stapp01
    ERROR test_haproxy.py - AssertionError: - apache is not running on port '3000…

here is the screenshot of haproxy
Screenshot 2023-07-25 at 8.54.41 PM

Well, lets try some checks:
Is apache service running on every app server? (if no: sudo systemctl enable httpd --now)
Is apache listening on 3000 port? (if no: check httpd config)
Can you do successful ‘curl 172.16.238.10:3000’ (and other app servers) from LBR server? (if no: check firewall on app servers)
Your config seems ok for this case (but I can only see screenshot, not whole server configs).
Do not forget to restart HAproxy service after update it conf.

After followed all the steps again got the same error, please let me know where is the mistake

  • apache is not running on port ‘3000’ on stapp01
    ERROR test_haproxy.py - AssertionError: - apache is not running on port '3000…

Now I try to do this task myself. Got same error about running apache on port (6000 in my case).
But all checks was successful, access from browser (after haproxy config was done) was ok.
So, it seems error in task check mechanism.
@Tej-Singh-Rana, can you check this task?
In addition: after KKE upgrade, I cannot run vi or vim(after installation) in terminal at all. Only blank screen.
So you can edit config files via mcedit for example or pure sed, but it uncomfortable.


Hi @bhard,
Can you please share the steps you perform in the lab so I can try from my end? Please DM me all the steps/commands.

Regards,

Hi @bhard,

Please try again. The team has resolved the issue.

FYI, I reviewed your shared steps and those steps are correct.

Regards,

1 Like