Project

General

Profile

Actions

Bug #18089

open

Foreman doesn't work if a proxy is down

Added by Davide Ferrari over 7 years ago. Updated over 7 years ago.

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

Description

If I have a configured foreman-proxy down (for maintenance for instance), then foreman logs

2017-01-16 11:43:35 [app] [W] Failed to generate external nodes for my-node.domain.tld
 | ProxyAPI::ProxyException: ERF12-9411 [ProxyAPI::ProxyException]: Unable to fetch public key ([Errno::ECONNREFUSED]: Connection refused - connect(2) for "foreman-proxy01.domain2.tld" port 8443) for proxy https://foreman-proxy01.domain2.tld:8443/ssh
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.2.2/app/lib/proxy_api/remote_execution_ssh.rb:11:in `rescue in pubkey'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.2.2/app/lib/proxy_api/remote_execution_ssh.rb:9:in `pubkey'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.2.2/app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb:15:in `update_pubkey'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.2.2/app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb:10:in `pubkey'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.2.2/app/models/concerns/foreman_remote_execution/host_extensions.rb:61:in `block in remote_execution_ssh_keys'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.2.2/app/models/concerns/foreman_remote_execution/host_extensions.rb:61:in `map'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.2.2/app/models/concerns/foreman_remote_execution/host_extensions.rb:61:in `remote_execution_ssh_keys'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.2.2/app/models/concerns/foreman_remote_execution/host_extensions.rb:29:in `params_with_remote_execution'
 | /usr/share/foreman/app/models/host/managed.rb:417:in `info'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_noenv-0.0.7/app/models/concerns/foreman_noenv/host_managed_extensions.rb:10:in `info_with_env'
 | /usr/share/foreman/app/controllers/hosts_controller.rb:202:in `block in externalNodes'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal/mime_responds.rb:212:in `respond_to'
 | /usr/share/foreman/app/controllers/hosts_controller.rb:200:in `externalNodes'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/abstract_controller/base.rb:198:in `process_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal/rendering.rb:10:in `process_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:117:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:117:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in `around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:455:in `public_send'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:455:in `block in make_lambda'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:312:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:312:in `block in halting'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `block in around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
 | /usr/share/foreman/app/controllers/concerns/application_shared.rb:14:in `set_timezone'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:432:in `block in make_lambda'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:312:in `call'

that ultimately results in a

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed when searching for node my-node.domain.tld: Failed to find  my-node.domain.tld via exec: Execution of '/etc/puppet/node.rb  my-node.domain.tld' returned 1: 

everytime puppet is run on my-node.domain.tld (which doesn't even belong to foreman-proxy01.domain2.tld subnet!)

Actions #1

Updated by Dominic Cleal over 7 years ago

  • Project changed from Foreman to Foreman Remote Execution
  • Category deleted (Proxy gateway)
Actions

Also available in: Atom PDF