Welcome to the Linux Foundation Forum!

Lab 16.2 getting error when deploying HAProxy

vvandana
vvandana Posts: 9
edited July 2021 in LFS258 Class Forum

I am getting an error in Lab 16.2 as follows. I did a diff of the file from SOLUTIONS tarball and see it is correct.

student@master:~$ sudo systemctl restart haproxy.service
Job for haproxy.service failed because the control process exited with error code.
See "systemctl status haproxy.service" and "journalctl -xe" for details.

Help!

Comments

  • vvandana
    vvandana Posts: 9

    student@master:~$ systemctl status haproxy.service
    ● haproxy.service - HAProxy Load Balancer
    Loaded: loaded (/lib/systemd/system/haproxy.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Mon 2021-07-05 20:36:29 UTC; 17min ago
    Docs: man:haproxy(1)
    file:/usr/share/doc/haproxy/configuration.txt.gz
    Process: 5638 ExecStart=/usr/sbin/haproxy -Ws -f $CONFIG -p $PIDFILE $EXTRAOPTS (code=exited, status=1/FAILURE)
    Process: 5629 ExecStartPre=/usr/sbin/haproxy -f $CONFIG -c -q $EXTRAOPTS (code=exited, status=0/SUCCESS)
    Main PID: 5638 (code=exited, status=1/FAILURE)

    Jul 05 20:36:29 master systemd[1]: haproxy.service: Main process exited, code=exited, status=1/FAILURE
    Jul 05 20:36:29 master systemd[1]: haproxy.service: Failed with result 'exit-code'.
    Jul 05 20:36:29 master systemd[1]: Failed to start HAProxy Load Balancer.
    Jul 05 20:36:29 master systemd[1]: haproxy.service: Service hold-off time over, scheduling restart.
    Jul 05 20:36:29 master systemd[1]: haproxy.service: Scheduled restart job, restart counter is at 5.
    Jul 05 20:36:29 master systemd[1]: Stopped HAProxy Load Balancer.
    Jul 05 20:36:29 master systemd[1]: haproxy.service: Start request repeated too quickly.
    Jul 05 20:36:29 master systemd[1]: haproxy.service: Failed with result 'exit-code'.
    Jul 05 20:36:29 master systemd[1]: Failed to start HAProxy Load Balancer.

  • chrispokorni
    chrispokorni Posts: 2,349

    Hi @vvandana,

    I would recommend revisiting the haproxy.cfg file (even if diff shows no differences). What typically works in this case is to backup the original haproxy.cfg file on the ha-proxy node, then create a new haproxy.cfg file and copy/paste the content from the file with the same name from SOLUTIONS. Or, just scp it over from the control plane node to the ha-proxy node. Spacing and indentation are causing most issues with this exercise.

    Also, make sure you have updated the first server line of the backend k8sServers section towards the bottom of the file, by replacing "cp1" with your control plane node's hostname followed by your control plane node's private IP address (in a later step the second "cp2" and third "cp3" control plane nodes details will be updated as well).

    Regards,
    -Chris

  • vvandana
    vvandana Posts: 9

    @chrispokorni thanks that worked.

Categories

Upcoming Training