Skip to main content

Getting a 502 Bad Gateway Error When Accessing Element Web

Issue

  • We are getting a 502 Bad Gateway Error from nginx when accessing Element Web.

Environment

  • Element Enterprise Installer 1.0.0
  • Red Hat Enterprise Linux 8.5

Resolution

  • Allow access to ports 80 and 443 and enable masquerading in the firewall:
sudo firewall-cmd --add-service={http,https} --permanent
sudo firewall-cmd --add-masquerade --permanent
sudo firewall-cmd --reload

Root Cause

By default, firewalld does not allow masquerading (Network Address Translation, NAT) through the firewall. This causes all sorts of trouble with doing the NAT required to access pods in microk8s.