Problem
The Terraform Enterprise admin user interface (UI) is unstable or frequently becomes unavailable. In the Docker logs, you may see a warning message that IPv4 forwarding is disabled.
Cause
Terraform Enterprise requires IPv4 forwarding to be enabled on the host operating system for its container networking to function correctly. This setting is sometimes disabled by default for security compliance on certain OS images, such as some Google Cloud Platform images, or it may be disabled by configuration management tools.
When IPv4 forwarding is disabled, Docker logs the following warning.
level=warning msg="IPv4 forwarding is disabled. Networking will not work"
Solution
To resolve this issue, you must confirm that IPv4 forwarding is disabled and then re-enable it on the Terraform Enterprise host.
Step 1: Confirm the Issue
Before making changes, verify that IPv4 forwarding is the cause of the problem. You can confirm this in two ways.
-
Check the Docker information log for the
IPv4Forwardingsetting. The following output confirms it is disabled."IPv4Forwarding": false,
-
Use the
sysctlcommand to check the kernel parameter directly. A value of0means it is disabled.# sysctl net.ipv4.ip_forward net.ipv4.ip_forward = 0
Note: Even when IPv4 forwarding is disabled, the replicated-ui service may still appear to be active.
# systemctl -a | grep replicated replicated-operator.service loaded active running Replicated Operator Service replicated-ui.service loaded active running Replicated Service replicated.service loaded active running Replicated Service
Step 2: Re-enable IPv4 Forwarding
You can permanently re-enable IPv4 forwarding by adding the following line to the /etc/sysctl.conf file on the Terraform Enterprise host.
net.ipv4.ip_forward=1
Step 3: Apply the Changes
After modifying the configuration file, restart the networking service to apply the change.
# systemctl restart network
After the service restarts, Terraform Enterprise networking should function correctly, and the admin UI will become stable.