You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Going through the install on Rocky Linux 9. System python is still 3.9 but we've installed Python 3.11 and its available and have got the playbooks and variables to the point of installing, migrating and configuring netbox.
However systemd is unable to start the services because selinux won't approve:
Note that the context has to be set on the absolute path and not the link to current (though It might need both?)
The context can't be set before the playbook because the binaries may not yet be installed, and can't be set after the playbook because this exits the Ansible run when the netbox.service can not start.
Feb 13 22:41:41 netbox01 setroubleshoot[100863]: SELinux is preventing /srv/netbox/releases/netbox-4.2.3/venv-py3/bin/uwsgi from name_connect access on the tcp_socket port 389.#012#012***** Plugin catchall_boolean (47.5 confidence) suggests ******************#012#012If you want to allow authlogin to nsswitch use ldap#012Then you must tell SELinux about this by enabling the 'authlogin_nsswitch_use_ldap' boolean.#012#012Do#012setsebool -P authlogin_nsswitch_use_ldap
Are you able to run audit2why and audit2allow to get some further clarity on the issue?
It shouldn't be terrible difficult to add some RHEL specific tasks that add say... httpd_sys_content_t context to the templates directory or something like that.
I've already set httpd_sys_content_t for Apache which I'm running as a reverse proxy over Netbox (because I've got some established Ansible automation for that around getting certs from our CA etc.),
However, yeah, that's exactly what I was considering, but it's not RHEL specific. It'll be based on SELinux being in enforcing mode, though it should be done if SELinux is not disabled.
I'll have to do some googling on how to use the audit tools, do you have any suggestions on how audit2why and audit2allow should be run?
Going through the install on Rocky Linux 9. System python is still 3.9 but we've installed Python 3.11 and its available and have got the playbooks and variables to the point of installing, migrating and configuring netbox.
However systemd is unable to start the services because selinux won't approve:
from
/var/log/messages
Output from
ausearch -c '(uwsgi)' --raw
Note that the context has to be set on the absolute path and not the link to
current
(though It might need both?)The context can't be set before the playbook because the binaries may not yet be installed, and can't be set after the playbook because this exits the Ansible run when the
netbox.service
can not start.I'm having trouble setting the context appropriately but it should be possible with https://docs.ansible.com/ansible/latest/collections/community/general/sefcontext_module.html
We'd strongly prefer to be able to run this service wit SELinux in enforcing mode, so please don't recommend using permissive or disabling SELinux.
The text was updated successfully, but these errors were encountered: