Satellite 6 installation fails with error: Unable to detect features ([Errno::ECONNREFUSED]: Failed to open TCP connection to satellite.example.com:9090)
Environment
- Red Hat Satellite 6
Issue
-
Satellite installer fails with an error during Capsule (foreman-proxy) registration. The installer reports:
Error making POST request to Foreman at https://satellite.example.com/api/v2/smart_proxies: Unable to communicate with the Capsule: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([Errno::ECONNREFUSED]: Failed to open TCP connection to satellite.example.com:9090 (Connection refused))
Resolution
-
Backup the Satellite installer answers file:
cp -p /etc/foreman-installer/scenarios.d/satellite-answers.yaml /etc/foreman-installer/scenarios.d/satellite-answers.yaml.bak-$(date +%F-%H%M) -
Modify the answers file used for Satellite installation to change the
bind_hostparameter in theforeman_proxysection to this:bind_host: - "*" -
This parameter may also exist in
/etc/foreman-proxy/settings.yml:# Host or IP to bind ports to (e.g. *, localhost, 0.0.0.0, ::, 192.168.1.20) :bind_host: '*' -
Re-run the installer:
satellite-installer -
For more KB articles/solutions related to Red Hat Satellite 6.x Installation/Upgrade/Update Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Installation/Upgrade/Update Issues.
Root Cause
-
The foreman-proxy service was not listening on the expected port (9090).
-
The answers file contained the following stanza:
foreman_proxy: repo: gpgcheck: true version: present ensure_packages_version: present bind_host: - "::" <============== http_port: 8000 ssl_port: 9090 -
This setting restricted the proxy service to a single IP. Requests to localhost or the FQDN (resolving to a different interface) were refused, leading to failed communication on port 9090.
Diagnostic Steps
-
The Satellite installation will fail with the error:
Failed to open TCP connection to satellite.example.com:9090 (Connection refused - connect(2) -
You will see the following error message in the
satellite.log:[ERROR 2021-01-20T09:21:09 main] Proxy satellite.example.com cannot be registered: Unable to communicate with the Capsule: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([Errno::ECONNREFUSED]: Failed to open TCP connection to satellite.example.com:9090 (Connection refused - connect(2) for "satellite.example.com" port 9090)) for Capsule https://satellite.example.com:9090/v2/features Please check the Capsule is configured and running on the host. -
You may be able to communicate with the capsule on port 9090 using IPv6, but not IPv4:
[root@satellite ~]# telnet localhost4.localdomain4 9090 Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused [root@satellite ~]# telnet localhost6.localdomain6 9090 Trying ::1... Connected to localhost6.localdomain6. Escape character is '^]'. ^] telnet> q Connection closed. -
You may see that the
rubyprocess is only listening on port 9090 via IPv6:[root@satellite ~]# netstat -tulpen | grep 9090 tcp6 0 0 :::9090 :::* LISTEN 995 27033 1128/ruby
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.