Let's Encrypt fails to generate certificate

When I try to renew a I get the following error:

Traceback (most recent call last):
  File "/usr/share/webmin/webmin/acme_tiny.py", line 198, in <module>
  File "/usr/share/webmin/webmin/acme_tiny.py", line 194, in main
    signed_crt = get_crt(args.account_key, args.csr, args.acme_dir, log=LOGGER, CA=args.ca, disable_check=args.disable_check, directory_url=args.directory_url, contact=args.contact)
  File "/usr/share/webmin/webmin/acme_tiny.py", line 143, in get_crt
    raise ValueError("Wrote file to {0}, but couldn't download {1}: {2}".format(wellknown_path, wellknown_url, e))
ValueError: Wrote file to /home/blabla/public_html/.well-known/acme-challenge/tgPPUYqCV4fCE2Wq3abjja5MlXlNmPXGiDX4p4TvVNI, but couldn't download http://autoconfig.blabla.be/.well-known/acme-challenge/tgPPUYqCV4fCE2Wq3abjja5MlXlNmPXGiDX4p4TvVNI: Error:
Url: http://autoconfig.blabla.be/.well-known/acme-challenge/tgPPUYqCV4fCE2Wq3abjja5MlXlNmPXGiDX4p4TvVNI
Data: None
Response Code: None
Response: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>

The second error:

usage: acme_tiny.py [-h] --account-key ACCOUNT_KEY --csr CSR --acme-dir
ACME_DIR [–quiet] [–disable-check]
[–directory-url DIRECTORY_URL] [–ca CA]
[–contact [CONTACT [CONTACT …]]]
acme_tiny.py: error: argument --acme-dir is required

I use
Ubuntu 16.04 lts,
Usermin 1.791
Webmin version 1.941
Virtualmin version 6.08

How can I solve this?


You would need to make sure that the file can be accessed (by world) at http://autoconfig.blabla.be/.well-known/acme-challenge/tgPPUYqCV4fCE2Wq3abjja5MlXlNmPXGiDX4p4TvVNI. You can put any file manually there, and try opening it from URL bar at first. Check as well for http -> https redirects.