Bug #8657
closedRequest timeout when registering smart proxy during installation due tu proxy_request_timeout=0
Description
- Configure foreman
- Configure foreman_proxy
- Configure puppet
- Configure foreman_cli
- Configure foreman_plugin_bootdisk
- Configure foreman_plugin_setup
Got these errors from the installer:
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[c-u14-puppet1.servers.barkleyhosting.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[c-u14-puppet1.servers.barkleyhosting.com]: Failed to call refresh: missing param 'id' in parameters /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[c-u14-puppet1.servers.barkleyhosting.com]: missing param 'id' in parameters Installing Done [100%] [......................................................................................................................................................................................................................................................................................] Something went wrong! Check the log for ERROR-level output
Any help would be great. The Foreman installer is still the preferred method of installing, right? Not sure why it wouldn't work with the default settings on a brand new vm.
Files
Updated by Ewoud Kohl van Wijngaarden almost 10 years ago
What would you like to edit? strip out hostnames?
This 422 response comes directly from Foreman. Usually this is because another smartproxy with the same URL (but different name) already exists. On a fresh install that seems unlikely. I'd recommend having a look in /var/log/foreman/production.log to see what triggered the 422 response.
Updated by Anonymous almost 10 years ago
- File production.log production.log added
Here's the production.log. Again, this is a fresh install and there seems to be quite a lot of errors in here. I just ran the foreman installer with the defaults. It doesn't look like the smart proxy ever gets installed.
Updated by Dominic Cleal almost 10 years ago
- Related to Bug #7579: Session reset after each page request, idle_timeout set to zero added
Updated by Dominic Cleal almost 10 years ago
- Project changed from Installer to Foreman
- Subject changed from Foreman installer errors "could not set 'present' on ensure/unprocessable entity to Request timeout when registering smart proxy during installation
- Category set to Settings
Thanks, that helped. The log shows that it's timing out from Foreman connecting to the smart proxy, which I think is due to whatever's causing bug #7579.
Unable to communicate with the proxy: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([RestClient::RequestTimeout]: Request Timeout) for proxy https://c-u14-puppet1.servers.hosting.com:8443/features Please check the proxy is configured and running on the host.
There's a bug in the Foreman setup that's causing settings to be initialised to zero, specifically "proxy_request_timeout" so there's a zero millisecond timeout (http://stackoverflow.com/questions/27390129/foreman-1-7-install-error-on-ubuntu-14-04 also).
I was hoping it might be the same as #7353 which I aim to ship in 1.7.1, but I'm not certain yet.
Updated by Anonymous almost 10 years ago
- File production.log production.log added
I'm not sure if this is the same thing any more or not, but trying to install 1.7.1 on a brand new Ubuntu 14.04 box gives me this from the installer:
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[c-u14-puppet1.servers.barkleyhosting.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[c-u14-puppet1.servers.barkleyhosting.com]: Failed to call refresh: missing param 'id' in parameters
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[c-u14-puppet1.servers.barkleyhosting.com]: missing param 'id' in parameters
Foreman does start, but I cannot add the machine as a smart proxy. I get:
Unable to communicate with the proxy: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([RestClient::Forbidden]: 403 Forbidden) for proxy https://c-u14-puppet1.servers.barkleyhosting.com:8443/features
Please check the proxy is configured and running on the host.
Here's the production.log as well.
Updated by Dominic Cleal almost 10 years ago
Nick Walke wrote:
Unable to communicate with the proxy: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([RestClient::Forbidden]: 403 Forbidden) for proxy https://c-u14-puppet1.servers.barkleyhosting.com:8443/features
Forbidden indicates the proxy is refusing it - usually this is because reverse DNS isn't matching. Check /var/log/foreman-proxy/proxy.log for messages saying why it's denied, and compare it against /etc/foreman-proxy/settings.yml. You can override the permitted hostnames with --foreman-proxy-trusted-hosts=foo.example.com
, or change reverse DNS.
Especially on Ubuntu, the 127.0.1.1 /etc/hosts entry can cause reverse resolution problems.
Updated by Anonymous almost 10 years ago
Ah. I had to change the proxy settings to allow localhost.localdomain. Strange. It seems to be functioning now.
Updated by Lukas Zapletal over 9 years ago
- Subject changed from Request timeout when registering smart proxy during installation to Request timeout when registering smart proxy during installation due tu proxy_request_timeout=0
- Bugzilla link set to 1224212
For the record, we just experienced this with Satellite 6.1 ga build. Known workaround is:
foreman-rake config -- -k proxy_request_timeout -v 99
It looks like this happens without Katello plugin if I read this correctly. Race condition? How is possible to get the setting to zero when we create and update it in a single transaction (app/models/setting/general.rb)?