Dear All,
I have faced an error when I want to switch ERPNext v13 from development to producation.
Note:
This error showed after running this:
sudo bench setup production frappe
Please any help !!
Site site1.local assigned port: 8001
Setting Up symlinks and reloading services...
$ /usr/bin/supervisorctl reread
frappe-bench-redis: available
frappe-bench-web: available
frappe-bench-workers: available
$ /usr/bin/supervisorctl update
frappe-bench-redis: added process group
frappe-bench-web: added process group
frappe-bench-workers: added process group
$ sudo /usr/sbin/nginx -t
nginx: [emerg] unknown log format "main" in /etc/nginx/conf.d/frappe-bench.conf:101
nginx: configuration file /etc/nginx/nginx.conf test failed
ERROR:
Traceback (most recent call last):
File "/usr/local/bin/bench", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.8/dist-packages/bench/cli.py", line 127, in cli
bench_command()
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/bench/commands/setup.py", line 89, in setup_production
setup_production(user=user, yes=yes)
File "/usr/local/lib/python3.8/dist-packages/bench/config/production_setup.py", line 87, in setup_production
reload_nginx()
File "/usr/local/lib/python3.8/dist-packages/bench/config/production_setup.py", line 205, in reload_nginx
exec_cmd(f"sudo {which('nginx')} -t")
File "/usr/local/lib/python3.8/dist-packages/bench/utils/__init__.py", line 155, in exec_cmd
raise CommandFailedError
bench.exceptions.CommandFailedError