Project

General

Profile

Actions

Support #23551

open

Error retrieving node foreman01: Net::HTTPPreconditionFailed

Added by Kenneth Skytthe about 6 years ago. Updated about 6 years ago.

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

Description

Hello.

After i upgraded from 1.6.2 to 1.7.0 my nodes cannot find it's definition no more.

When i run a agent test on one of my nodes i get the following error:

Foreman server info:

OS: Ubuntu 16.04
Ruby: 2.3.1p112

puppet agent --test

Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Error 500 on SERVER: Server Error: Failed to find elastics01 via exec: Execution of '/etc/puppetlabs/puppet/node.rb elastics01' returned 1:
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Failed when searching for node elastics01: Failed to find elastics01 via exec: Execution of '/etc/puppetlabs/puppet/node.rb elastics01' returned 1:
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

when i run:

/etc/puppetlabs/puppet/node.rb foreman01.flexgateway.int

/etc/puppetlabs/puppet/node.rb:383: warning: constant ::TimeoutError is deprecated
Error retrieving node foreman01.flexgateway.int: Net::HTTPPreconditionFailed
Check Foreman's /var/log/foreman/production.log for more information.

And my log is showing the following:

/etc/puppetlabs/puppet/node.rb foreman01

2018-05-09T14:28:07 fffaf9a6 [app] [I]   Rendering text template
2018-05-09T14:28:07 fffaf9a6 [app] [I]   Rendered text template (0.0ms)
2018-05-09T14:28:07 fffaf9a6 [app] [I] Completed 412 Precondition Failed in 230ms (Views: 0.7ms | ActiveRecord: 12.9ms)
2018-05-09T14:29:18 07723a53 [app] [I] Started GET "/node/foreman01?format=yml" for x.x.x.x at 2018-05-09 14:29:18 +0200
2018-05-09T14:29:18 07723a53 [app] [I] Processing by HostsController#externalNodes as YML
2018-05-09T14:29:18 07723a53 [app] [I]   Parameters: {"name"=>"foreman01"}
2018-05-09T14:29:18 07723a53 [app] [I] Current user: foreman_api_admin (administrator)
2018-05-09T14:29:19 07723a53 [app] [W] Failed to generate external nodes for foreman01
 | JSON::ParserError: 416: unexpected token at '{"module"=>"system", "period"=>"60s", "metricsets"=>["cpu", "load", "memory", "network", "process", "process_summary", "diskio"], "processes"=>[".*"], "process.include_top_n"=>{"by_cpu"=>5, "by_memory"=>5}}, {"module"=>"system", "period"=>"1m", "metricsets"=>["filesystem", "fsstat"], "processors"=>[{"drop_event.when.regexp"=>{"system.filesystem.mount_point"=>"^/(sys|cgroup|proc|dev|etc|host|lib)($|/)"}}]}, {"module"=>"system", "period"=>"15m", "metricsets"=>["uptime"]}]'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/json-2.1.0/lib/json/common.rb:156:in `parse'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/json-2.1.0/lib/json/common.rb:156:in `parse'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/json-2.1.0/lib/json/common.rb:335:in `load'
 | /usr/share/foreman/app/services/foreman/parameters/caster.rb:118:in `rescue in load_yaml_or_json'
 | /usr/share/foreman/app/services/foreman/parameters/caster.rb:115:in `load_yaml_or_json'
 | /usr/share/foreman/app/services/foreman/parameters/caster.rb:93:in `cast_array'
 | /usr/share/foreman/app/services/foreman/parameters/caster.rb:37:in `casted_value'
 | /usr/share/foreman/app/services/foreman/parameters/caster.rb:21:in `cast'
 | /usr/share/foreman/app/services/classification/classification_result.rb:53:in `type_cast'
 | /usr/share/foreman/app/services/classification/classification_result.rb:25:in `[]'
 | /usr/share/foreman/app/models/host_info_providers/puppet_info.rb:96:in `block in smart_class_params_for'
 | /usr/share/foreman/app/models/host_info_providers/puppet_info.rb:95:in `each'
 | /usr/share/foreman/app/models/host_info_providers/puppet_info.rb:95:in `smart_class_params_for'
 | /usr/share/foreman/app/models/host_info_providers/puppet_info.rb:25:in `block in puppetclass_parameters'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/relation/delegation.rb:39:in `each'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/relation/delegation.rb:39:in `each'
 | /usr/share/foreman/app/models/host_info_providers/puppet_info.rb:24:in `puppetclass_parameters'
 | /usr/share/foreman/app/models/host_info_providers/puppet_info.rb:87:in `classes_info_hash'
 | /usr/share/foreman/app/models/host_info_providers/puppet_info.rb:11:in `host_info'
 | /usr/share/foreman/app/models/concerns/host_info_extensions.rb:29:in `block in info'
 | /usr/share/foreman/app/models/concerns/host_info_extensions.rb:27:in `each'
 | /usr/share/foreman/app/models/concerns/host_info_extensions.rb:27:in `info'
 | /usr/share/foreman/app/controllers/hosts_controller.rb:206:in `block in externalNodes'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/mime_responds.rb:195:in `respond_to'
 | /usr/share/foreman/app/controllers/hosts_controller.rb:204:in `externalNodes'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:186:in `process_action'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/rendering.rb:30:in `process_action'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:108:in `block in run_callbacks'
 | /usr/share/foreman/app/controllers/concerns/application_shared.rb:15:in `set_timezone'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/audited-4.5.0/lib/audited/sweeper.rb:14:in `around'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/audited-4.5.0/lib/audited/sweeper.rb:14:in `around'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:135:in `run_callbacks'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:19:in `process_action'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/rescue.rb:20:in `process_action'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in `block in instrument'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in `instrument'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/params_wrapper.rb:252:in `process_action'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/railties/controller_runtime.rb:22:in `process_action'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:124:in `process'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.4/lib/action_view/rendering.rb:30:in `process'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:189:in `dispatch'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:253:in `dispatch'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:31:in `serve'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:50:in `block in serve'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:in `each'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:in `serve'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:834:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/apipie-rails-0.5.7/lib/apipie/static_dispatcher.rb:65:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/apipie-rails-0.5.7/lib/apipie/extractor/recorder.rb:136:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/apipie-rails-0.5.7/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
 | /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:8:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.4/lib/rack/etag.rb:25:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.4/lib/rack/conditional_get.rb:25:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.4/lib/rack/head.rb:12:in `call'
 | /usr/share/foreman/lib/middleware/session_safe_logging.rb:17:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.4/lib/rack/session/abstract/id.rb:232:in `context'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.4/lib/rack/session/abstract/id.rb:226:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/cookies.rb:613:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:26:in `block in call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:97:in `run_callbacks'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:24:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:36:in `call_app'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:26:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in `call'
 | /usr/share/foreman/lib/middleware/tagged_logging.rb:18:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/request_id.rb:25:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.4/lib/rack/method_override.rb:22:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.4/lib/rack/runtime.rb:22:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/executor.rb:12:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/static.rb:125:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.4/lib/rack/sendfile.rb:111:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/secure_headers-3.7.3/lib/secure_headers/middleware.rb:12:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `public_send'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `method_missing'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.4/lib/rack/urlmap.rb:68:in `block in call'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.4/lib/rack/urlmap.rb:53:in `each'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/rack-2.0.4/lib/rack/urlmap.rb:53:in `call'
 | /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:97:in `process_request'
 | /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:152:in `accept_and_process_next_request'
 | /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:113:in `main_loop'
 | /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:416:in `block (3 levels) in start_threads'
 | /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'

I followed the upgrade guide from: https://theforeman.org/manuals/1.17/index.html#3.6Upgrade

Note: i removed some internal ip's and FQDN

Actions #1

Updated by Kenneth Skytthe about 6 years ago

  • Subject changed from Error retrieving node foreman01.flexgateway.int: Net::HTTPPreconditionFailed to Error retrieving node foreman01: Net::HTTPPreconditionFailed
Actions

Also available in: Atom PDF