I am trying to get a Foreman master setup on a new installation of Ubuntu 14.04. I am hitting and installation issue that isn't yielding any googable results (or I don't know the right words).
Before running the foreman installer, I ensured that 'ping $(hostname -f)' resulted in my IP address, not 127.0.1.1.
After the installer finished, I was left with this error (machine name redacted):
Could not set 'present' on ensure: 422 Unprocessable Entity at 12:/usr/share/foreman-installer/modules/foreman_proxy/manifests/register.pp
Could not set 'present' on ensure: 422 Unprocessable Entity at 12:/usr/share/foreman-installer/modules/foreman_proxy/manifests/register.pp
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[abc.xyz.com]/ensure: change from absent to present failed: Could not set 'present' on ensure: 422 Unprocessable Entity at 12:/usr/share/foreman-installer/modules/foreman_proxy/manifests/register.pp
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[abc.xyz.com]: Failed to call refresh: missing param 'id' in parameters
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[abc.xyz.com]: missing param 'id' in parameters
From the /var/log/foreman-installer/foreman-installer.log (machine name redacted):
[DEBUG 2014-12-09 16:01:31 main] Puppet::Type::Foreman_smartproxy::ProviderRest: feature foreman_api is missing
[ INFO 2014-12-09 16:01:59 main] E, [2014-12-09T16:01:59.627479 #3981] ERROR -- : 422 Unprocessable Entity
[ INFO 2014-12-09 16:01:59 main] {
[ INFO 2014-12-09 16:01:59 main] "error"[0;37m => [0m{
[ INFO 2014-12-09 16:01:59 main] "id"[0;37m => [0m[1;31mnil[0m,
[ INFO 2014-12-09 16:01:59 main] "errors"[0;37m => [0m{
[ INFO 2014-12-09 16:01:59 main] "base"[0;37m => [0m[
[ INFO 2014-12-09 16:01:59 main] [1;37m[0] [0m[0;33m"Unable to communicate with the proxy: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([RestClient::RequestTimeout]: Request Timeout) for proxy https://abc.xyz.com:8443/features"[0m,
[ INFO 2014-12-09 16:01:59 main] [1;37m[1] [0m[0;33m"Please check the proxy is configured and running on the host."[0m
[ INFO 2014-12-09 16:01:59 main] ]
[ INFO 2014-12-09 16:01:59 main] },
[ INFO 2014-12-09 16:01:59 main] "full_messages"[0;37m => [0m[
[ INFO 2014-12-09 16:01:59 main] [1;37m[0] [0m[0;33m"Unable to communicate with the proxy: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([RestClient::RequestTimeout]: Request Timeout) for proxy https://abc.xyz.com:8443/features"[0m,
[ INFO 2014-12-09 16:01:59 main] [1;37m[1] [0m[0;33m"Please check the proxy is configured and running on the host."[0m
[ INFO 2014-12-09 16:01:59 main] ]
[ INFO 2014-12-09 16:01:59 main] }
[ INFO 2014-12-09 16:01:59 main] }
[ERROR 2014-12-09 16:01:59 main] Could not set 'present' on ensure: 422 Unprocessable Entity at 12:/usr/share/foreman-installer/modules/foreman_proxy/manifests/register.pp
Given the nature of the error, I attempted to re-create the smart proxy using the Web UI. There, I encountered this error (machine name redacted):
Unable to communicate with the proxy: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([RestClient::RequestTimeout]: Request Timeout) for proxy https://abc.xyz.com:8443/features
Please check the proxy is configured and running on the host.
Finally, I double checked that the proxy is running:
service foreman-proxy status
* foreman-proxy is running
The firewall is turned off and apt-get upgrade has been ran. Other than that, it should be a pretty standard installation of Ubuntu 14.04.
Has anyone encountered this error? Any other troubleshooting tips to try?
Thanks!
I have the same setup and same result. Just did a fresh install of Foreman 1.6 without this problem. The Foreman_smartproxy register.pp has not changed between 1.6 and 1.7, but apparently something has.
Thanks to Dominic on irc channel #theforman, the solution seems to be a change in the settings:
Adminster > Settings > General and check proxy_request_timeout is set to 60
Re-run installer
PS I Also changed the idle_timeout to 60