Can't import Puppet classes after update

It seems like the Foreman app itself isn’t running if I’m interpreting that output correctly. Can you do a foreman-maintain service restart and try the rake task again?

I didn’t mention it, but I have already restarted foreman service after editing the rake task. (And just tried again right now)
In my opinion it’s the task which is not able to handle the katello check_ping because when running manually a hammer ping everything is ok:

# hammer ping
database:
    Status:          ok
    Server Response: Duration: 2ms
candlepin:
    Status:          ok
    Server Response: Duration: 23ms
candlepin_events:
    Status:          ok
    message:         0 Processed, 0 Failed
    Server Response: Duration: 0ms
candlepin_auth:
    Status:          ok
    Server Response: Duration: 21ms
katello_events:
    Status:          ok
    message:         0 Processed, 0 Failed
    Server Response: Duration: 0ms
pulp:
    Status:          ok
    Server Response: Duration: 75ms
pulp_auth:
    Status:          ok
    Server Response: Duration: 45ms
pulp3:
    Status:          ok
    Server Response: Duration: 43ms
foreman_tasks:
    Status:          ok
    Server Response: Duration: 4ms

I think we were talking about the correct_puppet_environments task, so although the thread you found spoke about pulp3_content_switchover what you should have done was (also) modify the former rake task. Sorry if I’ve misinterpreted as this thread is speaking about a number of issues!

Yes I have been trying many thigs to solve my problem
It seemed to me that the problem was up to the reimport.rake task because of this line in the error log

So I tried to do the trick in the reimport.rake

But with no luck until now…

I have same problem.
Recently , i have installed Foreman 2.3.3 and imported backup / configuration of old server ( Foreman 1.21 / puppetserver 5.3).

this server is running but i can’t import Puppet Class.
Here are logs from foreman-rake errors:fetch_log request_id=03540751

