When using nginx for load balancing, there is a problem
1 connect() to 10.51.2.237:8084 failed (13: Permission denied) while connecting to upstream, client: 10.51.2.237, server:
It has been confirmed that the local firewall has been shut down. After some inquiry, it is because of SELinux
SELinux is a mandatory access control (MAC) system provided in Linux kernel version 2.6. It’s a built-in security system, and firewalls should be external
So: there are two solutions
1. Close SELinux
1. Temporary shutdown (no need to restart the machine)
Setenforce 0 # set SELinux to permission mode
##Setenforce 1 sets SELinux to enforcing mode
2. To modify the configuration file, restart the machine
Modify/etc/SELinux/config file
Change SELinux = enforcing to SELinux = disabled
Just restart the machine
2. Execute the following command
setsebool -P httpd_ can_ network_ connect 1
Similar Posts:
- Solutions to start failed after dhcpd installation
- Solutions to start failed after dhcpd installation
- [Solved] Nginx reverse proxy 502 permission denied
- ZABBIX server startup error resolution
- [Solved] Linux No access to the system error: Failed to load SELinux policy. Freezing
- How to Solve Nginx error: 403 Forbidden
- How to Solve Failed to load SELinux policy. Freezing Error (System Restart)
- Centos Service Cannot Start: Failed to start Login Service Failed to start Install ABRT coredump hook
- MySQL Changes the configuration file (my.ini) Error [How to Solve]
- 20190603 – CentOS 7 prompt failed to load SELinux policy. Freezing causes stuck solution