Install and Configure HaProxy LBR

I have a problem with my pending task.
It’s “Install and configure HaProxy” whereas I have already completed the task
Thanks

Please check if this task was assigned to you again, sometimes you can have repeated tasks assigned.

I did it and pass, only thing to change was Haproxy default port to 80

Install and COnfigure HAproxy LBR

I Have completed this task, but then expired while submitting it. Can you please help to check and update my dashboard accordingly.

You gotta figure out what port is your backend app listening at
netstat -anp | grep httpd
you can test
curl -iv 172.16.238.10:XXXX

Hi - I had the same issue. Testing worked fine. Failed the task.
App servers listen on port 6000, and HaProxy on port 80. It’s unclear what I did wrong. My final result was haproxy is not able to connect to App Server 3 on port 6000 for all app servers? Did I perhaps do something wrong in the backend check?

1 Like

Hi

I failed this task, although everything is running ok, error which I get is - - ‘haproxy’ is not able to connect to App Server 1 on port ‘6400’ -, but how you can see in prtsc3 my config in haproxy is correct and curl from stlb01 to stapp01 on port 6400 i retrun output, i check configuration many time on stlb01 and stapp01, but I dont find mistakes, so why this task is failed ?

please check and correct this.

Best Regards
Antonio

1 Like

Hi @antoniopp This is marked Success for you, sorry for inconvenience.

1 Like

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