Install and Configure HaProxy LBR

changed haproxy.cfg with correct value
but when i do curl to stapp01/stapp02/stapp03 it is not succeeding, pls check screen shots and let me where iam doing wrong.

@Inderpreet @devops503

Hello, Sasi
You have to write app server and their respective ip addr and ports in backend app section not in backend static. You can read description of backend static.

Thank you!! this task got completed, my task is only to bring Haproxy service up and running, after correcting haproxy.cfg file.

Hi @urbansumo ,
You can also check my configuration, i configured port 6300 for my applications and the curl test was pass, I even configured haproxy to port 80

Capture d’écran du 2020-07-26 16-30-42

@Inderpreet help please

@sidoinekra Sorry for delayed response, this is marked Success for you.

image
image
image
@Tej-Singh-Rana @Inderpreet @kodekloud-support3

Hi guys, can someone please advise why i failed the task when I can curl to those IP with the correct port

my changes are
vi /etc/haproxy/haproxy.cfg

frontend main *:80

server stapp01|172.16.238.10:6000 check
server stapp02|172.16.238.11:6000 check
server stapp01|172.16.238.12:6000 check

@Inderpreet help please

Hello, ali.za.ac
It will take time. Be patience. They will check. I would like to know that why you add “pipe” between server name and ip addr.

@Tej-Singh-Rana not sure why the “pipe” is there but in the actual config, I don’t have the pipe. Also thanks, I know the KodeKloud staff can be busy and all… but I want this corrected already :stuck_out_tongue:

@Inderpreet please advise !!

@Inderpreet @mmumshad Hi, Installing and Configure HaProxy LBR - I first checked which ports are app servers running on. I saw it was 8083 and changed to default 80 which is required in task. For the rest I installed and configured haproxy by adding app servers. AT the end I checked with curl and the way it recommend at the end of task result was successful. When I finished and submitted result was failed. It says - apache is not running on port ‘8083’ on App Server 1. 8083 is not default port and task requires haproxy should run on default port. Could you please clarify?

Hello, @oqtay.tasinov
I think you don’t need to change the configured port which was 8083. You only need to configure HaProxy to work on default http port(80).

1 Like

Please check this one, whats wrong?