Nextcloud nginx certbot renewal 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. 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:businessparksolutions.com

I ran this command:

It produced this output:

My web server is (include version):nginx

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

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 0.31.0

I followed the following guide and installed nextcloud.

Then I managed to get certbot to run to get a new cert but I can`t renew it. When I am trying to do a dryrun it fails.

Here is the log

certbot renew --dry-run
Saving debug log to /var/log/letsencrypt/letsencrypt.log


Processing /etc/letsencrypt/renewal/server1.businessparksolutions.com.conf


Cert not due for renewal, but simulating renewal for dry run
Plugins selected: Authenticator nginx, Installer nginx
Starting new HTTPS connection (1): acme-staging-v02.api.letsencrypt.org
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for server1.businessparksolutions.com
nginx: [warn] conflicting server name “server1.businessparksolutions.com” on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name “server1.businessparksolutions.com” on 0.0.0.0:443, ignored
Waiting for verification…
Cleaning up challenges
nginx: [warn] conflicting server name “server1.businessparksolutions.com” on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name “server1.businessparksolutions.com” on 0.0.0.0:443, ignored
Attempting to renew cert (server1.businessparksolutions.com) from /etc/letsencrypt/renewal/server1.businessparksolutions.com.conf produced an unexpected error: Failed authorization procedure. server1.businessparksolutions.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://server1.businessparksolutions.com/.well-known/acme-challenge/IV3nI7t-3KkrNvUIDnhQeBGzTBIyNrejPg816ijd058 [MY.IP.ADD.RESS]: 503. Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/server1.businessparksolutions.com/fullchain.pem (failure)


** DRY RUN: simulating ‘certbot renew’ close to cert expiry
** (The test certificates below have not been saved.)

All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/server1.businessparksolutions.com/fullchain.pem (failure)
** DRY RUN: simulating ‘certbot renew’ close to cert expiry
** (The test certificates above have not been saved.)


1 renew failure(s), 0 parse failure(s)

IMPORTANT NOTES:

I have replaced the actual server name with server1 and also the external ip address with [MY.IP.ADD.RESS]

please advise

rajbps

Hi @rajbps

we need your real domain name to check your configuration.

And you have to fix these errors:

server names + ports must be unique.

Checking the not existing subdomain your configuration is broken ( https://check-your-website.server-daten.de/?q=server1.businessparksolutions.com ):

The "not existing subdomain" has an ip address:

Host T IP-Address is auth. ∑ Queries ∑ Timeout
server1.businessparksolutions.com A 62.31.102.234 yes 1 0
AAAA yes
www.server1.businessparksolutions.com A 62.31.102.234 yes 1 0
AAAA yes

But the relevant answers are 503 - Service Unavailable.

And port 443 sends plain http content and a http status 200:

Powered by Traccar GPS Tracking System

Domainname Http-Status redirect Sec. G
http://server1.businessparksolutions.com/
62.31.102.234 503 0.244 S
Service Unavailable
http://www.server1.businessparksolutions.com/
62.31.102.234 503 0.243 S
Service Unavailable
https://server1.businessparksolutions.com/
62.31.102.234 -4 0.480 W
SendFailure - The underlying connection was closed: An unexpected error occurred on a send. The handshake failed due to an unexpected packet format.
https://www.server1.businessparksolutions.com/
62.31.102.234 -4 0.510 W
SendFailure - The underlying connection was closed: An unexpected error occurred on a send. The handshake failed due to an unexpected packet format.
http://server1.businessparksolutions.com:443/
62.31.102.234 200 0.257 Q
Visible Content: Powered by Traccar GPS Tracking System
http://www.server1.businessparksolutions.com:443/
62.31.102.234 200 0.246 Q
Visible Content: Powered by Traccar GPS Tracking System
http://server1.businessparksolutions.com/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de
62.31.102.234 503 0.280 S
Service Unavailable
Visible Content: 503 Service Unavailable No server is available to handle this request.
http://www.server1.businessparksolutions.com/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de
62.31.102.234 503 0.270 S
Service Unavailable
Visible Content: 503 Service Unavailable No server is available to handle this request.

So checking a file in /.well-known/acme-challenge doesn't work -> you can't use http-01 validation.

You need a working port 80 / http configuration to use http-01 validation.

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