SOLVED - Docker lets encrypt error

hello,
I use lets encrypt in a docker container. port 80 and 443 is forwarded from host to container, so everything should work correctly.
I got this error:

Encountered exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/certbot/client.py", line 386, in deploy_certificate
    fullchain_path=fullchain_path)
  File "/usr/lib/python2.7/dist-packages/certbot_apache/configurator.py", line 231, in deploy_cert
    vhost = self.choose_vhost(domain)
  File "/usr/lib/python2.7/dist-packages/certbot_apache/configurator.py", line 325, in choose_vhost
    vhost = self.make_vhost_ssl(vhost)
  File "/usr/lib/python2.7/dist-packages/certbot_apache/configurator.py", line 795, in make_vhost_ssl
    self._copy_create_ssl_vhost_skeleton(avail_fp, ssl_fp)
  File "/usr/lib/python2.7/dist-packages/certbot_apache/configurator.py", line 935, in _copy_create_ssl_vhost_skeleton
    line = next(orig_file)
StopIteration

Calling registered functions
Reporting to user: Unable to install the certificate
Exiting abnormally:
Traceback (most recent call last):
  File "/usr/bin/letsencrypt", line 11, in <module>
    load_entry_point('certbot==0.10.2', 'console_scripts', 'certbot')()
  File "/usr/lib/python2.7/dist-packages/certbot/main.py", line 849, in main
    return config.func(config, plugins)
  File "/usr/lib/python2.7/dist-packages/certbot/main.py", line 579, in run
    lineage.chain, lineage.fullchain)
  File "/usr/lib/python2.7/dist-packages/certbot/client.py", line 386, in deploy_certificate
    fullchain_path=fullchain_path)
  File "/usr/lib/python2.7/dist-packages/certbot_apache/configurator.py", line 231, in deploy_cert
    vhost = self.choose_vhost(domain)
  File "/usr/lib/python2.7/dist-packages/certbot_apache/configurator.py", line 325, in choose_vhost
    vhost = self.make_vhost_ssl(vhost)
  File "/usr/lib/python2.7/dist-packages/certbot_apache/configurator.py", line 795, in make_vhost_ssl
    self._copy_create_ssl_vhost_skeleton(avail_fp, ssl_fp)
  File "/usr/lib/python2.7/dist-packages/certbot_apache/configurator.py", line 935, in _copy_create_ssl_vhost_skeleton
    line = next(orig_file)
StopIteration

I just installed it, it is up to date
It is installed on a Debian 9.3

Make sure you have the latest: | Certbot

And the error is rather vague:

Do you have any other messages?

No, thats the error from the log :confused: sorry

python-certbot-apache is already the newest version (0.10.2-1).

Try running it as root

already done. I only have a root user in my docker container

OK. What is the command you ran?

i executed:
certbot --apache

Some things to try that may help or shed some light:

find / -name certbot
which certbot
certbot certificates
certbot --apache -v
certbot --manual

SOLVED

There was another config file in the sites-enabled folder which was not a host config file.
This caused the error.

1 Like

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