Foreman 3.17 Upgrade, HTTP 405 for unattended/built upon Host Registration

Problem:

After upgrading from Foreman 3.16 → Foreman 3.17, attempts to register a host fail (sort of). Example:

(0) [11:19:36] [root@hostname:/home/user]
# set -o pipefail && curl --silent --show-error  --insecure 'https://foreman.domain.com/register?download_utility=curl&force=true&hostgroup_id=14&location_id=2&organization_id=1&update_packages=false' --header 'Authorization: Bearer <token>' | bash
#
# Running registration
#
Unregistering from: foreman.domain.com:443/rhsm
System has been unregistered.
All local data removed
subscription-manager is already installed!
The system has been registered with ID: 1ea581ad-d2d3-4e26-9a46-541222becef9
The registered system name is: hostname.domain.com
# Running [hostname.domain.com] host initial configuration
/sbin/restorecon
Refreshing subscription data
All local data refreshed
Successfully updated the system facts.
ERROR: Host [hostname.domain.com] configured, but failed to report status to Foreman.
Host initialization script failed, see the logs for more information.
You can access the script source by running 'cat /root/registration_host_init.sh'

The error appears to occur on this step of the script:

/usr/bin/curl -o /dev/null -H 'Content-Type: text/plain' --fail --noproxy \* --silent '``http://foreman.domain.com/unattended/built``'

If I run the command without the --silent, the result is:

# /usr/bin/curl -o /dev/null -H 'Content-Type: text/plain' --fail --noproxy \* 'http://foreman.domain.com/unattended/built'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 405

Expected outcome:

Host registration succeeds without errors.

Foreman and Proxy versions:

foreman.domain.com Dynflow, Ansible, Pulpcore, Script, Shellhooks, DNS, Logs, Realm, DHCP, and TFTP 3.17.0

Foreman and Proxy plugin versions:

foreman-tasks Ivan Nečas 11.0.6
foreman_ansible Daniel Lobato Garcia 17.0.2
foreman_remote_execution Foreman Remote Execution team 16.3.1
foreman_webhooks Timo Goebel 4.0.2
foreman_xen Pavel Nemirovsky, Michal Piotrowski, and Avi Israeli 1.0.2
katello N/A 4.19.0.1

Distribution and version:

OS: Rocky Linux release 9.7 (Blue Onyx)

Other relevant data:

Relevant production.log output:

