Can't generate a certificate when using acme.sh - OpenSSL error

Veuillez remplir les champs ci-dessous pour que nous puissions vous aider. Remarque : vous devez fournir votre nom de domaine pour obtenir de l’aide. Les noms de domaine des certificats émis sont tous rendus publics dans les journaux de Transparence de Certificat (par exemple, https://crt.sh/?q=example.com). Par conséquent, le fait de ne pas indiquer votre nom de domaine ici n’aide pas à le garder secret, mais rend plus difficile pour nous le fait de vous aider.

Je peux lire des réponses en Anglais : oui

Mon nom de domaine est : savoye.duckdns.org

J’ai exécuté cette commande :
acme.sh --issue -d savoye.duckdns.org --stateless --debug --server letsencrypt_test

Elle a produit cette sortie :
TLSv1.3 (IN), TLS alert, unrecognized name (624):
Info: OpenSSL/3.0.13: error:0A000458:SSL routines::tlsv1 unrecognized name

Mon serveur Web est (inclure la version) :
Haproxy version 2.8.30

Le système d’exploitation sur lequel mon serveur Web s’exécute est (version incluse) :
Linux Mint 22.3 - Cinnamon 64-bit (ubuntu 24.04.1)

Mon hébergeur, le cas échéant, est : At Home

Je peux me connecter à un shell root sur ma machine (oui ou non, ou je ne sais pas) : oui

J’utilise un panneau de configuration pour gérer mon site (non, ou fournit le nom et la version du panneau de configuration) : non

The error is because HAProxy is redirecting the HTTP request from Let's Encrypt to HTTPS. But, HAProxy cannot handle the HTTPS request (yet) and so the cert request fails.

You should review the steps you took to prepare HAProxy to respond to stateless requests. This HAProxy blog may help: Automate HAProxy Let's Encrypt Certificates with acme.sh

Hello MikeMcQ
Thank you for your answer.
I am using the tutorial you are talking about
I have followed it from the beginning.
Everything was fine :

  • Acme client installation (acme.sh from github)

  • Acme account generation from letsencrypt_test server --> ACCOUNT_THUMBPRINT has been copied

  • I have configured HAProxy to respond to HTTP challenges with settings provided in the tutorial
    see below my haproxy.cfg file:

    haproxy.cfg.txt (1.8 KB)
    Some specific lines for HTTPS

global

stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
setenv ACCOUNT_THUMBPRINT 'NWxeJzCNW93KTMaW4sMbB9sL1cZT7sadzzcYF2AMtcM'

frontend navidrome_https
bind *:443 ssl crt /etc/haproxy/certs/ strict-sni
http-request return status 200 content-type text/plain lf-string "%[path,field(-1,/)].${ACCOUNT_THUMBPRINT}\n" if { path_beg '/.well-known/acme-challenge/'

  • I have successfully restarted haproxy
    Obviously, haproxy cannot manage HTTPS because there is no certificate yet
    Remark:
    The 1st time I restarted haproxy, I met an error talking about Low Balancer problem.
    I fixed it by opening the port 80 on my router according to the Let'Encrypt recommendation.

Everything was fine until i try to generate a certificate with acme client from the Let's Encrypt test server
I am meeting this OPEN_SSL error
Fetching https://savoye.duckdns.org/.well-known/acme-challenge/TWOAevQyMg96YUmHsOopu93j0HQEnIaZD8aPRRzRcco: remote error: tls: unrecognized name","status": 400'
[jeu. 29 oct. 2026 12:02:34 CET] errordetail='176.147.60.50: Fetching https://savoye.duckdns.org/.well-known/acme-challenge/TWOAevQyMg96YUmHsOopu93j0HQEnIaZD8aPRRzRcco: remote error: tls: unrecognized name'
[jeu. 29 oct. 2026 12:02:34 CET] savoye.duckdns.org: Invalid status. Verification error details: 176.147.60.50: Fetching https://savoye.duckdns.org/.well-known/acme-challenge/TWOAevQyMg96YUmHsOopu93j0HQEnIaZD8aPRRzRcco: remote error: tls: unrecognized name

TLSv1.3 (IN), TLS alert, unrecognized name (624):
Info: OpenSSL/3.0.13: error:0A000458:SSL routines::tlsv1 unrecognized name
Here is the curl dump log:
[jeu. 29 oct. 2026 12:02:34 CET] == Info: Host savoye.duckdns.org:80 was resolved.
== Info: IPv6: (none)
== Info: IPv4: 176.147.60.50
== Info: Trying 176.147.60.50:80...
== Info: Connected to savoye.duckdns.org (176.147.60.50) port 80
=> Send header, 199 bytes (0xc7)
0000: GET /.well-known/acme-challenge/TWOAevQyMg96YUmHsOopu93j0HQEnIaZ
0040: D8aPRRzRcco HTTP/1.1
0056: Host: savoye.duckdns.org
0070: User-Agent: acme.sh/3.1.7 (https://github.com/acmesh-official/ac
00b0: me.sh)
00b8: Accept: /
00c5:
<= Recv header, 32 bytes (0x20)
0000: HTTP/1.1 301 Moved Permanently
<= Recv header, 19 bytes (0x13)
0000: content-length: 0
<= Recv header, 109 bytes (0x6d)
0000: location: https://savoye.duckdns.org/.well-known/acme-challenge/
0040: TWOAevQyMg96YUmHsOopu93j0HQEnIaZD8aPRRzRcco
<= Recv header, 2 bytes (0x2)
0000:
== Info: Connection #0 to host savoye.duckdns.org left intact
== Info: Issue another request to this URL: 'https://savoye.duckdns.org/.well-known/acme-challenge/TWOAevQyMg96YUmHsOopu93j0HQEnIaZD8aPRRzRcco'
== Info: Host savoye.duckdns.org:443 was resolved.
== Info: IPv6: (none)
== Info: IPv4: 176.147.60.50
== Info: Trying 176.147.60.50:443...
== Info: Connected to savoye.duckdns.org (176.147.60.50) port 443
== Info: ALPN: curl offers h2,http/1.1
=> Send SSL data, 5 bytes (0x5)
0000: .....
== Info: TLSv1.3 (OUT), TLS handshake, Client hello (1):
=> Send SSL data, 512 bytes (0x200)
0000: ........u.K.s]IZ.fRZ.G..B."..z&;.7... ...:..y.....`U.
kQ..&.h*
0040: ..h^....>.......,.0.........+./...$.(.k.#.'.g.....9.....3.....=.
0080: <.5./.....u.........savoye.duckdns.org..........................
00c0: ...............h2.http/1.1.........1.....*.(....................
0100: .....................+........-.....3.&.$... ...G-..........i.$
0140: d..H.N.....w+...................................................
0180: ................................................................
01c0: ................................................................
== Info: CAfile: /etc/ssl/certs/ca-certificates.crt
== Info: CApath: /etc/ssl/certs
<= Recv SSL data, 5 bytes (0x5)
0000: .....
== Info: TLSv1.3 (IN), TLS alert, unrecognized name (624):
<= Recv SSL data, 2 bytes (0x2)
0000: .p
== Info: OpenSSL/3.0.13: error:0A000458:SSL routines::tlsv1 unrecognized name
== Info: Closing connection

I don't know exactly what all that means and what is the reason of the failure
If you have some idea, do not hesitate to answer this post
Regards
Yannick Savoye

Hello MikeMcQ,

I am progressing.
I thought about your remark about HTTP redirection in HAProxy.
I checked the Haproxy.cfg configuration file and I found a line that could cause this redirection.
#Redirection HTTP → HTTPS
frontend navidrome_http
bind *:80
mode http
redirect scheme https code 301 if !{ ssl_fc }

I removed it and it is better ; it is not working yet but there another error message
error='"error":{"type":"urn:ietf:params:acme:error:unauthorized","detail":"176.147.60.50: Invalid response from http://savoye.>
[jeu. 29 oct. 2026 18:43:09 CET] errordetail='176.147.60.50: Invalid response from http://savoye.duckdns.org/.well-known/acme-challenge/UTaWdTLKljjKOlSD4je-1mI>
<ns.org/.well-known/acme-challenge/UTaWdTLKljjKOlSD4je-1mIel1ynvLmmTHofnjTDriQ: 503

Your opinion ?...

Well, HAProxy (or something else) returned an HTTP status 503 to Let's Encrypt. That's a Service Unavailable class error. You'd be better off asking about that on a HAProxy support or community forum.

That happens even for requests to the "home page" using HTTP.

curl -i savoye.duckdns.org 

HTTP/1.0 503 Service Unavailable
cache-control: no-cache
content-type: text/html

<html><body><h1>503 Service Unavailable</h1>
No server is available to handle this request.
</body></html>

Hello MikeMcQ,

Thanx for your answer.
I have fixed the 503 error by asking HAProxy to send the request to my web server (Navidrome audio server).
It's better but I don't succeed to generate the certificate yet :confused:

Here is another error message:

Sorry I pushed too quick on my keyboard
The new error message

[jeu. 29 oct. 2026 19:39:25 CET] error='"error":{"type":"urn:ietf:params:acme:error:unauthorized","detail":"176.147.60.50: Error reading HTTP response body: reader size limit exceeded","status": 403'
[jeu. 29 oct. 2026 19:39:25 CET] errordetail='176.147.60.50: Error reading HTTP response body: reader size limit exceeded'
[jeu. 29 oct. 2026 19:39:25 CET] savoye.duckdns.org: Invalid status. Verification error details: 176.147.60.50: Error reading HTTP response body: reader size limit exceeded

I don't really understand what it means...

When you use an HTTP Challenge (like you are) the Let's Encrypt servers send you an HTTP request to retrieve the challenge token. This is to prove you control that domain. The above is an unusual error but it happens when your server sends a very large message to the LE Server instead of the fairly small token value.

When I send a test HTTP challenge request your system redirects it to "/app/" and following that redirect I see a page about a Music Server.

Having HAProxy forward the request to your other server probably won't work unless you can configure it to response properly for "stateless" operation like you are telling acme.sh to use. And, we know you didn't do it right because of this error :slight_smile:

I really think you are better off at a HAProxy forum. I am sure someone there can help you setup HAProxy properly to get a cert.

Trying to just add extra layers of things will only make your system more fragile even if you get it working somehow. You want a standard and reliable way to do these kinds of common tasks.

Hello MikeMcQ
Many thanks for your answers
I will try to ask the question at the HAProxy forum.
See you
Best Regards
Yannick