nextcloud-snap / nextcloud-snap

☁️📦 Nextcloud packaged as a snap
GNU General Public License v3.0
1.71k stars 219 forks source link

renew-certs broken after upgrade from 29.0.7snap1 to 29.0.8snap1 #2930

Open thedude911 opened 8 hours ago

thedude911 commented 8 hours ago

Describe the bug

Renewal of certs working with 29.0.7snap1 but broken with 29.0.8snap1 on Ubuntu 24.04.1

To Reproduce

Upgrade to 29.0.8snap1 -> reverting back to 29.0.7snap1 solved the issue

Logs

2024-10-20 10:55:21,209:WARNING:certbot.renewal:Attempting to renew cert (xxx.com) from /var/snap/nextcloud/current/certs/certbot/config/renewal/xxx.com.conf produced an unexpected error: Missing command line flag or config entry for this setting: Input the webroot for xxx.com:. Skipping. 2024-10-20 10:55:21,211:DEBUG:certbot.renewal:Traceback was: Traceback (most recent call last): File "/snap/nextcloud/44391/lib/python2.7/site-packages/certbot/renewal.py", line 450, in handle_renewal_request main.renew_cert(lineage_config, plugins, renewal_candidate) File "/snap/nextcloud/44391/lib/python2.7/site-packages/certbot/main.py", line 1192, in renew_cert renewed_lineage = _get_and_save_cert(le_client, config, lineage=lineage) File "/snap/nextcloud/44391/lib/python2.7/site-packages/certbot/main.py", line 115, in _get_and_save_cert renewal.renew_cert(config, domains, le_client, lineage) File "/snap/nextcloud/44391/lib/python2.7/site-packages/certbot/renewal.py", line 308, in renew_cert new_cert, new_chain, newkey, = le_client.obtain_certificate(domains, new_key) File "/snap/nextcloud/44391/lib/python2.7/site-packages/certbot/client.py", line 349, in obtain_certificate orderr = self._get_order_and_authorizations(csr.data, self.config.allow_subset_of_names) File "/snap/nextcloud/44391/lib/python2.7/site-packages/certbot/client.py", line 385, in _get_order_and_authorizations authzr = self.auth_handler.handle_authorizations(orderr, best_effort) File "/snap/nextcloud/44391/lib/python2.7/site-packages/certbot/auth_handler.py", line 69, in handle_authorizations resps = self.auth.perform(achalls) File "/snap/nextcloud/44391/lib/python2.7/site-packages/certbot/plugins/webroot.py", line 81, in perform self._set_webroots(achalls) File "/snap/nextcloud/44391/lib/python2.7/site-packages/certbot/plugins/webroot.py", line 99, in _set_webroots known_webroots) File "/snap/nextcloud/44391/lib/python2.7/site-packages/certbot/plugins/webroot.py", line 120, in _prompt_for_webroot webroot = self._prompt_for_new_webroot(domain, True) File "/snap/nextcloud/44391/lib/python2.7/site-packages/certbot/plugins/webroot.py", line 144, in _prompt_for_new_webroot force_interactive=True) File "/snap/nextcloud/44391/lib/python2.7/site-packages/certbot/display/ops.py", line 371, in validated_directory validator, *args, kwargs) File "/snap/nextcloud/44391/lib/python2.7/site-packages/certbot/display/ops.py", line 328, in _get_validated code, raw = method(message, default=default, kwargs) File "/snap/nextcloud/44391/lib/python2.7/site-packages/certbot/display/util.py", line 583, in directory_select return self.input(message, default, cli_flag) File "/snap/nextcloud/44391/lib/python2.7/site-packages/certbot/display/util.py", line 524, in input self._interaction_fail(message, cli_flag) File "/snap/nextcloud/44391/lib/python2.7/site-packages/certbot/display/util.py", line 469, in _interaction_fail raise errors.MissingCommandlineFlag(msg) MissingCommandlineFlag: Missing command line flag or config entry for this setting: Input the webroot for xxx.com:

2024-10-20 10:55:21,211:ERROR:certbot.renewal:All renewal attempts failed. The following certs could not be renewed: 2024-10-20 10:55:21,212:ERROR:certbot.renewal: /var/snap/nextcloud/current/certs/certbot/config/live/xxx.com/fullchain.pem (failure) 2024-10-20 10:55:21,214:INFO:certbot.hooks:Running post-hook command: restart-apache 2024-10-20 10:55:22,553:INFO:certbot.hooks:Output from post-hook command restart-apache: Restarting apache... done

scubamuc commented 7 hours ago

hey @thedude911 welcome and thanks for your request.

-> reverting back to 29.0.7snap1 solved the issue

well done with that... at least you're up and running again ✅

Attempting to renew cert (xxx.com) from /var/snap/nextcloud/current/certs/certbot/config/renewal/xxx.com.conf produced an unexpected error: Missing command line flag or config entry for this setting: Input the webroot for xxx.com:. Skipping.

you could try to encrypt from scratch

@pachulo do you have an idea?

scubamuc commented 7 hours ago

@thedude911

could you post the output of sudo cat /var/snap/nextcloud/current/certs/certbot/logs/letsencrypt.log

thedude911 commented 6 hours ago

letsencrypt.log