2025-12-11T12:02:13 [I|app|dc87ee7d] Started GET "/register?download_utility=curl&force=true&hostgroup_id=67&location_id=2&organization_id=1&update_packages=false" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:13 -0800
2025-12-11T12:02:13 [I|app|dc87ee7d] Processing by Api::V2::RegistrationController#global as */*
2025-12-11T12:02:13 [I|app|dc87ee7d]   Parameters: {"download_utility"=>"curl", "force"=>"true", "hostgroup_id"=>"67", "location_id"=>"2", "organization_id"=>"1", "update_packages"=>"false"}
2025-12-11T12:02:13 [I|app|dc87ee7d] Authorized user user(User Name)
2025-12-11T12:02:13 [W|app|dc87ee7d] Scoped order is ignored, it's forced to be batch order.
2025-12-11T12:02:13 [I|app|dc87ee7d]   Rendered text template (Duration: 0.0ms | Allocations: 1)
2025-12-11T12:02:13 [I|app|dc87ee7d] Completed 200 OK in 148ms (Views: 0.5ms | ActiveRecord: 20.4ms | Allocations: 92570)
2025-12-11T12:02:13 [I|app|bbcc1936] Started DELETE "/rhsm/consumers/6aa73573-98f6-477f-9103-96ae212cb65a" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:13 -0800
2025-12-11T12:02:13 [I|app|bbcc1936] Processing by Katello::Api::Rhsm::CandlepinProxiesController#consumer_destroy as JSON
2025-12-11T12:02:13 [I|app|bbcc1936]   Parameters: {"id"=>"6aa73573-98f6-477f-9103-96ae212cb65a"}
2025-12-11T12:02:13 [I|aud|bbcc1936] Katello::Host::SubscriptionFacet (85) destroy event on host_id 9
2025-12-11T12:02:13 [I|aud|bbcc1936] Katello::Host::SubscriptionFacet (85) destroy event on uuid 6aa73573-98f6-477f-9103-96ae212cb65a
2025-12-11T12:02:13 [I|aud|bbcc1936] Katello::Host::SubscriptionFacet (85) destroy event on service_level 
2025-12-11T12:02:13 [I|aud|bbcc1936] Katello::Host::SubscriptionFacet (85) destroy event on release_version 
2025-12-11T12:02:13 [I|aud|bbcc1936] Katello::Host::SubscriptionFacet (85) destroy event on registered_at 2025-12-11 19:58:29 UTC
2025-12-11T12:02:13 [I|aud|bbcc1936] Katello::Host::SubscriptionFacet (85) destroy event on registered_through foreman.domain.com
2025-12-11T12:02:13 [I|aud|bbcc1936] Katello::Host::SubscriptionFacet (85) destroy event on user_id 
2025-12-11T12:02:13 [I|aud|bbcc1936] Katello::Host::SubscriptionFacet (85) destroy event on hypervisor false
2025-12-11T12:02:13 [I|aud|bbcc1936] Katello::Host::SubscriptionFacet (85) destroy event on hypervisor_host_id 
2025-12-11T12:02:13 [I|aud|bbcc1936] Katello::Host::SubscriptionFacet (85) destroy event on purpose_usage 
2025-12-11T12:02:13 [I|aud|bbcc1936] Katello::Host::SubscriptionFacet (85) destroy event on purpose_role 
2025-12-11T12:02:13 [I|aud|bbcc1936] Katello::Host::SubscriptionFacet (85) destroy event on dmi_uuid 66A82976-D401-7E5A-407F-D0758B5C3C8C
2025-12-11T12:02:13 [I|aud|bbcc1936] Katello::Host::SubscriptionFacet (85) destroy event on convert2rhel_through_foreman 
2025-12-11T12:02:13 [I|aud|bbcc1936] Katello::Host::SubscriptionFacet (85) destroy event on pool_ids []
2025-12-11T12:02:13 [I|aud|bbcc1936] Katello::Host::ContentFacet (9) update event on uuid 6aa73573-98f6-477f-9103-96ae212cb65a, 
2025-12-11T12:02:13 [E|app|bbcc1936] RestClient::Gone: Katello::Resources::Candlepin::Consumer: 410 Gone {"displayMessage":"Unit 6aa73573-98f6-477f-9103-96ae212cb65a has been deleted","requestUuid":"de63b73a-2a9a-4d95-984d-f32eaedb7f96","deletedId":"6aa73573-98f6-477f-9103-96ae212cb65a"} (PUT /candlepin/consumers/6aa73573-98f6-477f-9103-96ae212cb65a)
 bbcc1936 | Body: {"displayMessage":"Unit 6aa73573-98f6-477f-9103-96ae212cb65a has been deleted","requestUuid":"de63b73a-2a9a-4d95-984d-f32eaedb7f96","deletedId":"6aa73573-98f6-477f-9103-96ae212cb65a"}
 bbcc1936 | 
