Lab 16.2 Cannot make Lode Balancer work
On step 3, when I restart and check the status of HAProxy Load Balancer, it returns status as "Failed"
What am I doing wrong? Thank you!
Here are the command and the output:
student@ha-proxy:~$ sudo systemctl status haproxy.service
● haproxy.service - HAProxy Load Balancer
Loaded: loaded (/lib/systemd/system/haproxy.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since Mon 2021-04-05 08:01:41 UTC; 10min ago
Docs: man:haproxy(1)
file:/usr/share/doc/haproxy/configuration.txt.gz
Process: 21065 ExecStart=/usr/sbin/haproxy-systemd-wrapper -f ${CONFIG} -p /run/haproxy.pid $EXTRAOPTS (code=exited, status=0/SUCCESS)
Process: 21055 ExecStartPre=/usr/sbin/haproxy -f ${CONFIG} -c -q (code=exited, status=0/SUCCESS)
Main PID: 21065 (code=exited, status=0/SUCCESS)
Apr 05 08:01:41 ha-proxy haproxy-systemd-wrapper[21065]: haproxy-systemd-wrapper: exit, haproxy RC=256
Apr 05 08:01:41 ha-proxy systemd[1]: haproxy.service: Service hold-off time over, scheduling restart.
Apr 05 08:01:41 ha-proxy systemd[1]: Stopped HAProxy Load Balancer.
Apr 05 08:01:41 ha-proxy systemd[1]: haproxy.service: Start request repeated too quickly.
Apr 05 08:01:41 ha-proxy systemd[1]: Failed to start HAProxy Load Balancer.
Apr 05 08:01:41 ha-proxy systemd[1]: haproxy.service: Unit entered failed state.
Apr 05 08:01:41 ha-proxy systemd[1]: haproxy.service: Failed with result 'start-limit-hit'.
Here is my haproxy.cfg file:
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
ca-base /etc/ssl/certs
crt-base /etc/ssl/private
ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
ssl-default-bind-options no-sslv3
defaults
log global
mode tcp
option tcplog
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http
frontend proxynode
bind *:80
bind *:6443
stats uri /proxystats
default_backend k8sServers
backend k8sServers
balance roundrobin
server master 10.2.0.14:6443 check
listen stats
bind :9999
mode http
stats enable
stats hide-version
stats uri /stats
Comments
-
Hi @andreizimin,
Without the code formatting tags it is difficult to say if your haproxy.cfg file is correct. Compare the
/etc/haproxy/haproxy.cfgfile from the ha-proxy server with the file with the same name found in the SOLUTIONS tarball, to ensure it is accurate.You may try to uninstall the haproxy, then install it again. Prior to step 2, check the status of the haproxy.service, and confirm it is running. Then proceed with steps 2 and 3 again.
If the
restartcommand does not work, try a servicestopfollowed by a servicestartinstead.Regards,
-Chris0
Categories
- All Categories
- 177 LFX Mentorship
- 177 LFX Mentorship: Linux Kernel
- 750 Linux Foundation IT Professional Programs
- 373 Cloud Engineer IT Professional Program
- 169 Advanced Cloud Engineer IT Professional Program
- 74 DevOps IT Professional Program - Discontinued
- 4 DevOps & GitOps IT Professional Program
- 99 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- 1 AI & ML Training
- 1 Blockchain & Decentralized Identity Training
- 4 Cloud & Containers Training
- 1 Cybersecurity Training
- 2 DevOps & Site-Reliability Training
- 1 Linux Kernel Development Training
- 1 Networking Training
- 2 Open Source Best Practice Training
- 1 System Administration Training
- 1 System Engineering Training
- 1 Web & Application Development Training
- 792 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 87 Storage
- 769 Linux Distributions
- 81 Debian
- 68 Fedora
- 22 Linux Mint
- 13 Mageia
- 24 openSUSE
- 150 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 106 Mobile Computing
- 18 Android
- 73 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 392 Off Topic
- 121 Introductions
- 181 Small Talk
- 29 Study Material
- 955 Programming and Development
- 310 Kernel Development
- 627 Software Development
- 984 Software
- 376 Applications
- 182 Command Line
- 5 Compiling/Installing
- 68 Games
- 317 Installation
- Archived
- 2 LFD140 Class Forum
- 1.4K LFS258 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)