-
Notifications
You must be signed in to change notification settings - Fork 229
Description
I'm not sure if this is an nginx issue or supervisor issue.
Installing today's version of the script, the install went pretty well.
Is the script supposed to install supervisor?
I was able to finish the install by running the following commands.
sudo apt install supervisor
bench setup supervisor
bench setup redis
sudo supervisorctl reload
bench config dns_multitenant on
sudo nano /etc/supervisor/supervisord.conf
[unix_http_server]
chmod = 0760
chown = frappe:frappe
sudo bench setup production frappe
bench setup nginx
sudo systemctl restart nginx supervisor
sudo systemctl status nginx
Here's the error message:
T```
ASK [nginx : Add managed vhost config file (if any vhosts are configured).] ***********************************************************************
task path: /usr/local/lib/python3.11/dist-packages/bench/playbooks/roles/nginx/tasks/vhosts.yml:9
[ERROR]: Task failed: Conditional result (False) was derived from value of type 'list' at '/usr/local/lib/python3.11/dist-packages/bench/playbooks/roles/nginx/defaults/main.yml:23:15'. Conditionals must have a boolean result.
Task failed.
Origin: /usr/local/lib/python3.11/dist-packages/bench/playbooks/roles/nginx/tasks/vhosts.yml:9:3
7 notify: restart nginx
8
9 - name: Add managed vhost config file (if any vhosts are configured).
^ column 3
<<< caused by >>>
Conditional result (False) was derived from value of type 'list' at '/usr/local/lib/python3.11/dist-packages/bench/playbooks/roles/nginx/defaults/main.yml:23:15'. Conditionals must have a boolean result.
Origin: /usr/local/lib/python3.11/dist-packages/bench/playbooks/roles/nginx/tasks/vhosts.yml:14:9
12 dest: "{{ nginx_vhost_path }}/vhosts.conf"
13 mode: 0644
14 when: nginx_vhosts
^ column 9
Broken conditionals can be temporarily allowed with the ALLOW_BROKEN_CONDITIONALS configuration option.
fatal: [localhost]: FAILED! => {
changed: false,
msg: "Task failed: Conditional result (False) was derived from value of type 'list' at '/usr/local/lib/python3.11/dist-packages/bench/playbooks/roles/nginx/defaults/main.yml:23:15'. Conditionals must have a boolean result."
}
PLAY RECAP *****************************************************************************************************************************************
localhost : ok=9 changed=3 unreachable=0 failed=1 skipped=6 rescued=0 ignored=0
ERROR: Command '['ansible-playbook', '-c', 'local', 'site.yml', '-vvvv', '-e', '{"production": true, "admin_emails": "", "mysql_root_password": null, "container": false}', '-t', 'nginx']' returned non-zero exit status 2.
Traceback (most recent call last):
File "/usr/local/bin/bench", line 8, in
sys.exit(cli())
^^^^^
File "/usr/local/lib/python3.11/dist-packages/bench/cli.py", line 132, in cli
bench_command()
File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1442, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1363, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1830, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1830, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1226, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 794, in invoke
return callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/bench/commands/setup.py", line 390, in setup_roles
run_playbook("site.yml", extra_vars=extra_vars, tag=role)
File "/usr/local/lib/python3.11/dist-packages/bench/utils/init.py", line 370, in run_playbook
subprocess.check_call(args, cwd=os.path.join(bench.path[0], "playbooks"))
File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'site.yml', '-vvvv', '-e', '{"production": true, "admin_emails": "", "mysql_root_password": null, "container": false}', '-t', 'nginx']' returned non-zero exit status 2.
ERROR: bench setup role nginx
subprocess.CalledProcessError: Command 'bench setup role nginx' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/bench", line 8, in
sys.exit(cli())
^^^^^
File "/usr/local/lib/python3.11/dist-packages/bench/cli.py", line 132, in cli
bench_command()
File "/usr/local/lib/python3.11/dist-packages/bench/commands/setup.py", line 110, in setup_production
setup_production(user=user, yes=yes)
File "/usr/local/lib/python3.11/dist-packages/bench/config/production_setup.py", line 37, in setup_production
setup_production_prerequisites()
File "/usr/local/lib/python3.11/dist-packages/bench/config/production_setup.py", line 30, in setup_production_prerequisites
exec_cmd("bench setup role nginx")
File "/usr/local/lib/python3.11/dist-packages/bench/utils/init.py", line 193, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: bench setup role nginx
grep: /etc/supervisor/supervisord.conf: No such file or directory
User ownership does not exist for supervisor. Adding it...
sed: can't read /etc/supervisor/supervisord.conf: No such file or directory
An error occurred on line 752 with exit status 0
-bash: pop_var_context: head of shell_variables not a function context
Connection to 5.223.51.37 closed.