2025-12-11T12:02:13 [E|app|bbcc1936] /usr/share/gems/gems/katello-4.19.0.1/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb:227:in `block in consumer_destroy'
2025-12-11T12:02:13 [I|app|bbcc1936]   Rendered text template (Duration: 0.0ms | Allocations: 1)
2025-12-11T12:02:13 [I|app|bbcc1936] Completed 410 Gone in 317ms (Views: 0.5ms | ActiveRecord: 56.3ms | Allocations: 46336)
2025-12-11T12:02:13 [I|app|fdd178ae] Started GET "/rhsm/status" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:13 -0800
2025-12-11T12:02:13 [I|app|fdd178ae] Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON
2025-12-11T12:02:14 [I|app|fdd178ae] Completed 200 OK in 23ms (Views: 0.3ms | ActiveRecord: 2.7ms | Allocations: 5211)
2025-12-11T12:02:14 [I|app|7f7b629e] Started GET "/rhsm/status" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:14 -0800
2025-12-11T12:02:14 [I|app|7f7b629e] Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON
2025-12-11T12:02:14 [I|app|7f7b629e] Completed 200 OK in 23ms (Views: 0.3ms | ActiveRecord: 3.3ms | Allocations: 5201)
2025-12-11T12:02:17 [I|app|20d5170b] Started GET "/rhsm/status" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:17 -0800
2025-12-11T12:02:17 [I|app|20d5170b] Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON
2025-12-11T12:02:17 [I|app|20d5170b] Completed 200 OK in 21ms (Views: 0.3ms | ActiveRecord: 1.6ms | Allocations: 5210)
2025-12-11T12:02:17 [I|app|e1dd9180] Started GET "/notification_recipients" for fd00::ffff:c0a8:d1 at 2025-12-11 12:02:17 -0800
2025-12-11T12:02:17 [I|app|e1dd9180] Processing by NotificationRecipientsController#index as JSON
2025-12-11T12:02:17 [I|app|e1dd9180] Completed 200 OK in 6ms (Views: 0.1ms | ActiveRecord: 0.9ms | Allocations: 2162)
2025-12-11T12:02:18 [I|app|d12c75ed] Started GET "/rhsm/" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:18 -0800
2025-12-11T12:02:18 [I|app|d12c75ed] Processing by Katello::Api::V2::RootController#rhsm_resource_list as JSON
2025-12-11T12:02:18 [I|app|d12c75ed]   Parameters: {"root"=>{}}
2025-12-11T12:02:18 [I|app|d12c75ed] Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 3.7ms | Allocations: 1512)
2025-12-11T12:02:18 [I|app|e09124db] Started POST "/rhsm/consumers?owner=ORG-DOMAIN_COM&activation_keys=AK-AK_KEY" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:18 -0800
2025-12-11T12:02:18 [I|app|e09124db] Processing by Katello::Api::Rhsm::CandlepinProxiesController#consumer_activate as JSON
2025-12-11T12:02:18 [I|app|e09124db]   Parameters: {"type"=>"system", "name"=>"hostname.domain.com", "facts"=>"[FILTERED]", "contentTags"=>[], "role"=>"", "addOns"=>[], "usage"=>"", "serviceLevel"=>"", "owner"=>"ORG-DOMAIN_COM", "activation_keys"=>"AK-AK_KEY"}
2025-12-11T12:02:19 [I|app|e09124db] Processed 1 tasks from queue 'Host::Managed Main', completed 1/1
2025-12-11T12:02:19 [I|app|e09124db] generating new uuid
2025-12-11T12:02:19 [I|aud|e09124db] Katello::Host::ContentFacet (9) update event on uuid , 93656799-0639-43a8-864d-62e3fc07a3f2
2025-12-11T12:02:19 [I|aud|e09124db] Katello::Host::SubscriptionFacet (86) create event on host_id 9
2025-12-11T12:02:19 [I|aud|e09124db] Katello::Host::SubscriptionFacet (86) create event on uuid 93656799-0639-43a8-864d-62e3fc07a3f2
2025-12-11T12:02:19 [I|aud|e09124db] Katello::Host::SubscriptionFacet (86) create event on service_level 
2025-12-11T12:02:19 [I|aud|e09124db] Katello::Host::SubscriptionFacet (86) create event on release_version 
2025-12-11T12:02:19 [I|aud|e09124db] Katello::Host::SubscriptionFacet (86) create event on registered_at 2024-04-26 20:20:54 UTC
2025-12-11T12:02:19 [I|aud|e09124db] Katello::Host::SubscriptionFacet (86) create event on registered_through 
2025-12-11T12:02:19 [I|aud|e09124db] Katello::Host::SubscriptionFacet (86) create event on user_id 
2025-12-11T12:02:19 [I|aud|e09124db] Katello::Host::SubscriptionFacet (86) create event on hypervisor false
2025-12-11T12:02:19 [I|aud|e09124db] Katello::Host::SubscriptionFacet (86) create event on hypervisor_host_id 
2025-12-11T12:02:19 [I|aud|e09124db] Katello::Host::SubscriptionFacet (86) create event on purpose_usage 
2025-12-11T12:02:19 [I|aud|e09124db] Katello::Host::SubscriptionFacet (86) create event on purpose_role 
2025-12-11T12:02:19 [I|aud|e09124db] Katello::Host::SubscriptionFacet (86) create event on dmi_uuid 66A82976-D401-7E5A-407F-D0758B5C3C8C
2025-12-11T12:02:19 [I|aud|e09124db] Katello::Host::SubscriptionFacet (86) create event on convert2rhel_through_foreman 
2025-12-11T12:02:19 [I|aud|e09124db] Katello::Host::SubscriptionFacet (86) create event on pool_ids []
2025-12-11T12:02:22 [I|app|e09124db] Import facts for 'hostname.domain.com' completed. Added: 167, Updated: 0, Deleted 0 facts
2025-12-11T12:02:22 [I|aud|e09124db] Host::Base (9) update event on last_compile 2025-12-11 19:58:35 UTC, 2025-12-11 20:02:21 UTC
2025-12-11T12:02:22 [I|app|e09124db] ForemanWebhooks::EventSubscriber: host_facts_updated.event.foreman event received
2025-12-11T12:02:22 [I|aud|e09124db] Katello::Host::SubscriptionFacet (86) update event on registered_at 2024-04-26 20:20:54 UTC, 2025-12-11 20:02:19 UTC
2025-12-11T12:02:22 [I|aud|e09124db] Host::Base (9) update event on global_status 0, 1
2025-12-11T12:02:22 [I|app|e09124db] ForemanWebhooks::EventSubscriber: status_changed.event.foreman event received
2025-12-11T12:02:22 [I|aud|e09124db] Katello::Host::SubscriptionFacet (86) update event on registered_through , foreman.domain.com
2025-12-11T12:02:22 [I|app|e09124db] Completed 200 OK in 3763ms (Views: 1.5ms | ActiveRecord: 261.4ms | Allocations: 2078779)
2025-12-11T12:02:22 [I|app|6fba545c] Started GET "/rhsm/status" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:22 -0800
2025-12-11T12:02:22 [I|app|6fba545c] Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON
2025-12-11T12:02:22 [I|app|6fba545c] Completed 200 OK in 21ms (Views: 0.3ms | ActiveRecord: 1.1ms | Allocations: 5209)
2025-12-11T12:02:22 [I|app|537feff3] Started GET "/rhsm/consumers/93656799-0639-43a8-864d-62e3fc07a3f2/certificates/serials" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:22 -0800
2025-12-11T12:02:22 [I|app|537feff3] Processing by Katello::Api::Rhsm::CandlepinProxiesController#serials as JSON
2025-12-11T12:02:22 [I|app|537feff3]   Parameters: {"id"=>"93656799-0639-43a8-864d-62e3fc07a3f2"}
2025-12-11T12:02:22 [I|app|537feff3] Completed 200 OK in 127ms (Views: 0.3ms | ActiveRecord: 4.0ms | Allocations: 6350)
2025-12-11T12:02:22 [I|app|05b809d0] Started GET "/rhsm/consumers/93656799-0639-43a8-864d-62e3fc07a3f2/certificates?serials=4302745033081752697" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:22 -0800
2025-12-11T12:02:22 [I|app|05b809d0] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2025-12-11T12:02:22 [I|app|05b809d0]   Parameters: {"serials"=>"4302745033081752697", "id"=>"93656799-0639-43a8-864d-62e3fc07a3f2"}
2025-12-11T12:02:22 [I|app|05b809d0] Completed 200 OK in 28ms (Views: 0.2ms | ActiveRecord: 1.9ms | Allocations: 5574)
2025-12-11T12:02:23 [I|app|2c884044] Started GET "/rhsm/status" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:23 -0800
2025-12-11T12:02:23 [I|app|2c884044] Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON
2025-12-11T12:02:23 [I|app|2c884044] Completed 200 OK in 21ms (Views: 0.3ms | ActiveRecord: 1.9ms | Allocations: 5201)
2025-12-11T12:02:23 [I|app|7dd907b4] Started GET "/rhsm/consumers/93656799-0639-43a8-864d-62e3fc07a3f2/accessible_content" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:23 -0800
2025-12-11T12:02:23 [I|app|7dd907b4] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2025-12-11T12:02:23 [I|app|7dd907b4]   Parameters: {"id"=>"93656799-0639-43a8-864d-62e3fc07a3f2"}
2025-12-11T12:02:23 [I|app|7dd907b4] Completed 200 OK in 29ms (Views: 0.2ms | ActiveRecord: 2.6ms | Allocations: 5444)
2025-12-11T12:02:23 [I|app|06c66882] Started GET "/rhsm/consumers/93656799-0639-43a8-864d-62e3fc07a3f2/content_overrides" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:23 -0800
2025-12-11T12:02:23 [I|app|06c66882] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2025-12-11T12:02:23 [I|app|06c66882]   Parameters: {"id"=>"93656799-0639-43a8-864d-62e3fc07a3f2"}
2025-12-11T12:02:23 [I|app|06c66882] Completed 200 OK in 42ms (Views: 0.2ms | ActiveRecord: 2.8ms | Allocations: 5447)
2025-12-11T12:02:24 [I|app|4bfba1d3] Started GET "/rhsm/consumers/93656799-0639-43a8-864d-62e3fc07a3f2/owner" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:24 -0800
2025-12-11T12:02:24 [I|app|4bfba1d3] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2025-12-11T12:02:24 [I|app|4bfba1d3]   Parameters: {"id"=>"93656799-0639-43a8-864d-62e3fc07a3f2"}
2025-12-11T12:02:24 [I|app|4bfba1d3] Completed 200 OK in 26ms (Views: 0.2ms | ActiveRecord: 1.7ms | Allocations: 5444)
2025-12-11T12:02:24 [I|app|47b2e23a] Started GET "/rhsm/consumers/93656799-0639-43a8-864d-62e3fc07a3f2" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:24 -0800
2025-12-11T12:02:24 [I|app|47b2e23a] Processing by Katello::Api::Rhsm::CandlepinProxiesController#consumer_show as JSON
2025-12-11T12:02:24 [I|app|47b2e23a]   Parameters: {"id"=>"93656799-0639-43a8-864d-62e3fc07a3f2"}
2025-12-11T12:02:24 [I|app|47b2e23a] Completed 200 OK in 31ms (Views: 1.4ms | ActiveRecord: 1.4ms | Allocations: 9402)
2025-12-11T12:02:24 [I|app|75f5b911] Started GET "/rhsm/status" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:24 -0800
2025-12-11T12:02:24 [I|app|75f5b911] Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON
2025-12-11T12:02:24 [I|app|75f5b911] Completed 200 OK in 21ms (Views: 0.3ms | ActiveRecord: 0.9ms | Allocations: 5205)
2025-12-11T12:02:24 [I|app|03a36ab8] Started POST "/register" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:24 -0800
2025-12-11T12:02:24 [I|app|03a36ab8] Processing by Api::V2::RegistrationController#host as */*
2025-12-11T12:02:24 [I|app|03a36ab8]   Parameters: {"uuid"=>"93656799-0639-43a8-864d-62e3fc07a3f2", "host"=>{"build"=>"false", "organization_id"=>"1", "location_id"=>"2", "hostgroup_id"=>"67"}, "update_packages"=>"false"}
2025-12-11T12:02:24 [I|app|03a36ab8] Authorized user user(User Name)
2025-12-11T12:02:25 [I|app|62d60354] Started GET "/rhsm/status" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:25 -0800
2025-12-11T12:02:25 [I|app|62d60354] Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON
2025-12-11T12:02:25 [I|app|62d60354] Completed 200 OK in 23ms (Views: 0.3ms | ActiveRecord: 1.9ms | Allocations: 5414)
2025-12-11T12:02:25 [I|app|bef35b94] Started PUT "/rhsm/consumers/93656799-0639-43a8-864d-62e3fc07a3f2/profiles" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:25 -0800
2025-12-11T12:02:25 [I|app|bef35b94] Processing by Katello::Api::Rhsm::CandlepinDynflowProxyController#upload_profiles as JSON
2025-12-11T12:02:25 [I|app|bef35b94]   Parameters: {"id"=>"93656799-0639-43a8-864d-62e3fc07a3f2"}
2025-12-11T12:02:25 [I|app|03a36ab8] Processed 1 tasks from queue 'Host::Managed Main', completed 1/1
2025-12-11T12:02:25 [I|aud|03a36ab8] Parameter (613) destroy event on name host_update_packages
2025-12-11T12:02:25 [I|aud|03a36ab8] Parameter (613) destroy event on value false
2025-12-11T12:02:25 [I|aud|03a36ab8] Parameter (613) destroy event on reference_id 9
2025-12-11T12:02:25 [I|aud|03a36ab8] Parameter (613) destroy event on hidden_value false
2025-12-11T12:02:25 [I|aud|03a36ab8] Parameter (613) destroy event on key_type boolean
2025-12-11T12:02:25 [I|aud|03a36ab8] Parameter (614) create event on name host_update_packages
2025-12-11T12:02:25 [I|aud|03a36ab8] Parameter (614) create event on value false
2025-12-11T12:02:25 [I|aud|03a36ab8] Parameter (614) create event on reference_id 9
2025-12-11T12:02:25 [I|aud|03a36ab8] Parameter (614) create event on hidden_value false
2025-12-11T12:02:25 [I|aud|03a36ab8] Parameter (614) create event on key_type boolean
2025-12-11T12:02:25 [I|app|03a36ab8] ForemanWebhooks::EventSubscriber: host_updated.event.foreman event received
2025-12-11T12:02:25 [I|app|bef35b94] Completed 200 OK in 153ms (Views: 1.9ms | ActiveRecord: 58.6ms | Allocations: 66968)
2025-12-11T12:02:25 [I|app|03a36ab8]   Rendered text template (Duration: 0.0ms | Allocations: 1)
2025-12-11T12:02:25 [I|app|03a36ab8] Completed 200 OK in 916ms (Views: 0.6ms | ActiveRecord: 61.8ms | Allocations: 959942)
2025-12-11T12:02:25 [I|app|f41177ea] Started GET "/rhsm/consumers/93656799-0639-43a8-864d-62e3fc07a3f2/certificates/serials" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:25 -0800
2025-12-11T12:02:25 [I|app|f41177ea] Processing by Katello::Api::Rhsm::CandlepinProxiesController#serials as JSON
2025-12-11T12:02:25 [I|app|f41177ea]   Parameters: {"id"=>"93656799-0639-43a8-864d-62e3fc07a3f2"}
2025-12-11T12:02:25 [I|app|f41177ea] Completed 200 OK in 32ms (Views: 0.2ms | ActiveRecord: 5.0ms | Allocations: 6360)
2025-12-11T12:02:25 [I|app|81ce4e28] Started GET "/rhsm/status" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:25 -0800
2025-12-11T12:02:25 [I|app|81ce4e28] Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON
2025-12-11T12:02:25 [I|app|81ce4e28] Completed 200 OK in 21ms (Views: 0.4ms | ActiveRecord: 1.4ms | Allocations: 5214)
2025-12-11T12:02:25 [I|app|3fe4f1ba] Started GET "/rhsm/consumers/93656799-0639-43a8-864d-62e3fc07a3f2/accessible_content" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:25 -0800
2025-12-11T12:02:25 [I|app|3fe4f1ba] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2025-12-11T12:02:25 [I|app|3fe4f1ba]   Parameters: {"id"=>"93656799-0639-43a8-864d-62e3fc07a3f2"}
2025-12-11T12:02:25 [I|app|3fe4f1ba] Completed 304 Not Modified in 28ms (Views: 0.2ms | ActiveRecord: 1.6ms | Allocations: 5380)
2025-12-11T12:02:26 [I|app|a3191e6c] Started GET "/unattended/built" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:26 -0800
2025-12-11T12:02:26 [I|app|a3191e6c] Processing by UnattendedController#built as TEXT
2025-12-11T12:02:26 [I|app|a3191e6c] Completed 405 Method Not Allowed in 12ms (ActiveRecord: 3.3ms | Allocations: 3158)
2025-12-11T12:02:26 [I|app|100e9cd2] Started PUT "/rhsm/consumers/93656799-0639-43a8-864d-62e3fc07a3f2" for fd00::ffff:c0a8:37 at 2025-12-11 12:02:26 -0800
2025-12-11T12:02:26 [I|app|100e9cd2] Processing by Katello::Api::Rhsm::CandlepinProxiesController#facts as JSON
2025-12-11T12:02:26 [I|app|100e9cd2]   Parameters: {"facts"=>"[FILTERED]", "id"=>"93656799-0639-43a8-864d-62e3fc07a3f2"}
2025-12-11T12:02:26 [I|app|100e9cd2] Import facts for 'hostname.domain.com' completed. Added: 0, Updated: 1, Deleted 0 facts
2025-12-11T12:02:26 [I|aud|100e9cd2] Host::Base (9) update event on last_compile 2025-12-11 20:02:21 UTC, 2025-12-11 20:02:26 UTC
2025-12-11T12:02:26 [I|app|100e9cd2] ForemanWebhooks::EventSubscriber: host_facts_updated.event.foreman event received
2025-12-11T12:02:26 [I|app|100e9cd2] Completed 200 OK in 181ms (Views: 0.2ms | ActiveRecord: 33.5ms | Allocations: 53355)
2025-12-11T12:02:27 [I|bac|25894a45] Task {label: , execution_plan_id: fe8ac153-e838-4617-b7cc-334c8c7da6d9} state changed: pending 
2025-12-11T12:02:27 [I|bac|25894a45] Task {label: Actions::Katello::Applicability::Hosts::BulkGenerate, id: 84e780de-deb1-41f9-8487-15db1fbc3d8e, execution_plan_id: fe8ac153-e838-4617-b7cc-334c8c7da6d9} state changed: planning 
2025-12-11T12:02:27 [I|bac|25894a45] Task {label: Actions::Katello::Applicability::Hosts::BulkGenerate, id: 84e780de-deb1-41f9-8487-15db1fbc3d8e, execution_plan_id: fe8ac153-e838-4617-b7cc-334c8c7da6d9} state changed: planned 
2025-12-11T12:02:27 [I|app|25894a45] katello event handled success=true type=generate_host_applicability object_id=0 expired=false rescheduled=false duration=135.33
2025-12-11T12:02:27 [I|bac|25894a45] Task {label: Actions::Katello::Applicability::Hosts::BulkGenerate, id: 84e780de-deb1-41f9-8487-15db1fbc3d8e, execution_plan_id: fe8ac153-e838-4617-b7cc-334c8c7da6d9} state changed: running 
2025-12-11T12:02:27 [I|app|f39fd845] Started GET "/notification_recipients" for fd00::ffff:c0a8:d1 at 2025-12-11 12:02:27 -0800
2025-12-11T12:02:27 [I|app|f39fd845] Processing by NotificationRecipientsController#index as JSON
2025-12-11T12:02:27 [I|app|f39fd845] Completed 200 OK in 6ms (Views: 0.1ms | ActiveRecord: 0.9ms | Allocations: 2166)
2025-12-11T12:02:27 [I|aud|25894a45] Host::Base (9) update event on global_status 1, 0
2025-12-11T12:02:27 [I|app|25894a45] ForemanWebhooks::EventSubscriber: status_changed.event.foreman event received
2025-12-11T12:02:27 [I|bac|25894a45] Task {label: Actions::Katello::Applicability::Hosts::BulkGenerate, id: 84e780de-deb1-41f9-8487-15db1fbc3d8e, execution_plan_id: fe8ac153-e838-4617-b7cc-334c8c7da6d9} state changed: stopped  result: success

According to my reading of the code, /unattended/built checks that

  • the host is actually in build mode; or
  • the Setting “access_unattended_without_build” is set to true.

If neither of the above is true, it returns a 405 Method Not Allowed.

I’m guessing access_unattended_without_build is referring to the --foreman-unattended option in the installer? That’s currently set to “true” and the unattended URL is set to “UNDEF”:

/etc/foreman-installer/scenarios.d/katello-answers.yaml:

foreman:
  foreman_url: https://foreman.domain.com
  unattended: true
  unattended_url:
  apache: true
...

Nevermind, I see there’s the “Access unattended without build” setting under Settings. That was set to “No” and after changing to “Yes” hosts now register. Thank you!

1 Like