Unable to renew my certificate getting an error

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. https://crt.sh/?q=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.sirfsarkarinaukri.in

I ran this command: sudo certbot renew

It produced this output:

Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/sirfsarkarinaukri.in.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert is due for renewal, auto-renewing...
Plugins selected: Authenticator nginx, Installer nginx
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for sirfsarkarinaukri.in
http-01 challenge for www.sirfsarkarinaukri.in
Waiting for verification...
Cleaning up challenges
Attempting to renew cert (sirfsarkarinaukri.in) from /etc/letsencrypt/renewal/sirfsarkarinaukri.in.conf produced an unexpected error: Failed authorization procedure. sirfsarkarinaukri.in (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://sirfsarkarinaukri.in/.well-known/acme-challenge/lMGaPYqeBWxEH-JtQUjU5rUHqhGedcUGCDG80dH1Bog: Server is speaking HTTP/2 over HTTP, www.sirfsarkarinaukri.in (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://www.sirfsarkarinaukri.in/.well-known/acme-challenge/2-61WuRVVeEQPk_7gPpUzgEM1PeYrApaFJUdlWHi08Y: Server is speaking HTTP/2 over HTTP. Skipping.
All renewal attempts failed. The following certs could not be renewed:
  /etc/letsencrypt/live/sirfsarkarinaukri.in/fullchain.pem (failure)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

All renewal attempts failed. The following certs could not be renewed:
  /etc/letsencrypt/live/sirfsarkarinaukri.in/fullchain.pem (failure)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 renew failure(s), 0 parse failure(s)

IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: sirfsarkarinaukri.in
   Type:   connection
   Detail: Fetching
   http://sirfsarkarinaukri.in/.well-known/acme-challenge/lMGaPYqeBWxEH-JtQUjU5rUHqhGedcUGCDG80dH1Bog:
   Server is speaking HTTP/2 over HTTP

   Domain: www.sirfsarkarinaukri.in
   Type:   connection
   Detail: Fetching
   http://www.sirfsarkarinaukri.in/.well-known/acme-challenge/2-61WuRVVeEQPk_7gPpUzgEM1PeYrApaFJUdlWHi08Y:
   Server is speaking HTTP/2 over HTTP

   To fix these errors, please make sure that your domain name was
   entered correctly and the DNS A/AAAA record(s) for that domain
   contain(s) the right IP address. Additionally, please check that
   your computer has a publicly routable IP address and that no
   firewalls are preventing the server from communicating with the
   client. If you're using the webroot plugin, you should also verify
   that you are serving files from the webroot path you provided.

My web server is (include version): nginx version: nginx/1.14.0 (Ubuntu)

The operating system my web server runs on is (include version): Ubuntu 18.04.4 LTS

My hosting provider, if applicable, is: Digital Ocean

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 0.31.0

1 Like

It seems like you have h2c enabled on your port 80.

grep -Ri "listen " /etc/nginx
1 Like

I’m not sure, what do you mean by h2c? Thanks!

HTTP/2 should only be enabled on your port 443.

Your nginx server is behaving like it has HTTP/2 enabled on port 80.

What does the output of my command show?

1 Like

Get rid of http2 from this, and reload nginx.

2 Likes

Bravo you are a genius. Thanks for saving my day :slight_smile:

1 Like