Hi,
I am encountering TypeError: str returned non-string (type Error) An unexpected error occurred. The details are as below.
# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
# certbot --version
certbot 1.11.0
# rpm -qa | grep ca-certificates
ca-certificates-2022.2.54-74.el7_9.noarch
#
An unexpected error occurred: TypeError: str returned non-string (type Error)
cat /var/log/letsencrypt/letsencrypt.log
2023-05-22 12:59:14,424:DEBUG:certbot._internal.main:certbot version: 1.11.0
2023-05-22 12:59:14,424:DEBUG:certbot._internal.main:Location of certbot entry point: /bin/certbot
2023-05-22 12:59:14,424:DEBUG:certbot._internal.main:Arguments: ['--standalone', '--preferred-challenges', 'http', '-d', 'edge.example.mydomain.com']
2023-05-22 12:59:14,424:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2023-05-22 12:59:14,436:DEBUG:certbot._internal.log:Root logging level set at 20
2023-05-22 12:59:14,436:INFO:certbot._internal.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2023-05-22 12:59:14,437:DEBUG:certbot._internal.plugins.selection:Requested authenticator standalone and installer None
2023-05-22 12:59:14,437:DEBUG:certbot._internal.plugins.selection:Single candidate plugin: * standalone
Description: Spin up a temporary webserver
Interfaces: IAuthenticator, IPlugin
Entry point: standalone = certbot._internal.plugins.standalone:Authenticator
Initialized: <certbot._internal.plugins.standalone.Authenticator object at 0x7f62f603fd90>
Prep: True
2023-05-22 12:59:14,437:DEBUG:certbot._internal.plugins.selection:Selected authenticator <certbot._internal.plugins.standalone.Authenticator object at 0x7f62f603fd90> and installer None
2023-05-22 12:59:14,438:INFO:certbot._internal.plugins.selection:Plugins selected: Authenticator standalone, Installer None
2023-05-22 12:59:16,294:WARNING:certbot.util:Invalid email address: .
2023-05-22 12:59:29,502:DEBUG:acme.client:Sending GET request to https://acme-v02.api.letsencrypt.org/directory.
2023-05-22 12:59:29,508:INFO:urllib3.connectionpool:Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
2023-05-22 12:59:30,100:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
File "/bin/certbot", line 9, in <module>
load_entry_point('certbot==1.11.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 1421, in main
return config.func(config, plugins)
File "/usr/lib/python2.7/site-packages/certbot/_internal/main.py", line 1277, in certonly
le_client = _init_le_client(config, auth, installer)
File "/usr/lib/python2.7/site-packages/certbot/_internal/main.py", line 652, in _init_le_client
acc, acme = _determine_account(config)
File "/usr/lib/python2.7/site-packages/certbot/_internal/main.py", line 570, in _determine_account
config, account_storage, tos_cb=_tos_cb)
File "/usr/lib/python2.7/site-packages/certbot/_internal/client.py", line 173, in register
acme = acme_from_config_key(config, key)
File "/usr/lib/python2.7/site-packages/certbot/_internal/client.py", line 43, in acme_from_config_key
return acme_client.BackwardsCompatibleClientV2(net, key, config.server)
File "/usr/lib/python2.7/site-packages/acme/client.py", line 831, in __init__
directory = messages.Directory.from_json(net.get(server).json())
File "/usr/lib/python2.7/site-packages/acme/client.py", line 1168, in get
self._send_request('GET', url, **kwargs), content_type=content_type)
File "/usr/lib/python2.7/site-packages/acme/client.py", line 1118, 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)
2023-05-22 12:59:30,102:ERROR:certbot._internal.log:An unexpected error occurred:
2023-05-22 12:59:30,102:ERROR:certbot._internal.log:TypeError: __str__ returned non-string (type Error)
Please guide. Thanks in advance.
Best Regards,
Kaushal