# Failed to start HAProxy Load Balancer .Failed with result 'exit-code'

**URL:** <https://discourse.haproxy.org/t/failed-to-start-haproxy-load-balancer-failed-with-result-exit-code/7625>\
**Category:** Help!\
**Created:** [April 30, 2022, 9:09pm UTC](https://discourse.haproxy.org/t/failed-to-start-haproxy-load-balancer-failed-with-result-exit-code/7625 "2022-04-30T21:09:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrcesar](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@mrcesar](https://discourse.haproxy.org/u/mrcesar)\
**Post date:** [April 30, 2022, 9:09pm UTC](https://discourse.haproxy.org/t/failed-to-start-haproxy-load-balancer-failed-with-result-exit-code/7625/1 "2022-04-30T21:09:08Z")

</div>

I am mounting an ssl certificate in load balancer, install haproxy and when starting it I get this error:  
haproxy.service - HAProxy Load Balancer  
Loaded: loaded (/lib/systemd/system/haproxy.service; enabled; vendor preset: enabled)  
Active: failed (Result: exit-code) since Sat 2022-04-30 21:03:57 UTC; 7s ago  
Docs: man:haproxy(1)  
file:/usr/share/doc/haproxy/configuration.txt.gz  
Process: 131066 ExecStartPre=/usr/sbin/haproxy -f $CONFIG -c -q $EXTRAOPTS (code=exited, status=1/FAIL\>

Apr 30 21:03:57 3774-lb-01 systemd[1]: haproxy.service: Control process exited, code=exited, status=1/FAIL\>  
Apr 30 21:03:57 3774-lb-01 systemd[1]: haproxy.service: Failed with result ‘exit-code’.  
Apr 30 21:03:57 3774-lb-01 systemd[1]: Failed to start HAProxy Load Balancer.  
Apr 30 21:03:57 3774-lb-01 systemd[1]: haproxy.service: Scheduled restart job, restart counter is at 5.  
Apr 30 21:03:57 3774-lb-01 systemd[1]: Stopped HAProxy Load Balancer.  
Apr 30 21:03:57 3774-lb-01 systemd[1]: haproxy.service: Start request repeated too quickly.  
Apr 30 21:03:57 3774-lb-01 systemd[1]: haproxy.service: Failed with result ‘exit-code’.  
Apr 30 21:03:57 3774-lb-01 systemd[1]: Failed to start HAProxy Load Balancer.

```auto
Este es mi archivo haproxy.cfg

# global
        log /dev/log local0
        log /dev/log local1 notice
        chroot /var/lib/haproxy
        stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
        stats timeout 30s
        user haproxy
        group haproxy
        daemon

        # Default SSL material locations
        ca-base /etc/ssl/certs
        crt-base /etc/ssl/private

        # See: https://ssl-config.mozilla.org/#server=haproxy&server-version=2.0.3&config=intermediate
        ssl-default-bind-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECD>
        ssl-default-bind-ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256
        ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets

# defaults
        log global
        mode http
        option httplog
        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 http
        bind *:80
        mode http
        bind *:443 ssl crt /etc/letsencrypt/live/www.thecesar.tech/fullchain.pem
        http-request redirect scheme https unless { ssl_fc }
        default_backend web-server
# backend web-server
        balance roundrobin
        server 3774-web-01 34.75.79.52:80 check
        server 3774-web-02 54.85.108.121:80 check

```

---

<div class="post-metadata">

**Author:** ![rhada](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/rhada/32/585_2.png) [@rhada](https://discourse.haproxy.org/u/rhada)\
**Post date:** [May 2, 2022, 3:20pm UTC](https://discourse.haproxy.org/t/failed-to-start-haproxy-load-balancer-failed-with-result-exit-code/7625/2 "2022-05-02T15:20:26Z")

</div>

If the file you paste is exactly the one use to satrt the server it seems normal not to start.

The lines global, default, frontend and backend are commented so the it can’t pass the config check.

Otherwise, If you have your config file , you can try a manual config check. It can give a hint about the issue :

`haproxy -c -f <haproxy config file>`
