Problem:
On trying to run foreman-installer on our Smart-Proxy receive the errors:
systemd[1]: Starting Foreman Proxy…
smart-proxy[155788]: Errors detected on startup, see log for details. Exiting: cannot load such file – bigdecimal
systemd[1]: foreman-proxy.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: foreman-proxy.service: Failed with result ‘exit-code’.
systemd[1]: Failed to start Foreman Proxy.
/Stage[main]/Foreman_proxy::Service/Service[foreman-proxy]/ensure: change from ‘stopped’ to ‘running’ failed: Systemd start for foreman-proxy failed!
Expected outcome:
Successful install of Smart-Proxy using foreman-installer
Foreman and Proxy versions:
Foreman Version 3.31
Proxy version 3.31
I installed rubygem-bigdecimal as suggested, which helped. I then got the error:
Address already in use - bind(2) for [::]:9090
…so I stopped and disabled cockpit service which uses port 9090
I now see error as follows when I retry the foreman-installer:
[ERROR ] [configure] Error making POST request to Foreman at https:///api/v2/smart_proxies: Unable to communicate with the proxy: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([RestClient::Exceptions::OpenTimeout]: Timed out connecting to server) for proxy https://:9090/v2/features Please check the proxy is configured and running on the host.
[ERROR ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[<proxy hostname]/ensure: change from ‘absent’ to ‘present’ failed: Error making POST request to Foreman at https:///api/v2/smart_proxies: Unable to communicate with the proxy: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([RestClient::Exceptions::OpenTimeout]: Timed out connecting to server) for proxy https://:9090/v2/features Please check the proxy is configured and running on the host.
[NOTICE] [configure] System configuration has finished.
Could you provide any guidance on this one at all?
It’s really difficult to understand what you do exactly if you completely remove the hostnames as it is not possible to see when the main server and when proxy is mentioned. It’s also much easier to read when you put logs etc. into preformatted blocks…
I suppose you are running the last foreman-installer run on the proxy and the error is during the POST to the main server. The error says “Timed out connecting to server”.
So it seems to me as if the installer cannot connect to the smart proxy port on the main server, i.e. your new proxy cannot connect to the main server on tcp port 9090. I recommend to check firewall and iptables to verify and test with curl:
2023-04-18 13:02:29 [NOTICE] [root] Loading installer configuration. This will take some time.
2023-04-18 13:02:39 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2023-04-18 13:02:39 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2023-04-18 13:02:46 [NOTICE] [configure] Starting system configuration.
2023-04-18 13:03:05 [NOTICE] [configure] 250 configuration steps out of 1080 steps complete.
2023-04-18 13:03:14 [NOTICE] [configure] 500 configuration steps out of 1085 steps complete.
2023-04-18 13:03:16 [NOTICE] [configure] 750 configuration steps out of 1087 steps complete.
2023-04-18 13:03:41 [NOTICE] [configure] 1000 configuration steps out of 1089 steps complete.
2023-04-18 13:04:43 [ERROR ] [configure] Error making POST request to Foreman at https://cme-aumhd-for01.cme.local/api/v2/smart_proxies: Unable to communicate with the proxy: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([RestClient::Exceptions::OpenTimeout]: Timed out connecting to server) for proxy https://necutil01.sapol.sa.gov.au:9090/v2/features Please check the proxy is configured and running on the host.
2023-04-18 13:04:43 [ERROR ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[necutil01.sapol.sa.gov.au]/ensure: change from ‘absent’ to ‘present’ failed: Error making POST request to Foreman at https://cme-aumhd-for01.cme.local/api/v2/smart_proxies: Unable to communicate with the proxy: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([RestClient::Exceptions::OpenTimeout]: Timed out connecting to server) for proxy https://necutil01.sapol.sa.gov.au:9090/v2/features Please check the proxy is configured and running on the host.
2023-04-18 13:04:45 [NOTICE] [configure] System configuration has finished.