Unable to install SSL Certificate Let's Encrypt

Hi, how are you? This is my first post on this forum.

On May 1, I decided to take the Linode service, I had never dared to manage a VPS before. So far I have learned several things, but the one that has cost me the most is installing an Let’s Encrypt ssl certificate …
I have seen several posts, and searched quite a bit in google without finding a solution. may be you can get me out of this hole.
I have Centos 7 installed with Nginx 1.16.1 and Webmin 1.942.

Requesting a certificate for cccloud.cl, www.cccloud.cl from Let’s Encrypt …
… request failed : Web-based validation failed : Failed to request certificate

When you goto virtualmin>virtualmin configuration>SSL certificate and attempt to install the letsencrypt one, can you copy and paste all of the text in the dialogue box error.
Web nased validation could be the ACME test is failing because of dns issues, or could be directory permissions problems, could be a misconfiguration in your webserver…
I dont use nginx, but it may be part of the problem.
To be honest, if you intend putting WordPress or Joomla websites on this server dont use nginx…you will regret the inconvenience of not being able to use htaccess. Sure php.ini works just fine, its just that most plugins/extensions automatically go looking for htaccess…nginx is a pain in the ass in this way. Without htaccess a lot of them dont function properly.

Since I’m learning with this from linode and virtualmin, I did the following:
Install virtualmin as LAMP, I mean went back to apache, and I still have the certificate problem,
Create a Virtual Server, and try to install letscripts:
I leave the result of the installation, to see if you can help me please

Requesting a certificate for servpcspa.com, www.servpcspa.com, mail.servpcspa.com from Let’s Encrypt …
… request failed : Web-based validation failed : Failed to request certificate :

