I am trying to install an SSL certificate by following the instructions at: https://kb.frappe.io/kb/deployment/configuring-https.
When I try to execute either of the bench set-ssl-certificate or bench set-ssl-key commands I get an error.
Traces are below. Your help would be appreciated.
Here is trace of the set-ssl-certificate error:
root@erpnext5:/etc/nginx/ssl# bench set-ssl-certificate site1.local /etc/nginx/ssl/certificate_bundle.crt
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.92’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/cli.py”, line 60, in cli
bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 700, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 680, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 508, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/cli.py”, line 362, in _set_ssl_certificate
set_ssl_certificate(site, ssl_certificate_path)
File “/home/frappe/bench-repo/bench/utils.py”, line 326, in set_ssl_certificate
set_site_config_nginx_property(site, {“ssl_certificate”: ssl_certificate}, bench=bench, gen_config=gen_config)
File “/home/frappe/bench-repo/bench/utils.py”, line 337, in set_site_config_nginx_property
generate_nginx_config(bench=bench)
File “/home/frappe/bench-repo/bench/config.py”, line 69, in generate_nginx_config
sites = get_sites_with_config(bench=bench)
File “/home/frappe/bench-repo/bench/config.py”, line 56, in get_sites_with_config
site_config = get_site_config(site, bench=bench)
File “/home/frappe/bench-repo/bench/config.py”, line 50, in get_site_config
return json.load(f)
File “/usr/lib/python2.7/json/init.py”, line 278, in load
**kw)
File “/usr/lib/python2.7/json/init.py”, line 326, in loads
return _default_decoder.decode(s)
File “/usr/lib/python2.7/json/decoder.py”, line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python2.7/json/decoder.py”, line 381, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: Expecting property name: line 4 column 1 (char 66)
Here is the set-ssl-key error:
root@erpnext5:/etc/nginx/ssl# bench set-ssl-key site1.local /etc/nginx/ssl/server.key
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.92’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/cli.py”, line 60, in cli
bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 700, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 680, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 508, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/cli.py”, line 369, in _set_ssl_certificate_key
set_ssl_certificate_key(site, ssl_certificate_key_path)
File “/home/frappe/bench-repo/bench/utils.py”, line 329, in set_ssl_certificate_key
set_site_config_nginx_property(site, {“ssl_certificate_key”: ssl_certificate_key}, bench=bench, gen_config=gen_config)
File “/home/frappe/bench-repo/bench/utils.py”, line 337, in set_site_config_nginx_property
generate_nginx_config(bench=bench)
File “/home/frappe/bench-repo/bench/config.py”, line 69, in generate_nginx_config
sites = get_sites_with_config(bench=bench)
File “/home/frappe/bench-repo/bench/config.py”, line 56, in get_sites_with_config
site_config = get_site_config(site, bench=bench)
File “/home/frappe/bench-repo/bench/config.py”, line 50, in get_site_config
return json.load(f)
File “/usr/lib/python2.7/json/init.py”, line 278, in load
**kw)
File “/usr/lib/python2.7/json/init.py”, line 326, in loads
return _default_decoder.decode(s)
File “/usr/lib/python2.7/json/decoder.py”, line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python2.7/json/decoder.py”, line 381, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: Expecting property name: line 4 column 1 (char 66)