`/usr/share/foreman` is not writable.
Bundler will use `/tmp/bundler20210430-2509-l5eun62509' as your home directory temporarily.
processing by EnvironmentsController#import_environments as HTML
2021-04-30T13:53:26 [I|app|03540751]   Parameters: {"env"=>"integration", "proxy"=>"1-intsrvdpl-a2-smileandpay-int"}
2021-04-30T13:53:28 [I|app|03540751]   Rendering common/_puppetclasses_or_envs_changed.html.erb within layouts/application
2021-04-30T13:53:28 [I|app|03540751]   Rendered common/_puppetclasses_or_envs_changed.html.erb within layouts/application (Duration: 2.0ms | Allocations: 1584)
2021-04-30T13:53:28 [W|app|03540751] unnumbered(1) mixed with named
2021-04-30T13:53:28 [I|app|03540751] Backtrace for 'unnumbered(1) mixed with named' error (ActionView::Template::Error): unnumbered(1) mixed with named
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/fast_gettext-1.8.0/lib/fast_gettext/vendor/string.rb:70:in `%'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/fast_gettext-1.8.0/lib/fast_gettext/vendor/string.rb:70:in `%'
 03540751 | /usr/share/foreman/app/helpers/puppetclasses_and_environments_helper.rb:42:in `block in pretty_print'
 03540751 | /usr/share/foreman/app/helpers/puppetclasses_and_environments_helper.rb:37:in `map'
 03540751 | /usr/share/foreman/app/helpers/puppetclasses_and_environments_helper.rb:37:in `pretty_print'
 03540751 | /usr/share/foreman/app/helpers/puppetclasses_and_environments_helper.rb:12:in `class_update_text'
 03540751 | /usr/share/foreman/app/views/common/_puppetclasses_or_envs_changed.html.erb:50:in `block (3 levels) in _b064dcf8ffe20d03f4ac7f2dea296629'
 03540751 | /usr/share/foreman/app/views/common/_puppetclasses_or_envs_changed.html.erb:32:in `each'
 03540751 | /usr/share/foreman/app/views/common/_puppetclasses_or_envs_changed.html.erb:32:in `block (2 levels) in _b064dcf8ffe20d03f4ac7f2dea296629'
 03540751 | /usr/share/foreman/app/views/common/_puppetclasses_or_envs_changed.html.erb:30:in `each'
 03540751 | /usr/share/foreman/app/views/common/_puppetclasses_or_envs_changed.html.erb:30:in `block in _b064dcf8ffe20d03f4ac7f2dea296629'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/helpers/capture_helper.rb:45:in `block in capture'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/helpers/capture_helper.rb:209:in `with_output_buffer'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/helpers/capture_helper.rb:45:in `capture'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/helpers/form_tag_helper.rb:74:in `form_tag'
 03540751 | /usr/share/foreman/app/views/common/_puppetclasses_or_envs_changed.html.erb:2:in `_b064dcf8ffe20d03f4ac7f2dea296629'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/base.rb:274:in `_run'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/template.rb:185:in `block in render'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.5/lib/active_support/notifications.rb:182:in `instrument'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/template.rb:385:in `instrument_render_template'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/template.rb:183:in `render'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/deface-1.5.3/lib/deface/action_view_extensions.rb:43:in `render'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/renderer/template_renderer.rb:58:in `block (2 levels) in render_template'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/renderer/abstract_renderer.rb:88:in `block in instrument'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.5/lib/active_support/notifications.rb:180:in `block in instrument'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.5/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.5/lib/active_support/notifications.rb:180:in `instrument'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/renderer/abstract_renderer.rb:87:in `instrument'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/renderer/template_renderer.rb:57:in `block in render_template'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/renderer/template_renderer.rb:65:in `render_with_layout'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/renderer/template_renderer.rb:56:in `render_template'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/renderer/template_renderer.rb:13:in `render'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/renderer/renderer.rb:61:in `render_template_to_object'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/renderer/renderer.rb:29:in `render_to_object'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/rendering.rb:117:in `block in _render_template'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/base.rb:304:in `in_rendering_context'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/rendering.rb:116:in `_render_template'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_controller/metal/streaming.rb:218:in `_render_template'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/rendering.rb:103:in `render_to_body'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_controller/metal/rendering.rb:52:in `render_to_body'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_controller/metal/renderers.rb:142:in `render_to_body'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/abstract_controller/rendering.rb:25:in `render'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_controller/metal/rendering.rb:36:in `render'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.5/lib/active_support/core_ext/benchmark.rb:14:in `block in ms'
 03540751 | /usr/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.5/lib/active_support/core_ext/benchmark.rb:14:in `ms'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_controller/metal/instrumentation.rb:44:in `block in render'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.5/lib/active_record/railties/controller_runtime.rb:34:in `cleanup_view_runtime'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_controller/metal/instrumentation.rb:43:in `render'
 03540751 | /usr/share/foreman/app/controllers/concerns/foreman/controller/environments.rb:26:in `import_environments'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/abstract_controller/base.rb:195:in `process_action'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_controller/metal/rendering.rb:30:in `process_action'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.5/lib/active_support/callbacks.rb:112:in `block in run_callbacks'
 03540751 | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.5/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
 03540751 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.5/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
 03540751 | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.5/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/audited-4.10.0/lib/audited/sweeper.rb:14:in `around'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.5/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/audited-4.10.0/lib/audited/sweeper.rb:14:in `around'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.5/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.5/lib/active_support/callbacks.rb:139:in `run_callbacks'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/abstract_controller/callbacks.rb:41:in `process_action'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_controller/metal/rescue.rb:22:in `process_action'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.5/lib/active_support/notifications.rb:180:in `block in instrument'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.5/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.5/lib/active_support/notifications.rb:180:in `instrument'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.5/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/abstract_controller/base.rb:136:in `process'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.5/lib/action_view/rendering.rb:39:in `process'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_controller/metal.rb:190:in `dispatch'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_controller/metal.rb:254:in `dispatch'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_dispatch/routing/route_set.rb:33:in `serve'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_dispatch/journey/router.rb:49:in `block in serve'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_dispatch/journey/router.rb:32:in `each'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_dispatch/journey/router.rb:32:in `serve'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_dispatch/routing/route_set.rb:834:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-dsl-2.3.0/lib/apipie_dsl/static_dispatcher.rb:67:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-rails-0.5.18/lib/apipie/static_dispatcher.rb:66:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-rails-0.5.18/lib/apipie/extractor/recorder.rb:137:in `call'
 03540751 | /usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-rails-0.5.18/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
 03540751 | /usr/share/foreman/lib/foreman/middleware/catch_json_parse_errors.rb:9:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/etag.rb:27:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/conditional_get.rb:27:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/head.rb:12:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
 03540751 | /usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_dispatch/middleware/cookies.rb:648:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.5/lib/active_support/callbacks.rb:101:in `run_callbacks'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.5/lib/rails/rack/logger.rb:37:in `call_app'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.5/lib/rails/rack/logger.rb:28:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/sprockets-rails-3.2.2/lib/sprockets/rails/quiet_assets.rb:13:in `call'
 03540751 | /usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_dispatch/middleware/request_id.rb:27:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.5/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_dispatch/middleware/executor.rb:14:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_dispatch/middleware/static.rb:126:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_dispatch/middleware/host_authorization.rb:76:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/secure_headers-6.3.2/lib/secure_headers/middleware.rb:11:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.5/lib/rails/engine.rb:527:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.5/lib/rails/railtie.rb:190:in `public_send'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.5/lib/rails/railtie.rb:190:in `method_missing'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/urlmap.rb:74:in `block in call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in `each'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/puma-4.3.7/lib/puma/configuration.rb:228:in `call'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/puma-4.3.7/lib/puma/server.rb:713:in `handle_request'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/puma-4.3.7/lib/puma/server.rb:472:in `process_client'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/puma-4.3.7/lib/puma/server.rb:328:in `block in run'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/puma-4.3.7/lib/puma/thread_pool.rb:134:in `block in spawn_thread'
 03540751 | /usr/share/foreman/vendor/ruby/2.5.0/gems/logging-2.3.0/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2021-04-30T13:53:28 [I|app|03540751]   Rendering common/500.html.erb within layouts/application
2021-04-30T13:53:28 [I|app|03540751]   Rendered common/500.html.erb within layouts/application (Duration: 1.4ms | Allocations: 780)
2021-04-30T13:53:28 [I|app|03540751]   Rendered layouts/_application_content.html.erb (Duration: 2.4ms | Allocations: 5685)
2021-04-30T13:53:28 [I|app|03540751]   Rendering layouts/base.html.erb
2021-04-30T13:53:28 [I|app|03540751]   Rendered layouts/base.html.erb (Duration: 2.9ms | Allocations: 6932)
2021-04-30T13:53:28 [I|app|03540751] Completed 500 Internal Server Error in 1501ms (Views: 11.0ms | ActiveRecord: 45.4ms | Allocations: 307205)
Foreman version: 2.3.3
Plugins: 
foreman-tasks 3.0.5
foreman_bootdisk 17.0.2
foreman_cockpit 2.0.3
 foreman_discovery 16.3.4
 foreman_memcache 0.1.0
foreman_remote_execution 4.2.2
 foreman_setup 6.0.0
 foreman_statistics 1.0.0
foreman_templates 9.0.0

Hmmm, this is quite odd, as the line throwing the error hasn’t changed in 5 years.
Are you using Foreman in a non-English language? If so, can you try switching your locale to English and attempt to perform the import again?

Additionally, your issue is unrelated to what is described in this thread, i would suggest opening a new thread so it doesn’t get mixed up.

i m using Foreman in French Language. But i think the bug is due of a problem of linking between Puppet Class and environment.

I managed to fix in running this following command :

hammer --verbose proxy import-classes --id 1

Now , i can import Puppet Class by Foreman interface but all Puppet Class are linked at all environments. It’s not too bad for now

1 Like