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:gestion.cr-lorca.es
I ran this command:certbot certonly --dry-run --webroot -w /usr/local/apache-tomcat9/webapps/ -d gestion.cr-lorca.es
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): Tomcat 9.0.27
The operating system my web server runs on is (include version): ubuntu 18.04.4
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):
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):0.31.0
Like a month ago when I had to renew the certificate I got the above error. As I dont manage the network I decided to give it a go and try without --dry-run and it succeded. But whatever that it is making it fail in the staging env could be applied to the final server so I'd like to know what's happening.
Staging server needs port 80 but the final production one doesn't?
I also get:
$curl -v telnet://gestion.cr-lorca.es:80
Rebuilt URL to: telnet://gestion.cr-lorca.es:80/
Trying 194.224.8.22...
TCP_NODELAY set
connect to 194.224.8.22 port 80 failed: Connection refused
I asked for the 80 port to be open, but the network manager is pretty paranoid, looks like he closed it again. But it doesn't occur to me to check this because the real server issued the certificate.
Port 80 will need to be open for issuance and all renewals. if they will not keep it open, or let you run a pre/post hook to automate opening and closing it for challenges, you will need to use another challenge mechanism, like DNS-01.
It could be the production server has a valid authorization cached. It does so for 30 days. Using --dry-run ensures the staging server always tries to validate the FQDNs and doesn't use any possibly cached authorizations.
No offence, but then your network manager isn't very informed IMHO. If the same service runs behind two ports, why would closing just one port make it any more secure? Note: it doesn't. If the service running on port 80 and port 443 is vulnerable to some kind of exploit, it would most likely be vulnerable on both ports. (The added TLS code for HTTPS would make port 443 even more likely to be vulnerable to some kind of exploit with regard to port 80, which doesn't have TLS code.) Also, if port 80 is only serving a redirect from HTTP to HTTPS, there is absolutely no harm at all to keep port 80 open. No harm at all. See also: