I’m trying to generate certificate for my domain with virtualmin.
I get this error:
… request failed : Web-based validation failed :
Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator webroot, Installer None Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org An unexpected error occurred: TypeError: str returned non-string (type Error) Please see the logfiles in /var/log/letsencrypt for more details.
DNS-based validation failed :
Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator manual, Installer None Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org An unexpected error occurred: TypeError: str returned non-string (type Error) Please see the logfiles in /var/log/letsencrypt for more details.
Checking the log, nothing is clear for me.
2020-04-13 16:45:48,484:DEBUG:certbot._internal.main:certbot version: 1.3.0
2020-04-13 16:45:48,484:DEBUG:certbot._internal.main:Arguments: [’–manual’, ‘-d’, ‘domainexample.com’, ‘-d’, ‘www.sdomainexample.com’, ‘–preferred-challenges=dns’, ‘–manual-auth-hook’, ‘/etc/webmin/webmin/letsencrypt-dns.pl’, ‘–manual-cleanup-hook’, ‘/etc/webmin/webmin/letsencrypt-cleanup.pl’, ‘–duplicate’, ‘–force-renewal’, ‘–manual-public-ip-logging-ok’, ‘–non-interactive’, ‘–agree-tos’, ‘–config’, ‘/tmp/.webmin/379363_13631_3_letsencrypt.cgi’, ‘–rsa-key-size’, ‘2048’, ‘–cert-name’, ‘domainexample.com’]
2020-04-13 16:45:48,484:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2020-04-13 16:45:48,502:DEBUG:certbot._internal.log:Root logging level set at 20
2020-04-13 16:45:48,502:INFO:certbot._internal.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2020-04-13 16:45:48,503:DEBUG:certbot._internal.plugins.selection:Requested authenticator manual and installer None
2020-04-13 16:45:48,504:DEBUG:certbot._internal.plugins.selection:Single candidate plugin: * manual
Description: Manual configuration or run your own shell scripts
Interfaces: IAuthenticator, IPlugin
Entry point: manual = certbot._internal.plugins.manual:Authenticator
Initialized: <certbot._internal.plugins.manual.Authenticator object at 0x7f855bcd8e90>
Prep: True
2020-04-13 16:45:48,504:DEBUG:certbot._internal.plugins.selection:Selected authenticator <certbot._internal.plugins.manual.Authenticator object at 0x7f855bcd8e90> and installer None
2020-04-13 16:45:48,504:INFO:certbot._internal.plugins.selection:Plugins selected: Authenticator manual, Installer None
2020-04-13 16:45:48,527:DEBUG:certbot._internal.main:Picked account: <Account(RegistrationResource(body=Registration(status=None, terms_of_service_agreed=None, agreement=None, only_return_existing=None, contact=(), key=None, external_account_binding=None), uri=u’https://acme-v02.api.letsencrypt.org/acme/acct/83051230’, new_authzr_uri=None, terms_of_service=None), eb9a6097073c529863052fb818b77443, Meta(creation_host=u’flagstone.ro’, creation_dt=datetime.datetime(2020, 4, 10, 15, 13, 17, tzinfo=)))>
2020-04-13 16:45:48,529:DEBUG:acme.client:Sending GET request to https://acme-v02.api.letsencrypt.org/directory.
2020-04-13 16:45:48,541:INFO:urllib3.connectionpool:Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
2020-04-13 16:45:48,573:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
File “/bin/letsencrypt”, line 9, in
load_entry_point(‘certbot==1.3.0’, ‘console_scripts’, ‘certbot’)()
File “/usr/lib/python2.7/site-packages/certbot/main.py”, line 15, in main
return internal_main.main(cli_args)
File “/usr/lib/python2.7/site-packages/certbot/_internal/main.py”, line 1347, in main
return config.func(config, plugins)
File “/usr/lib/python2.7/site-packages/certbot/_internal/main.py”, line 1217, in certonly
le_client = _init_le_client(config, auth, installer)
File “/usr/lib/python2.7/site-packages/certbot/_internal/main.py”, line 610, in _init_le_client
return client.Client(config, acc, authenticator, installer, acme=acme)
File “/usr/lib/python2.7/site-packages/certbot/_internal/client.py”, line 257, in init
acme = acme_from_config_key(config, self.account.key, self.account.regr)
File “/usr/lib/python2.7/site-packages/certbot/_internal/client.py”, line 44, in acme_from_config_key
return acme_client.BackwardsCompatibleClientV2(net, key, config.server)
File “/usr/lib/python2.7/site-packages/acme/client.py”, line 808, in init
directory = messages.Directory.from_json(net.get(server).json())
File “/usr/lib/python2.7/site-packages/acme/client.py”, line 1141, in get
self._send_request(‘GET’, url, **kwargs), content_type=content_type)
File “/usr/lib/python2.7/site-packages/acme/client.py”, line 1091, in _send_request
response = self.session.request(method, url, *args, **kwargs)
File “/usr/lib/python2.7/site-packages/requests/sessions.py”, line 486, in request
resp = self.send(prep, **send_kwargs)
File “/usr/lib/python2.7/site-packages/requests/sessions.py”, line 598, in send
r = adapter.send(request, **kwargs)
File “/usr/lib/python2.7/site-packages/requests/adapters.py”, line 370, in send
timeout=timeout
File “/usr/lib/python2.7/site-packages/urllib3/connectionpool.py”, line 544, in urlopen
body=body, headers=headers)
File “/usr/lib/python2.7/site-packages/urllib3/connectionpool.py”, line 344, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=conn.timeout)
File “/usr/lib/python2.7/site-packages/urllib3/connectionpool.py”, line 314, in _raise_timeout
if ‘timed out’ in str(err) or ‘did not complete (read)’ in str(err): # Python 2.6
TypeError: str returned non-string (type Error)
2020-04-13 16:45:48,575:ERROR:certbot._internal.log:An unexpected error occurred:
Any clue?thx