Let's Encrypt doesn't provision a certificate

I have just installed MiaB to a fresh install of Ubuntu 14.04.

I receive a message when trying to provision Let’s Encrypt that looks like it is installing the validation files, but the log indicates that the validation file is not present:

Log:
Reading account key from /home/user-data/ssl/lets_encrypt/account.pem.
Validating existing account saved to /home/user-data/ssl/lets_encrypt/registration.json.
Reusing existing challenges for mail.example.net.
Validation file is not present --- a file must be installed on the web server.
Reusing existing challenges for www.mail.example.net.
Validation file is not present --- a file must be installed on the web server.
Reusing existing challenges for example.com.
Validation file is not present --- a file must be installed on the web server.
Reusing existing challenges for www.example.com.
Validation file is not present --- a file must be installed on the web server.
Reading account key from /home/user-data/ssl/lets_encrypt/account.pem.
Validating existing account saved to /home/user-data/ssl/lets_encrypt/registration.json.
Reusing existing challenges for mail.example.net.
Validation file is not present --- a file must be installed on the web server.
Reusing existing challenges for www.mail.example.net.
Validation file is not present --- a file must be installed on the web server.
Reusing existing challenges for example.com.
Validation file is not present --- a file must be installed on the web server.
Reusing existing challenges for www.example.com.
Validation file is not present --- a file must be installed on the web server.

maybe one of these post helps you:
[1] https://github.com/mail-in-a-box/mailinabox/issues/1060
[2] https://github.com/mail-in-a-box/mailinabox/issues/1020

None of the solutions there helped.

This is the error reported on command line:

ERROR:acme.challenges:Unable to reach ... ("bad handshake: Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],)",)
Exception ignored in: <bound method ClientNetwork.__del__ of <acme.client.ClientNetwork object at 0x7f8665ca0e48>>

Here is the traceback:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/acme/client.py", line 518, in __del__
    self.session.close()
  File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 689, in close
    for v in self.adapters.values():
  File "/usr/lib/python3.4/_collections_abc.py", line 512, in __iter__
    for key in self._mapping:
  File "/usr/lib/python3.4/collections/__init__.py", line 91, in __iter__
    curr = root.next
ReferenceError: weakly-referenced object no longer exists
Exception ignored in: <bound method ClientNetwork.__del__ of <acme.client.ClientNetwork object at 0x7f866660cf98>>
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/acme/client.py", line 518, in __del__
    self.session.close()
  File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 689, in close
    for v in self.adapters.values():
  File "/usr/lib/python3.4/_collections_abc.py", line 512, in __iter__
    for key in self._mapping:
  File "/usr/lib/python3.4/collections/__init__.py", line 91, in __iter__
    curr = root.next

Similar issue here renewing certificates:

root@strong:~/mailinabox# ./management/daily_tasks.sh
Traceback (most recent call last):
File “management/ssl_certificates.py”, line 788, in
provision_certificates_cmdline()
File “management/ssl_certificates.py”, line 436, in provision_certificates_cmdline
status = provision_certificates(env, agree_to_tos_url=agree_to_tos_url, logger=my_logger, force_domains=force_domains, show_extended_problems=show_extended_problems)
File “management/ssl_certificates.py”, line 323, in provision_certificates
logger=my_logger)
File “/usr/local/lib/python3.4/dist-packages/free_tls_certificates/client.py”, line 64, in issue_certificate
agree_to_tos_url, validation_method, acme_server, logger)
File “/usr/local/lib/python3.4/dist-packages/free_tls_certificates/client.py”, line 112, in validate_domain_ownership
acme_server=acme_server)
File “/usr/local/lib/python3.4/dist-packages/free_tls_certificates/client.py”, line 317, in create_client
client = acme.client.Client(acme_server, key)
File “/usr/local/lib/python3.4/dist-packages/acme/client.py”, line 69, in init
self.net.get(directory).json())
File “/usr/local/lib/python3.4/dist-packages/acme/client.py”, line 641, in get
self._send_request(‘GET’, url, **kwargs), content_type=content_type)
File “/usr/local/lib/python3.4/dist-packages/acme/client.py”, line 614, in _send_request
response = self.session.request(method, url, *args, **kwargs)
File “/usr/local/lib/python3.4/dist-packages/requests/sessions.py”, line 488, in request
resp = self.send(prep, **send_kwargs)
File “/usr/local/lib/python3.4/dist-packages/requests/sessions.py”, line 609, in send
r = adapter.send(request, **kwargs)
File “/usr/local/lib/python3.4/dist-packages/requests/adapters.py”, line 423, in send
timeout=timeout
File “/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py”, line 594, in urlopen
chunked=chunked)
File “/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py”, line 350, in _make_request
self._validate_conn(conn)
File “/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py”, line 835, in validate_conn
conn.connect()
File “/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connection.py”, line 311, in connect
cert_reqs=resolve_cert_reqs(self.cert_reqs),
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/util/ssl
.py", line 267, in create_urllib3_context
context.set_ciphers(ciphers or DEFAULT_CIPHERS)
File “/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/contrib/pyopenssl.py”, line 385, in set_ciphers
self._ctx.set_cipher_list(ciphers)
TypeError: must be str, not bytes

The uninstall open-ssl, reinstall open-ssl, rerun mailinabox setup fix isn’t working for me.

1 Like

You mentioned in another thread that you are trying to install with a connection from a residential ISP.

Are you sure port 80 isn’t blocked inbound? lets-encrypt requires port 80 to be available inbound.

Yes, it is not blocked. I have been using it for years. I can access from outside the network, although it looks like MiaB redirects http://www.example.com to https://www.example.com to https://example.com, which is a little peculiar.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.