After following your solution I can't create any Certificates anymore:
The letsencrypt Log:
- Domain: khopen.xxx.xxx
- Type: dns
- Detail: DNS problem: NXDOMAIN looking up A for khopen.xxx.xxx - check that a DNS record exists for this domain; DNS problem: NXDOMAIN looking up AAAA for khopen.xxx.xxx - check that a DNS record exists for this domain
- 2022-05-04 09:15:33,715:DEBUG:certbot._internal.error_handler:Encountered exception:
- Traceback (most recent call last):
- File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/_internal/auth_handler.py", line 91, in handle_authorizations
- self._poll_authorizations(authzrs, max_retries, best_effort)
- File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/_internal/auth_handler.py", line 180, in _poll_authorizations
- raise errors.AuthorizationError('Some challenges have failed.')
- AuthorizationError: Some challenges have failed.
- 2022-05-04 09:15:33,715:DEBUG:certbot._internal.error_handler:Calling registered functions
- 2022-05-04 09:15:33,715:INFO:certbot._internal.auth_handler:Cleaning up challenges
- 2022-05-04 09:15:33,715:DEBUG:certbot._internal.plugins.webroot:Removing /var/www/imscp/gui/plugins/LetsEncrypt/acme/.well-known/acme-challenge/zTyJc3Ij0EZZCesgHkNjEhSjwN5xS5Bja9mid2MAgZk
- 2022-05-04 09:15:33,716:DEBUG:certbot._internal.plugins.webroot:All challenges cleaned up
- 2022-05-04 09:15:33,716:DEBUG:certbot._internal.log:Exiting abnormally:
- Traceback (most recent call last):
- File "/usr/local/sbin/certbot", line 11, in <module>
- sys.exit(main())
- File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 15, in main
- return internal_main.main(cli_args)
- File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/_internal/main.py", line 1357, in main
- return config.func(config, plugins)
- File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/_internal/main.py", line 1237, in certonly
- lineage = _get_and_save_cert(le_client, config, domains, certname, lineage)
- File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/_internal/main.py", line 121, in _get_and_save_cert
- lineage = le_client.obtain_and_enroll_certificate(domains, certname)
- File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/_internal/client.py", line 418, in obtain_and_enroll_certificate
- cert, chain, key, _ = self.obtain_certificate(domains)
- File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/_internal/client.py", line 351, in obtain_certificate
- orderr = self._get_order_and_authorizations(csr.data, self.config.allow_subset_of_names)
- File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/_internal/client.py", line 398, in _get_order_and_authorizations
- authzr = self.auth_handler.handle_authorizations(orderr, best_effort)
- File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/_internal/auth_handler.py", line 91, in handle_authorizations
- File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/_internal/auth_handler.py", line 180, in _poll_authorizations
- raise errors.AuthorizationError('Some challenges have failed.')
- AuthorizationError: Some challenges have failed.
- 2022-05-04 09:15:33,717:ERROR:certbot._internal.log:Some challenges have failed.
But the domain exist and till I changed the config of my system I could create and recreate certificates
Display MoreHello guys,
there you can find the solution I've adopted in order to get the systems working with every type of certificate (self signed, from CA or Let's Encrypt)
I didn't change absolutely nothing in the code of i-MSCP, everything is original.
The following has been tested ONLY on Debian Stretch x64, with a standard i-MSCP installation. No strange things.
1. Integrate the new LE CAs in your system:
Code
- mkdir /usr/share/ca-certificates/letsencrypt
- curl --insecure -Lo /usr/share/ca-certificates/letsencrypt/isrgrootx1.crt https://letsencrypt.org/certs/isrgrootx1.pem
- curl --insecure -Lo /usr/share/ca-certificates/letsencrypt/isrg-root-x2.crt https://letsencrypt.org/certs/isrg-root-x2.pem
- curl --insecure -Lo /usr/share/ca-certificates/letsencrypt/isrg-root-x1-cross-signed.crt https://letsencrypt.org/certs/isrg-root-x1-cross-signed.pem
- curl --insecure -Lo /usr/share/ca-certificates/letsencrypt/lets-encrypt-r3.crt https://letsencrypt.org/certs/lets-encrypt-r3.pem
- curl --insecure -Lo /usr/share/ca-certificates/letsencrypt/lets-encrypt-r3-cross-signed.crt https://letsencrypt.org/certs/lets-encrypt-r3-cross-signed.pem
- curl --insecure -Lo /usr/share/ca-certificates/letsencrypt/lets-encrypt-r4.crt https://letsencrypt.org/certs/lets-encrypt-r4.pem
- curl --insecure -Lo /usr/share/ca-certificates/letsencrypt/lets-encrypt-e2.crt https://letsencrypt.org/certs/lets-encrypt-e2.pem
- dpkg-reconfigure ca-certificates
Here a Dialog appears.
- In the first dialog choose "yes"
- In the second select your new 7 CA certificates to import and then click OK
The result should be as follows:
2. Remove any previous certbot versions:
3. Install the new and supported certbot version
4. Optional, but recommended, edit the file /var/www/imscp/gui/plugins/LetsEncrypt/config.php and update the section as follows:
Save and close;
5. Remove previous symlinks that could still exist, we'll fix them in next steps:
6. HIT THE "UPDATE PLUGINS" BUTTON here: https://your.server.panel:1234/admin/settings_plugins.php
If everything goes well, the LE Plugin will reconfigure.
7. Now it's time to fix the symlinks:
8. Now a little check:
9. And the final check:
Now your system will have:
- The new CA from LE that it didn't have before
- The new supported version of certbot that knows the new chains
I tested the procedure on more boxes and it works for certificates creation and for certificates revocations. I don't know if it works for renewals. Please test it and kindly report back.
Hope it helps,
bye Kess.