After your installation, if you are not able to bring up Login page and you see this kind of error in your browser, then it is likely due to Selinux setting.
Because we put our software in the /opt path, and Selinux policies does not allow to run web app from anything that it is not /var/www.
Since we don't want to change system policies on the customer servers, we set it just temporarily and give user a warning to change if he want permanent setting.
When this issue occurs, you will see the following error in nginx.log file:
2022/08/10 09:22:47 [crit] 14588#14588: *1 connect() to 127.0.0.1:8000 failed (13: Permission denied) while connecting to upstream, client: 178.223.69.167, server: localhost, request: "GET /api_dnl/v1/swagger.json HTTP/1.1", upstream: "http://127.0.0.1:8000/api_dnl/v1/swagger.json", host: "33.33.170.221"
The command you can use to check the Selinux policy is as follows:
You can use the getenforce command to see your SELINUX mode:
# getenforce
Enforcing
How to set your system to Permissive Mode
Use the following procedure to permanently change SELinux mode to permissive. When SELinux is running in permissive mode, SELinux policy is not enforced. The system remains operational and SELinux does not deny any operations but only logs AVC messages, which can be then used for troubleshooting, debugging, and SELinux policy improvements. Each AVC is logged only once in this case.
Prerequisites
The selinux-policy-targeted, libselinux-utils, and policycoreutils packages are installed on your system.
The selinux=0 or enforcing=0 kernel parameters are not used.
Procedure
Open the /etc/selinux/config file in a text editor of your choice, for example:
# vi /etc/selinux/config
Configure the SELINUX=permissive option:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=permissive
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
Restart the system:
# reboot
Verification
After the system restarts, confirm that the getenforce command returns Permissive:
$ getenforce
Permissive
License Module Initialization Error
If you are seeing the following error in /opt/denovov6/dnl_softswitch/log/dnl_softswitch.log, you should reset your license IP here.
Aug 21 23:26:18 194-233-170-221.ip.linodeusercontent.com dnl_softswitch[9387]: 2022-08-21 23:26:18 [ERROR] dnl_core.c:1760 Failed to initialize license module
Unable to open Web Portal
When you do "rpm update", the nginx config may get overwritten.
In this case, you can rerun the following command to reset the correct nginx config: