Proxmox Compute Resource: Token expires after 2h without automatic renew

**Problem: Access to Compute Resource Proxmox via Proxmox-GUI fails after 2h

It works again only after “systemctl restart proxmox”, “Token duration” is set to 360, so has no effect on the Proxmox resource.

https://MYFOREMAN.MYDOMAIN/compute_resources/1-Proxmox-XX
Property        Value
Provider        Proxmox
URL     https://##-IP-censored-##:8006/api2/json
Version         6.3-3.6.3
Token has expired?      false
Token expires on        << TWO HOURS FROM KNOW >>
Cluster nodes   ["proxmox-xx-01", "proxmox-xx-02"]

The Error occurs when accessing the resource after the two hours:

Oops, we’re sorry but something went wrong ERF42-5611 [Foreman::Exception]: Failed retrieving proxmox identity client caused by Expected([200, 204]) <=> Actual(401 Unauthorized) excon.error.response :body => “{“data”:null}” :cookies => :headers => { “Cache-Control” => “max-age=0” “Connection” => “close” “Content-Length” => “13” “Content-Type” => “application/json;charset=UTF-8” “Date” => “Tue, 09 Feb 2021 12:01:19 GMT” “Expires” => “Tue, 09 Feb 2021 12:01:19 GMT” “Pragma” => “no-cache” “Server” => “pve-api-daemon/3.0” } :host => “##-IP-censored-##” :local_address => “##-IP-censored-##” :local_port => 55004 :path => “/api2/json/access/ticket” :port => 8006 :reason_phrase => “authentication failure” :remote_ip => “##-IP-censored-##” :status => 401 :status_line => “HTTP/1.1 401 authentication failure\r\n”

**Expected outcome: access should simply work even after 2h

**Foreman and Proxy versions: 2.5.0-develop

Foreman and Proxy plugin versions:

Plugins:
  • foreman-tasks 3.0.3
  • foreman_ansible 6.1.1
  • foreman_dhcp_browser 0.0.8
  • foreman_fog_proxmox 0.12.4
  • foreman_remote_execution 4.2.2

**Distribution and version: Debian 10.8

Other relevant data:
2021-02-09T13:01:16 [I|app|9983e5ca] Started GET “/compute_resources/1-Proxmox-XX” for 127.0.0.1 at 2021-02-09 13:01:16 +0100
2021-02-09T13:01:16 [I|app|9983e5ca] Processing by ComputeResourcesController#show as HTML
2021-02-09T13:01:16 [I|app|9983e5ca] Parameters: {“id”=>“1-Proxmox-XX”}
2021-02-09T13:01:16 [I|app|9983e5ca] Rendering compute_resources/show.html.erb within layouts/application
2021-02-09T13:01:19 [E|app|9983e5ca] Excon::Error::Unauthorized Expected([200, 204]) <=> Actual(401 Unauthorized)
2021-02-09T13:01:19 [I|app|9983e5ca] Rendered vendor/ruby/2.5.0/gems/foreman_fog_proxmox-0.12.4/app/views/compute_resources/show/_proxmox.html.erb (Duration: 3048.0ms | Allocations: 8694)
2021-02-09T13:01:19 [I|app|9983e5ca] Rendered compute_resources/show.html.erb within layouts/application (Duration: 3057.8ms | Allocations: 15109)
2021-02-09T13:01:19 [W|app|9983e5ca] ERF42-5611 [Foreman::Exception]: Failed retrieving proxmox identity client caused by Expected([200, 204]) <=> Actual(401 Unauthorized)
9983e5ca | excon.error.response
9983e5ca | :body => “{“data”:null}”
9983e5ca | :cookies => [
9983e5ca | ]
9983e5ca | :headers => {
9983e5ca | “Cache-Control” => “max-age=0”
9983e5ca | “Connection” => “close”
9983e5ca | “Content-Length” => “13”
9983e5ca | “Content-Type” => “application/json;charset=UTF-8”
9983e5ca | “Date” => “Tue, 09 Feb 2021 12:01:19 GMT”
9983e5ca | “Expires” => “Tue, 09 Feb 2021 12:01:19 GMT”
9983e5ca | “Pragma” => “no-cache”
9983e5ca | “Server” => “pve-api-daemon/3.0”
9983e5ca | }
9983e5ca | :host => “##-IP-censored-##”
9983e5ca | :local_address => “##-IP-censored-##”
9983e5ca | :local_port => 55004
9983e5ca | :path => “/api2/json/access/ticket”
9983e5ca | :port => 8006
9983e5ca | :reason_phrase => “authentication failure”
9983e5ca | :remote_ip => “##-IP-censored-##”
9983e5ca | :status => 401
9983e5ca | :status_line => “HTTP/1.1 401 authentication failure\r\n”
9983e5ca |
2021-02-09T13:01:19 [I|app|9983e5ca] Backtrace for ‘ERF42-5611 [Foreman::Exception]: Failed retrieving proxmox identity client caused by Expected([200, 204]) <=> Actual(401 Unauthorized)
9983e5ca | excon.error.response
9983e5ca | :body => “{“data”:null}”
9983e5ca | :cookies => [
9983e5ca | ]
9983e5ca | :headers => {
9983e5ca | “Cache-Control” => “max-age=0”
9983e5ca | “Connection” => “close”
9983e5ca | “Content-Length” => “13”
9983e5ca | “Content-Type” => “application/json;charset=UTF-8”
9983e5ca | “Date” => “Tue, 09 Feb 2021 12:01:19 GMT”
9983e5ca | “Expires” => “Tue, 09 Feb 2021 12:01:19 GMT”
9983e5ca | “Pragma” => “no-cache”
9983e5ca | “Server” => “pve-api-daemon/3.0”
9983e5ca | }
9983e5ca | :host => “##-IP-censored-##”
9983e5ca | :local_address => “##-IP-censored-##”
9983e5ca | :local_port => 55004
9983e5ca | :path => “/api2/json/access/ticket”
9983e5ca | :port => 8006
9983e5ca | :reason_phrase => “authentication failure”
9983e5ca | :remote_ip => “##-IP-censored-##”
9983e5ca | :status => 401
9983e5ca | :status_line => “HTTP/1.1 401 authentication failure\r\n”
9983e5ca | ’ error (ActionView::Template::Error): ERF42-5611 [Foreman::Exception]: Failed retrieving proxmox identity client caused by Expected([200, 204]) <=> Actual(401 Unauthorized)
9983e5ca | excon.error.response
9983e5ca | :body => “{“data”:null}”
9983e5ca | :cookies => [
9983e5ca | ]
9983e5ca | :headers => {
9983e5ca | “Cache-Control” => “max-age=0”
9983e5ca | “Connection” => “close”
9983e5ca | “Content-Length” => “13”
9983e5ca | “Content-Type” => “application/json;charset=UTF-8”
9983e5ca | “Date” => “Tue, 09 Feb 2021 12:01:19 GMT”
9983e5ca | “Expires” => “Tue, 09 Feb 2021 12:01:19 GMT”
9983e5ca | “Pragma” => “no-cache”
9983e5ca | “Server” => “pve-api-daemon/3.0”
9983e5ca | }
9983e5ca | :host => “##-IP-censored-##”
9983e5ca | :local_address => “##-IP-censored-##”
9983e5ca | :local_port => 55004
9983e5ca | :path => “/api2/json/access/ticket”
9983e5ca | :port => 8006
9983e5ca | :reason_phrase => “authentication failure”
9983e5ca | :remote_ip => “##-IP-censored-##”
9983e5ca | :status => 401
9983e5ca | :status_line => “HTTP/1.1 401 authentication failure\r\n”
9983e5ca |
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_fog_proxmox-0.12.4/app/models/foreman_fog_proxmox/proxmox.rb:119:in rescue in identity_client' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_fog_proxmox-0.12.4/app/models/foreman_fog_proxmox/proxmox.rb:115:in identity_client’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_fog_proxmox-0.12.4/app/models/foreman_fog_proxmox/proxmox_version.rb:32:in version' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_fog_proxmox-0.12.4/app/views/compute_resources/show/_proxmox.html.erb:24:in _10175489ba1a893919cca49687438c7c’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/base.rb:274:in _run' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/template.rb:185:in block in render’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:182:in instrument' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/template.rb:385:in instrument_render_template’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/template.rb:183:in render' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/deface-1.5.3/lib/deface/action_view_extensions.rb:43:in render’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/renderer/partial_renderer.rb:357:in block in render_partial' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/renderer/abstract_renderer.rb:88:in block in instrument’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:180:in block in instrument' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/notifications/instrumenter.rb:24:in instrument’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:180:in instrument' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/renderer/abstract_renderer.rb:87:in instrument’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/renderer/partial_renderer.rb:346:in render_partial' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/renderer/partial_renderer.rb:317:in render’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/renderer/renderer.rb:65:in render_partial_to_object' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/renderer/renderer.rb:53:in render_partial’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/helpers/rendering_helper.rb:38:in render' 9983e5ca | /usr/share/foreman/app/views/compute_resources/show.html.erb:42:in _a66f0920cf67eeedec936189aa35ddfd’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/base.rb:274:in _run' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/template.rb:185:in block in render’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:182:in instrument' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/template.rb:385:in instrument_render_template’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/template.rb:183:in render' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/deface-1.5.3/lib/deface/action_view_extensions.rb:43:in render’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/renderer/template_renderer.rb:58:in block (2 levels) in render_template' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/renderer/abstract_renderer.rb:88:in block in instrument’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:180:in block in instrument' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/notifications/instrumenter.rb:24:in instrument’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:180:in instrument' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/renderer/abstract_renderer.rb:87:in instrument’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/renderer/template_renderer.rb:57:in block in render_template' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/renderer/template_renderer.rb:65:in render_with_layout’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/renderer/template_renderer.rb:56:in render_template' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/renderer/template_renderer.rb:13:in render’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/renderer/renderer.rb:61:in render_template_to_object' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/renderer/renderer.rb:29:in render_to_object’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/rendering.rb:117:in block in _render_template' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/base.rb:304:in in_rendering_context’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/rendering.rb:116:in _render_template' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/streaming.rb:218:in _render_template’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/rendering.rb:103:in render_to_body' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/rendering.rb:52:in render_to_body’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/renderers.rb:142:in render_to_body' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/abstract_controller/rendering.rb:25:in render’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/rendering.rb:36:in render' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/instrumentation.rb:44:in block (2 levels) in render’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/core_ext/benchmark.rb:14:in block in ms' 9983e5ca | /usr/lib/ruby/2.5.0/benchmark.rb:308:in realtime’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/core_ext/benchmark.rb:14:in ms' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/instrumentation.rb:44:in block in render’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/instrumentation.rb:84:in cleanup_view_runtime' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/railties/controller_runtime.rb:34:in cleanup_view_runtime’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/instrumentation.rb:43:in render' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/implicit_render.rb:35:in default_render’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/basic_implicit_render.rb:6:in block in send_action' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/basic_implicit_render.rb:6:in tap’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/basic_implicit_render.rb:6:in send_action' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/abstract_controller/base.rb:195:in process_action’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/rendering.rb:30:in process_action' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/abstract_controller/callbacks.rb:42:in block in process_action’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:112:in block in run_callbacks' 9983e5ca | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in set_timezone’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:121:in block in run_callbacks' 9983e5ca | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in clear_thread’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:121:in block in run_callbacks' 9983e5ca | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in set_topbar_sweeper_controller’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:121:in block in run_callbacks' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/audited-4.10.0/lib/audited/sweeper.rb:14:in around’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:121:in block in run_callbacks' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/audited-4.10.0/lib/audited/sweeper.rb:14:in around’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:121:in block in run_callbacks' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:139:in run_callbacks’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/abstract_controller/callbacks.rb:41:in process_action' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/rescue.rb:22:in process_action’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/instrumentation.rb:33:in block in process_action' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:180:in block in instrument’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/notifications/instrumenter.rb:24:in instrument' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:180:in instrument’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/instrumentation.rb:32:in process_action' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/params_wrapper.rb:245:in process_action’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/railties/controller_runtime.rb:27:in process_action' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/abstract_controller/base.rb:136:in process’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/rendering.rb:39:in process' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal.rb:190:in dispatch’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal.rb:254:in dispatch' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/routing/route_set.rb:50:in dispatch’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/routing/route_set.rb:33:in serve' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/journey/router.rb:49:in block in serve’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/journey/router.rb:32:in each' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/journey/router.rb:32:in serve’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/routing/route_set.rb:834:in call' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-dsl-2.3.0/lib/apipie_dsl/static_dispatcher.rb:67:in call’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-rails-0.5.18/lib/apipie/static_dispatcher.rb:66:in call' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-rails-0.5.18/lib/apipie/extractor/recorder.rb:137:in call’
9983e5ca | /usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in call' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-rails-0.5.18/lib/apipie/middleware/checksum_in_headers.rb:27:in call’
9983e5ca | /usr/share/foreman/lib/foreman/middleware/catch_json_parse_errors.rb:9:in call' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15:in call’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/etag.rb:27:in call' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/conditional_get.rb:27:in call’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/head.rb:12:in call' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/http/content_security_policy.rb:18:in call’
9983e5ca | /usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in call' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in context’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in call' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/cookies.rb:648:in call’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/callbacks.rb:27:in block in call' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:101:in run_callbacks’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/callbacks.rb:26:in call' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in call’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/debug_exceptions.rb:32:in call' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/show_exceptions.rb:33:in call’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.4/lib/rails/rack/logger.rb:37:in call_app' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.4/lib/rails/rack/logger.rb:28:in call’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/sprockets-rails-3.2.2/lib/sprockets/rails/quiet_assets.rb:13:in call' 9983e5ca | /usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in call’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/remote_ip.rb:81:in call' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/request_id.rb:27:in call’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/method_override.rb:24:in call' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/runtime.rb:22:in call’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in call' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/executor.rb:14:in call’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/static.rb:126:in call' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in call’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/host_authorization.rb:76:in call' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/secure_headers-6.3.1/lib/secure_headers/middleware.rb:11:in call’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.4/lib/rails/engine.rb:527:in call' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.4/lib/rails/railtie.rb:190:in public_send’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.4/lib/rails/railtie.rb:190:in method_missing' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/urlmap.rb:74:in block in call’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in each' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in call’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/puma-5.2.0/lib/puma/configuration.rb:247:in call' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/puma-5.2.0/lib/puma/request.rb:76:in block in handle_request’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/puma-5.2.0/lib/puma/thread_pool.rb:337:in with_force_shutdown' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/puma-5.2.0/lib/puma/request.rb:75:in handle_request’
9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/puma-5.2.0/lib/puma/server.rb:432:in process_client' 9983e5ca | /usr/share/foreman/vendor/ruby/2.5.0/gems/puma-5.2.0/lib/puma/thread_pool.rb:145:in block in spawn_thread’
9983e5ca | /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-02-09T13:01:19 [I|app|9983e5ca] Rendering common/500.html.erb within layouts/application
2021-02-09T13:01:19 [I|app|9983e5ca] Rendered common/500.html.erb within layouts/application (Duration: 4.8ms | Allocations: 1068)
2021-02-09T13:01:19 [I|app|9983e5ca] Rendered layouts/_application_content.html.erb (Duration: 6.2ms | Allocations: 5663)
2021-02-09T13:01:19 [I|app|9983e5ca] Rendering layouts/base.html.erb
2021-02-09T13:01:19 [I|app|9983e5ca] Rendered layouts/base.html.erb (Duration: 9.5ms | Allocations: 6831)
2021-02-09T13:01:19 [I|app|9983e5ca] Completed 500 Internal Server Error in 3112ms (Views: 30.6ms | ActiveRecord: 4.1ms | Allocations: 39573)

I believe there is already a fix for this issue merged to master, that will be part of the next foreman_fog_proxmox release (whenever that will be).
Can you confirm if the following is the same issue?: Authentication fails after time without a reboot of Foreman · Issue #165 · theforeman/foreman_fog_proxmox · GitHub

Ok, thank you for the hint! That seems to be exactly the same, so I’m happy that there is a solution available with the next release.
I might try to test the master since plugins/nightly does not provide the current 0.14 but only 0.12.4-1:

# apt show ruby-foreman-fog-proxmox

Package: ruby-foreman-fog-proxmox
Version: 0.12.4-1
Priority: extra
Section: ruby
Maintainer: Tristan Robert tristan.robert.44@gmail.com
Installed-Size: 383 kB
Depends: bundler, foreman (>= 1.22.0~rc1), ruby-foreman-deface
Homepage: GitHub - theforeman/foreman_fog_proxmox: Foreman plugin to add Proxmox compute resource based on fog-proxmox gem
Download-Size: 347 kB
APT-Manual-Installed: yes
APT-Sources: http://deb.theforeman.org plugins/nightly amd64 Packages
Description: Foreman plugin that adds Proxmox VE compute resource using fog-proxmox
Foreman plugin adds Proxmox VE compute resource using fog-proxmox. It is compatible with Foreman 1.22+

Just a heads up: If you want to try using the master of foreman_fog_proxmox (GitHub - theforeman/foreman_fog_proxmox: Foreman plugin to add Proxmox compute resource based on fog-proxmox gem) you will also need the master of fog-proxmox (GitHub - fog/fog-proxmox: Fog module for Proxmox VE Platform).