Project

General

Profile

Actions

Bug #8657

closed

Request timeout when registering smart proxy during installation due tu proxy_request_timeout=0

Added by Anonymous almost 10 years ago. Updated over 9 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Settings
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Tried using the Foreman Installer (following the 1.7 documentation) on a new Ubuntu 14.04 virtual machine. I selected the following options in the installer:
  1. Configure foreman
  2. Configure foreman_proxy
  3. Configure puppet
  4. Configure foreman_cli
  5. Configure foreman_plugin_bootdisk
  6. 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

foreman-installer.log foreman-installer.log 751 KB Anonymous, 12/10/2014 10:48 PM
production.log production.log 1.01 MB Anonymous, 12/12/2014 11:04 AM
production.log production.log 860 KB Anonymous, 01/21/2015 02:34 AM

Related issues 1 (0 open1 closed)

Related to Foreman - Bug #7579: Session reset after each page request, idle_timeout set to zeroResolved09/22/2014Actions
Actions #1

Updated by Anonymous almost 10 years ago

Guess I'm unable to edit an issue.

Actions #2

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.

Actions #3

Updated by Anonymous almost 10 years ago

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.

Actions #4

Updated by Dominic Cleal almost 10 years ago

  • Related to Bug #7579: Session reset after each page request, idle_timeout set to zero added
Actions #5

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.

Actions #6

Updated by Anonymous almost 10 years ago

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.

Actions #7

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.

Actions #8

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.

Actions #9

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)?

Actions #10

Updated by Dominic Cleal over 9 years ago

  • Status changed from New to Duplicate

Dupe of #7579.

Actions

Also available in: Atom PDF