[SOLVED] LetsEncrypt An unexpected error occurred: UnsupportedAlgorithm: RSA is not supported by the backend

1 post / 0 new
#1 Wed, 03/13/2019 - 11:19
ITNinja70

[SOLVED] LetsEncrypt An unexpected error occurred: UnsupportedAlgorithm: RSA is not supported by the backend

Hi All, Unfortunately I don't really have a timeline when this started happening, maybe within a month?

How to create the error: Virtualmin >> domain >> Server Configuration >> SSL Certificate >> LetsEncrypt Tab

From Lets Encrypt output: Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator webroot, Installer None An unexpected error occurred: UnsupportedAlgorithm: RSA is not supported by the backend Please see the logfiles in /var/log/letsencrypt for more details.

From Lets Encrypt log: 2019-03-13 10:14:35,386:DEBUG:certbot.main:certbot version: 0.27.1 2019-03-13 10:14:35,387:DEBUG:certbot.main:Arguments: [] 2019-03-13 10:14:35,387:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot) 2019-03-13 10:14:35,410:DEBUG:certbot.log:Root logging level set at 20 2019-03-13 10:14:35,411:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log 2019-03-13 10:14:35,412:DEBUG:certbot.plugins.selection:Requested authenticator None and installer None 2019-03-13 10:14:35,412:DEBUG:certbot.plugins.selection:No candidate plugin 2019-03-13 10:14:35,412:DEBUG:certbot.plugins.selection:Selected authenticator None and installer None 2019-03-13 10:14:36,489:DEBUG:certbot.main:certbot version: 0.23.0 2019-03-13 10:14:36,489:DEBUG:certbot.main:Arguments: ['-a', 'webroot', '-d', 'domain.com', '--webroot-path', '/www/path/public_html', '--duplicate', '--manual-public-ip-logging-ok', '--config', '/path_letsencrypt.cgi', '--rsa-key-size', '2048'] 2019-03-13 10:14:36,489:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot) 2019-03-13 10:14:36,508:DEBUG:certbot.log:Root logging level set at 20 2019-03-13 10:14:36,508:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log 2019-03-13 10:14:36,509:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None 2019-03-13 10:14:36,509:DEBUG:certbot.plugins.selection:Single candidate plugin: * webroot Description: Place files in webroot directory Interfaces: IAuthenticator, IPlugin Entry point: webroot = certbot.plugins.webroot:Authenticator Initialized: <certbot.plugins.webroot.Authenticator object at 0x7f1039eb9850> Prep: True 2019-03-13 10:14:36,510:DEBUG:certbot.plugins.selection:Selected authenticator <certbot.plugins.webroot.Authenticator object at 0x7f1039eb9850> and installer None 2019-03-13 10:14:36,510:INFO:certbot.plugins.selection:Plugins selected: Authenticator webroot, Installer None 2019-03-13 10:14:36,517:DEBUG:certbot.log:Exiting abnormally: Traceback (most recent call last): File "/usr/bin/letsencrypt", line 9, in load_entry_point('certbot==0.23.0', 'console_scripts', 'certbot')() File "/usr/lib/python2.7/dist-packages/certbot/main.py", line 1266, in main return config.func(config, plugins) File "/usr/lib/python2.7/dist-packages/certbot/main.py", line 1141, in certonly le_client = _init_le_client(config, auth, installer) File "/usr/lib/python2.7/dist-packages/certbot/main.py", line 635, in _init_le_client acc, acme = _determine_account(config) File "/usr/lib/python2.7/dist-packages/certbot/main.py", line 489, in _determine_account accounts = account_storage.find_all() File "/usr/lib/python2.7/dist-packages/certbot/account.py", line 168, in find_all accounts.append(self.load(account_id)) File "/usr/lib/python2.7/dist-packages/certbot/account.py", line 181, in load regr = messages.RegistrationResource.json_loads(regr_file.read()) File "/usr/lib/python2.7/dist-packages/josepy/interfaces.py", line 179, in json_loads return cls.from_json(loads) File "/usr/lib/python2.7/dist-packages/josepy/json_util.py", line 289, in from_json return cls(cls.fields_from_json(jobj)) File "/usr/lib/python2.7/dist-packages/josepy/json_util.py", line 280, in fields_from_json fields[slot] = field.decode(value) File "/usr/lib/python2.7/dist-packages/josepy/json_util.py", line 88, in decode return self.fdec(value) File "/usr/lib/python2.7/dist-packages/josepy/json_util.py", line 289, in from_json return cls(cls.fields_from_json(jobj)) File "/usr/lib/python2.7/dist-packages/josepy/json_util.py", line 280, in fields_from_json fields[slot] = field.decode(value) File "/usr/lib/python2.7/dist-packages/josepy/json_util.py", line 88, in decode return self.fdec(value) File "/usr/lib/python2.7/dist-packages/josepy/json_util.py", line 481, in from_json return type_cls(**type_cls.fields_from_json(jobj)) File "/usr/lib/python2.7/dist-packages/josepy/jwk.py", line 222, in fields_from_json key = public_numbers.public_key(default_backend()) File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/primitives/asymmetric/rsa.py", line 337, in public_key return backend.load_rsa_public_numbers(self) File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/backends/multibackend.py", line 157, in load_rsa_public_numbers _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM) UnsupportedAlgorithm: RSA is not supported by the backend 2019-03-13 10:14:36,525:ERROR:certbot.log:An unexpected error occurred:

I've also tried to manually update the certificates by using this site, https://www.sslforfree.com/ Virtualmin >> domain >> Server Configuration >> SSL Certificate >> Update Certificate and Key

Manual update error: File Line Function /usr/share/webmin/virtual-server/newkey.cgi 72 WebminCore::error (eval 421) 6 (eval) /usr/share/webmin/miniserv.pl 2449 (eval) /usr/share/webmin/miniserv.pl 943 miniserv::handle_request

Aaaaaand of course as I am writing this, we ended up solving the issue (what are the odds!) I figured I would post this anyway since I found almost nothing on google/virtualmin forums about this error.

Solution: Purge any duplicate package entries of certbot! Virtualmin has its own internal use (I guess?) So if you use apt to install certbot along with running virtualmin, make sure you get rid of the apt installed certbot!

Sorry my formatting is horrible (first post!)