Need help with tailscale and Certbot standalone for new cert

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:www.hornet.technology

I ran this command:"sudo certbot delete --cert-name your_certificate_name"
then , "sudo certbot certonly --standalone --preferred-challenges http -d www.hornet.technology"

It produced this output: "Detail: : Fetching http://www.hornet.technology/.well-known/acme-challenge/DCL95cQcf9xb5lSNnRMIigPUZq2ich8xhMsaiLFJdNQ: Timeout during connect (likely firewall problem)

Hint: The Certificate Authority failed to download the challenge files from the temporary standalone webserver started by Certbot on port 80. Ensure that the listed domains point to this machine and that it can accept inbound connections from the internet.

Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details."

My web server is (include version):go 1.20.8

The operating system my web server runs on is (include version):ubuntu 22.04

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know):yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):certbot 2.6.0

Hi @mrdp, and welcome to the LE community forum :slight_smile:

Using --standalone is difficult to troubleshoot.
You must ensure that HTTP can reach you system.

Also, why did you first delete your certificate?

2 Likes

First, you should not delete any active cert before requesting another one.

To debug the comms problem, do this

sudo certbot certonly --standalone --debug-challenges --preferred-challenges http -d www.hornet.technology

That will pause and show you a URL

Try accessing that URL from outside your local network. Even use a mobile phone with wifi off to use the carrier's network.

Or, while still paused post the URL here and we can check it

3 Likes

It seems the cert was recently expired :frowning:
But I agree with you, deleting a cert doesn't fix anything [and usually makes matters worse].

1 Like

Yeah, to add background for benefit of other readers ...

There may be a service referring to those cert files which now don't exist. The service may now fail outright with missing files rather than just send an expired cert. Cert requests can fail for various reasons. It is even possible for Let's Encrypt to have a temporary outage.

3 Likes

i did not delete an active certificate it was expired and and i tried to renew the certificate but could't . so i deleted the old certificate .

" sudo certbot certonly --standalone --debug-challenges --preferred-challenges http -d www.hornet.technology
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for www.hornet.technology


Challenges loaded. Press continue to submit to CA.
Pass "-v" for more info about challenges.


Press Enter to Continue

Certbot failed to authenticate some domains (authenticator: standalone). The Certificate Authority reported these problems:
Domain: www.hornet.technology
Type: connection
Detail: 157.245.22.254: Fetching http://www.hornet.technology/.well-known/acme-challenge/FwQGRmmv63HKygQ3xtVPix38_cv_hCQ-QI8t1uqwPv0: Timeout during connect (likely firewall problem)

Hint: The Certificate Authority failed to download the challenge files from the temporary standalone webserver started by Certbot on port 80. Ensure that the listed domains point to this machine and that it can accept inbound connections from the internet.

Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details. " got the same error again

We mean "active" in different ways. While expired if your web service still referred to those file locations it is still active. A client will see an expired cert but will still be able to make a TLS connection (usually HTTPS).

Sorry, I forgot to include the `-v' so please try below. But, when it says "Press continue to submit to CA." DO NOT press Enter to continue. Leave it paused and let us know the URL shown or try the URL from outside your network.

sudo certbot certonly --standalone -v --debug-challenges --preferred-challenges http -d www.hornet.technology
3 Likes

Expiration doesn't deactivate a cert.
It merely makes it "unsafe to use" - but it can still be used.
When you delete it, it can no longer be used; And that can create unintended problems [elsewhere].

2 Likes

± sudo certbot certonly --standalone -v --debug-challenges --preferred-challenges http -d www.hornet.technology
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Requesting a certificate for www.hornet.technology
Performing the following challenges:
http-01 challenge for www.hornet.technology


Challenges loaded. Press continue to submit to CA.

The following URLs should be accessible from the internet and return the value
mentioned:

URL:
http://www.hornet.technology/.well-known/acme-challenge/y1PTWNViPqMriwcYvoyZmFwCDyQJRCDh6p9MSNux6aI
Expected value:
y1PTWNViPqMriwcYvoyZmFwCDyQJRCDh6p9MSNux6aI.Sc556KrbF2uAr8nBh3mzdbiHoWqg1aOoYmXGXmf7TuY


Press Enter to Continue

2 Likes

Good. With that left paused you can now try to reach that URL from outside your own network. I just tried it and timed out just like the Let's Encrypt error in your first post. So, we can reproduce the error.

So, it looks like a firewall may be blocking port 80. Or, your routing for that is not right.

Leave it paused like that while you try changes to your system to open that connection.

Just do a curl like below or even just paste the URL in a browser window. Just be sure to work from outside your own local network

curl -i -m10 http://www.hornet.technology/.well-known/acme-challenge/y1PTWNViPqMriwcYvoyZmFwCDyQJRCDh6p9MSNux6aI

Keep making changes until you don't get one of these :)
curl: (28) Connection timed out after 10000 milliseconds

If you have to restart Certbot it will give you a different URL so of course use the one it shows instead of the above

3 Likes

I get nothing:

curl http://www.hornet.technology/.well-known/acme-challenge/y1PTWNViPqMriwcYvoyZmFwCDyQJRCDh6p9MSNux6aI
curl: (56) Recv failure: Connection reset by peer
1 Like

○ curl -i -m10 http://www.hornet.technology/.well-known/acme-challenge/y1PTWNViPqMriwcYvoyZmFwCDyQJRCDh6p9MSNux6aI
HTTP/1.0 200 OK
Server: BaseHTTP/0.6 Python/3.8.10
Date: Tue, 03 Oct 2023 15:54:01 GMT

y1PTWNViPqMriwcYvoyZmFwCDyQJRCDh6p9MSNux6aI.Sc556KrbF2uAr8nBh3mzdbiHoWqg1aOoYmXGXmf7TuY%

From where?
Where from?

2 Likes

after running that on my server

Your server is not a good testing location.
You need to access it from the Internet.
[that is where the problem lies]

2 Likes

okay i'll try it from my local device

1 Like

What shows?
ufw status

[or whatever command for the FW that is in use]

2 Likes

curl http://www.hornet.technology/.well-known/acme-challenge/y1PTWNViPqMriwcYvoyZmFwCDyQJRCDh6p9MSNux6aI
curl: (28) Failed to connect to www.hornet.technology port 80 after 129683 ms: Connection timed out

1 Like

inactive