Problem with Renewing and Creating certificate - AWS s3 redirect issues

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: nooqgolf.com

I ran this command: sudo /opt/bitnami/letsencrypt/lego --tls --email="graeme@nooqgolf.com" --domains="nooqgolf.com" --domains="www.nooqgolf.com" --domains="nooq.solutions" --domains="www.nooq.solutions" --domains="golf.nooq.solutions" --path="/opt/bitnami/letsencrypt" run

It produced this output:
2022/06/23 10:47:57 Could not obtain certificates:
error: one or more domains had a problem:
[nooqgolf.com] acme: error: 400 :: urn:ietf:params:acme:error:connection :: 52.95.149.168: Timeout during connect (likely firewall problem)

I have AWS s3 for re-directing the root domain nooqgolf.com to www.nooqgolf.com but it is causing issues trying to renew. I have tried disabling the s3 bucket re-direct but still getting timeouts trying to renew or create new cert.

My web server is (include version): Apache/2.4.51 (Unix)

The operating system my web server runs on is (include version): Debian GNU/Linux 10 (buster).

My hosting provider, if applicable, is: AWS EC2

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): lego 4.7.0

Try again. I think the timeout is just a temporary blip.

2 Likes

Thanks for quick response. Been trying since yesterday, still same issue. No matter if I disable re-direct from s3 or whether it is enabled. Always getting timeouts

1 Like

Ah. You are using --tls. This won't work with S3. You need to use --http.

1 Like

how do I do that ? is that option I can change when running lego? or do i need to disable s3 ? sorry.

Sorry ignore me. Just noticed how to resolve that part..

Next error is now

[nooqgolf.com] acme: error: 403 :: urn:ietf:params:acme:error:unauthorized :: 52.95.150.91: Invalid response from http://nooqgolf.com/.well-known/acme-challenge/Nzs7F2vYt7fyV2tN-9tha3toBEzEk32A5EG8x0UtVas: 403

It's in the command you are using:

--tls is telling Lego to use the TLS-ALPN-01 challenge, which a special protocol negotiated for Let's Encrypt validation purposes.

The problem is that S3 doesn't support this challenge type and the S3→EC2 redirect doesn't work for this challenge type because it's not based on HTTP.

What you will have to use is the HTTP-01 challenge, which you can do by replacing --tls with --http. What --http does is ask Lego to run a local webserver, which should be enough to make things work. You will need to re-enable your S3 redirect first.

2 Likes

If you look at the link:

  • Code: AccessDenied
  • Message: Requester Pays Enabled.

So there's two things you need to do:

and

exclude the /.well-known/acme-challenge/ request path from the "Requester Pays" policy.

3 Likes

Thanks so much for help. You definitely sparked me down the route for solving this.

Managed to remove the s3 routing.
Changed wordpress from www.example.com to example.com
Changed the TLS ssl checking and used DNS checking instead.
Renewal worked !

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.