Answer for KodeKloud Question - Haproxy LBR Troubleshooting

 xFusionCorp Industries has an application running on Nautlitus infrastructure in Stratos Datacenter. The monitoring tool recognised that there is an issue with the haproxy service on LBR server. That needs to fixed to make the application work properly.

Troubleshoot and fix the issue, and make sure haproxy service is running on Nautilus LBR server.

Answer:

# ssh to LBR server

    ssh <user>@<server>

#switch to root user

    sudo su 

# verify the status of haproxy service

    systemctl status haproxy

# let try to validate the haproxy config file using the below command 

     haproxy -c -f /etc/haproxy/haproxy.cfg

# if there are any errors in the file, it will give the error as "configuration file is invalid"

# correct the errors in the haproxy.cfg file 

    vi /etc/haproxy/haproxy.cfg

Correct the typo error in the file 
( such as "timeout checking 10s" should be corrected to "timeout check 10s" 
 check the other parameters typo errors too and correct it )

# now try to start the service

    systemctl start haproxy

# now check the status again

    systemctl status haproxy

Note: Commands are correct but based on your question the server and user name, other details might differ so please do check.

No comments:

Post a Comment

Featured Post

Answer for Kodekloud DEVOPS Questions - Init container in Kubernetes

Question: 1. Create a Deployment named as ic-deploy-devops. 2. Configure spec as replicas should be 1 , labels app should be ic-devops , ...