Traceback (most recent call last):
File “/usr/share/webmin/webmin/acme_tiny.py”, line 198, in
main(sys.argv[1:])
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 149, in get_crt
raise ValueError(“Challenge did not pass for {0}: {1}”.format(domain, authorization))
ValueError: Challenge did not pass for mail.servpcspa.com: {u’status’: u’invalid’, u’challenges’: [{u’status’: u’invalid’, u’validationRecord’: [{u’url’: u’http://mail.servpcspa.com/.well-known/acme-challenge/frkLfQb5FpeVRFyoaTJ3zkg3xcHeux1Lamv0gYX38Pg’, u’hostname’: u’mail.servpcspa.com’, u’addressUsed’: u’2600:3c02::f03c:92ff:fecf:589c’, u’port’: u’80’, u’addressesResolved’: [u’45.56.114.15’, u’2600:3c02::f03c:92ff:fecf:589c’]}], u’url’: u’https://acme-v02.api.letsencrypt.org/acme/chall-v3/4584478618/uFCVGg’, u’token’: u’frkLfQb5FpeVRFyoaTJ3zkg3xcHeux1Lamv0gYX38Pg’, u’error’: {u’status’: 403, u’type’: u’urn:ietf:params:acme:error:unauthorized’, u’detail’: u’Invalid response from http://mail.servpcspa.com/.well-known/acme-challenge/frkLfQb5FpeVRFyoaTJ3zkg3xcHeux1Lamv0gYX38Pg [2600:3c02::f03c:92ff:fecf:589c]: “\n\n404 Not Found\n\n

Not Found

\n<p”’}, u’type’: u’http-01’}], u’identifier’: {u’type’: u’dns’, u’value’: u’mail.servpcspa.com’}, u’expires’: u’2020-05-21T19:23:37Z’}

, DNS-based validation failed : Failed to request certificate :

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

Same problem here. Fresh VirtualMin Installation, Domain with HTTP (not S!) reachable and working.

SSL options enabled for domain.

Requesting a certificate for xyz.com, www.xyz.com from Let's Encrypt ..
.. request failed : Web-based validation failed : Failed to request certificate : 

Traceback (most recent call last):
  File "/usr/share/webmin/webmin/acme_tiny.py", line 198, in <module>
    main(sys.argv[1:])
  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/xyz/public_html/.well-known/acme-challenge/JHmdr[shorted manually]YyTbKU, but couldn't download http://xyz.com/.well-known/acme-challenge/JHmdr[shorted manually]YyTbKU: Error:
Url: http://xyz.com/.well-known/acme-challenge/JHmdr[shorted manually]YyTbKU
Data: None
Response Code: 404
Response: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
</body></html>

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

DNS records double checked - working.
Domain checked with different files and downloads - working.

Solved.

I found the solution here:
https://www.yourhelpcenter.de/2020/02/virtualmin-error-acme_tiny-py-error-argument-acme-dir-is-required/

I found the solution here:
https://www.yourhelpcenter.de/2020/02/virtualmin-error-acme_tiny-py-error-argument-acme-dir-is-required/ 1

I did the recommended and installed certbot, getting the following result.

Requesting a certificate for cccloud.cl, www.cccloud.cl, mail.cccloud.cl from Let’s Encrypt …
… request failed: Web-based validation failed:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for cccloud.cl
http-01 challenge for mail.cccloud.cl
http-01 challenge for www.cccloud.cl
Using the webroot path / home / cccloud / public_html for all unmatched domains.
Waiting for verification …
Cleaning up challenges
Failed authorization procedure. cccloud.cl (http-01): urn: ietf: params: acme: error: unauthorized :: The client lacks sufficient authorization :: Invalid response from http://cccloud.cl/.well-known/acme-challenge/09F7SPu1C1FvnYzZK8K9OuV4VU3DXvFERDN0APyeb [2600: 3c02 :: f03c: 92ff: fecf: 589c]: "<! DOCTYPE HTML PUBLIC " - // IETF // DTD HTML 2.0 // EN \ "> \ n \ n 404 Not Found \ n \ n

Not Found

\ n <p ", mail.cccloud.cl (http-01): urn: ietf: params : acme: error: unauthorized :: The client lacks sufficient authorization :: Invalid response from http://mail.cccloud.cl/.well-known/acme-challenge/pZvj-jlWBpTY3oTxgPEi24MsVXIcCPsE8T-L5OLFV5w [2600: 3c02 :: f03c: 92ff: fecf: 589c]: "<! DOCTYPE HTML PUBLIC " - // IETF // DTD HTML 2.0 // EN \ "> \ n \ n 404 Not Found \ n \ n

Not Found

\ n <p ", www.cccloud.cl (http-01): urn: ietf: params: acme: error: unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.cccloud.cl/.well-known/acme-challenge/8K7ScVfLecqIkqTrZ Lh6T96bBz_5LxLWqFvKQHzEZ7w [2600: 3c02 :: f03c: 92ff: fecf: 589c]: "<! DOCTYPE HTML PUBLIC " - // IETF // DTD HTML 2.0 // EN \ "> \ n \ n < title> 404 Not Found \ n \ n

Not Found

\ n <p "
IMPORTANT NOTES:

DNS-based validation failed:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator manual, Installer None
Obtaining a new certificate
Performing the following challenges:
dns-01 challenge for cccloud.cl
dns-01 challenge for mail.cccloud.cl
dns-01 challenge for www.cccloud.cl
Waiting for verification …
Cleaning up challenges
Failed authorization procedure. cccloud.cl (dns-01): urn: ietf: params: acme: error: unauthorized :: The client lacks sufficient authorization :: Incorrect TXT record “h3JccSQo3ZG4RiFOv2ppAkdL779WZNcUAhlOnlRwPBU” found at _acme-challenge.cccloud.cl, mail (dns-01): urn: ietf: params: acme: error: unauthorized :: The client lacks sufficient authorization :: Incorrect TXT record “RjbmzDPMsVP0PkPHZDSsxTlysdl-Y5cfXfJ7BlQbzm4” found at _acme-challenge.mail.cccloud.cl, www.cccloud.cl, .cc cl (dns-01): urn: ietf: params: acme: error: unauthorized :: The client lacks sufficient authorization :: Incorrect TXT record “K-gL3HtDRjKwCH_thMx45qe-yr0A3d3ulG4M-JEzCVg” found at _acme-challenge.www.cccloud.cl
IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: cccloud.cl
    Type: unauthorized
    Detail: Incorrect TXT record
    “h3JccSQo3ZG4RiFOv2ppAkdL779WZNcUAhlOnlRwPBU” found at
    _acme-challenge.cccloud.cl

    Domain: mail.cccloud.cl
    Type: unauthorized
    Detail: Incorrect TXT record
    “RjbmzDPMsVP0PkPHZDSsxTlysdl-Y5cfXfJ7BlQbzm4” found at
    _acme-challenge.mail.cccloud.cl

    Domain: www.cccloud.cl
    Type: unauthorized
    Detail: Incorrect TXT record
    “K-gL3HtDRjKwCH_thMx45qe-yr0A3d3ulG4M-JEzCVg” found at
    _acme-challenge.www.cccloud.cl

    To fix these errors, please make your

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