[V7] bench renew-lets-encrypt not working

Hi All,

tried to update lets encrypt with the following error

I have crontab so I dont know whats wrong

please help

frappe@erp:~$ sudo bench renew-lets-encrypt
[sudo] password for frappe:
Traceback (most recent call last):
File "/usr/local/bin/bench", line 9, in <module>
load_entry_point('bench==2.0.0', 'console_scripts', 'bench')()
File "/home/frappe/bench-repo/bench/cli.py", line 40, in cli
bench_command()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/home/frappe/bench-repo/bench/commands/utils.py", line 82, in renew_lets_encrypt
from bench.config.lets_encrypt import renew_certs
File "/home/frappe/bench-repo/bench/config/lets_encrypt.py", line 7, in <module>
from crontab import CronTab
ImportError: No module named crontab
frappe@erp:~$

hi all,

after doing

sudo pip install python-crontab

I end up with the following

frappe@erp:~$ sudo bench renew-lets-encrypt
Running this will stop the nginx service temporarily causing your sites to go offline
Do you want to continue? [y/N]: y
/bin/sh: 1: /opt/certbot-auto: not found
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==2.0.0’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/commands/utils.py”, line 83, in renew_lets_encrypt
renew_certs()
File “/home/frappe/bench-repo/bench/config/lets_encrypt.py”, line 94, in renew_certs
exec_cmd("{path} renew".format(path=get_certbot_path()))
File “/home/frappe/bench-repo/bench/utils.py”, line 90, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: /opt/certbot-auto renew
frappe@erp:~$

any Ideas?

Let’s Encrypt package was not correctly installed on your first attempt of requesting key it seems.
You should do following:

$ cd frappe-bench/
~/frappe-bench$ bench update --requirements
~/frappe-bench$ bench update --bench
~/frappe-bench$ sudo -H bench setup lets-encrypt

Keep posted.

Hi @yashodhan,

thanks that worked I have ssl again but now I face the following

but no more concernes with let encrypt!
thanks for help

P.S. maybe you know the solution to my nginx problem as well??