# /usr/local/etc/rc.d/haproxy: WARNING: failed to start haproxy

**URL:** <https://discourse.haproxy.org/t/usr-local-etc-rc-d-haproxy-warning-failed-to-start-haproxy/9830>\
**Category:** Help!\
**Created:** [May 14, 2024, 4:52pm UTC](https://discourse.haproxy.org/t/usr-local-etc-rc-d-haproxy-warning-failed-to-start-haproxy/9830 "2024-05-14T16:52:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/alexus/32/980_2.png) [@alexus](https://discourse.haproxy.org/u/alexus)\
**Post date:** [May 14, 2024, 4:52pm UTC](https://discourse.haproxy.org/t/usr-local-etc-rc-d-haproxy-warning-failed-to-start-haproxy/9830/1 "2024-05-14T16:52:19Z")

</div>

Hello world!

I’m trying to start _haproxy_, however unable to do so:

```auto
# haproxy -v
HAProxy version 2.9.6-9eafce5 2024/02/26 - https://haproxy.org/
Status: stable branch - will stop receiving fixes around Q1 2025.
Known bugs: http://www.haproxy.org/bugs/bugs-2.9.6.html
Running on: FreeBSD 14.0-RELEASE-p6 FreeBSD 14.0-RELEASE-p6 #0: Tue Mar 26 20:26:20 UTC 2024 root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
# service haproxy start
Starting haproxy.

```

I don’t see any messages in `/var/log/messages`, and meanwhile service is _still_ trying to start…

`haproxy.conf`, :

```auto
# cat /usr/local/etc/haproxy.conf
# generated 2024-05-12, Mozilla Guideline v5.7, HAProxy 2.9.6, OpenSSL 3.0.12, modern configuration
# https://ssl-config.mozilla.org/#server=haproxy&version=2.9.6&config=modern&openssl=3.0.12&guideline=5.7
global
    # modern configuration
    ssl-default-bind-ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256
    ssl-default-bind-options prefer-client-ciphers no-sslv3 no-tlsv10 no-tlsv11 no-tlsv12 no-tls-tickets

    ssl-default-server-ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256
    ssl-default-server-options no-sslv3 no-tlsv10 no-tlsv11 no-tlsv12 no-tls-tickets

defaults
    log global
    mode http
    option httplog
    timeout connect 10s
    timeout client 30s
    timeout server 30s

frontend ft_66
    mode http
    bind :443 ssl crt /usr/local/etc/...pem alpn h2,http/1.1
# bind :80
    redirect scheme https code 301 if !{ ssl_fc }
	default_backend be_66

    # HSTS (63072000 seconds)
    http-response set-header Strict-Transport-Security max-age=63072000

backend be_66
	mode	http
	server	apache24	localhost:80	check

# 

```

Please advise)  
Thanks in advance!

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [May 14, 2024, 7:06pm UTC](https://discourse.haproxy.org/t/usr-local-etc-rc-d-haproxy-warning-failed-to-start-haproxy/9830/2 "2024-05-14T19:06:13Z")

</div>

Stop haproxy, make sure there are no haproxy processes left otherwise kill them.

Then start haproxy manually in foreground mode:

```
haproxy -f /usr/local/etc/haproxy.conf -db

```

or in debug mode (still foreground):

```
haproxy -f /usr/local/etc/haproxy.conf -d

```

I don’t know anything about the init.d system in FreeBSD, so that’s my only advise to find out if there is any issue with starting haproxy itself.

---

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/alexus/32/980_2.png) [@alexus](https://discourse.haproxy.org/u/alexus)\
**Post date:** [May 14, 2024, 7:49pm UTC](https://discourse.haproxy.org/t/usr-local-etc-rc-d-haproxy-warning-failed-to-start-haproxy/9830/3 "2024-05-14T19:49:56Z")

</div>

yeah, that’s exactly what I end up doing it…

```auto
# grep ^haproxy /etc/rc.conf
haproxy_enable="YES"
haproxy_flags="-D -q -f /usr/local/etc/haproxy.conf -p /var/run/haproxy.pid"
# service haproxy start
Starting haproxy.
# service haproxy status
haproxy is running as pid 34116.
#

```

looks like a bug 🤪

thanks!
