Firewall blocking HTTP connections
Description
During the Redis installation process, specific HTTP calls are made to Redis instances on the server. If the firewall settings are not properly configured, these HTTP calls fail, resulting in errors such as the following:
curl: (7) Failed connect to 127.0.0.1:9443; Connection refused
Solution
To address the firewall issue:
-
Temporarily disable the firewall (short-term fix):
sudo service firewalld stop -
Work with system administrators to properly configure the firewall for Redis (long-term solution). Open the necessary ports:
firewall-cmd --permanent --add-port=<port/protocol>Refer to the official Redis documentation for the required port configurations.
-
If necessary, enable pinging:
firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -p icmp -s 0.0.0.0/0 -d 0.0.0.0/0 -j ACCEPT