Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-40496

Capsule sync fails with error Unable to update hosts 500 ISE for Capsule https://capsule.example.com:9090/container_gateway/update_hosts

XMLWordPrintable

    • Known Issue
    • Hide
      .Capsule sync fails due to a null value in UUID of a host

      When you attempt to sync Capsule in certain setups with an improperly registered host, the sync fails due to a null value in the `uuid` column of the `hosts` database table.
      To work around this problem, delete such host from Satellite and register it anew.
      As a result, the host UUID is correctly set, which resolves the sync failure.
      Show
      .Capsule sync fails due to a null value in UUID of a host When you attempt to sync Capsule in certain setups with an improperly registered host, the sync fails due to a null value in the `uuid` column of the `hosts` database table. To work around this problem, delete such host from Satellite and register it anew. As a result, the host UUID is correctly set, which resolves the sync failure.
    • Done
    • None

      After upgrading satellite and capsules to 6.18.0, Capsule sync fails with the following error:

       

      2025-11-19T07:17:32 [I|app|304ba691] Completed 202 Accepted in 28970ms (Views: 48.6ms | ActiveRecord: 662.5ms | Allocations: 1298819)
      2025-11-19T07:17:33 [I|bac|304ba691] Task {label: Actions::Katello::CapsuleContent::Sync, id: a9f98d90-7e04-4562-b613-b7431f2a8a94, execution_plan_id: af675f05-612d-4b0a-a5f5-fb9ce4863c83} state changed: running 
      2025-11-19T07:17:41 [E|bac|304ba691] ERF12-0457 [ProxyAPI::ProxyException]: Unable to update hosts ([RestClient::InternalServerError]: 500 Internal Server Error) for Capsule https://capsule.example.com:9090/container_gateway/update_hosts (ProxyAPI::ProxyException)
       304ba691 | /usr/share/gems/gems/katello-4.18.0.3/lib/proxy_api/container_gateway.rb:37:in `rescue in update_hosts'
       304ba691 | /usr/share/gems/gems/katello-4.18.0.3/lib/proxy_api/container_gateway.rb:32:in `update_hosts'
       304ba691 | /usr/share/gems/gems/katello-4.18.0.3/app/models/katello/concerns/smart_proxy_extensions.rb:251:in `update_container_gateway_hosts'
       304ba691 | /usr/share/gems/gems/katello-4.18.0.3/app/models/katello/concerns/smart_proxy_extensions.rb:238:in `sync_container_gateway'
       304ba691 | /usr/share/gems/gems/katello-4.18.0.3/app/lib/actions/katello/capsule_content/sync_capsule.rb:97:in `run'
       304ba691 | /usr/share/gems/gems/dynflow-1.9.3/lib/dynflow/action.rb:590:in `block (3 levels) in execute_run'
       304ba691 | /usr/share/gems/gems/dynflow-1.9.3/lib/dynflow/middleware/stack.rb:28:in `pass'

      On the capsule, we can see the following errors:

      In foreman-proxy/proxy.log:

       

      2025-11-19T18:17:34 304ba691 [I] Started PUT /container_gateway/repository_list/ 
      2025-11-19T18:17:34 304ba691 [I] Finished PUT /container_gateway/repository_list/ with 200 (78.07 ms)
      2025-11-19T18:17:34 304ba691 [I] Started GET /container_gateway/users 
      2025-11-19T18:17:34 304ba691 [I] Finished GET /container_gateway/users with 200 (1.46 ms)
      2025-11-19T18:17:34 304ba691 [I] Started PUT /container_gateway/update_hosts/ 
      2025-11-19T18:17:34 304ba691 [W] Error processing request '304ba691-0f1e-41aa-b6c8-1a97b290b35a: <Sequel::NotNullConstraintViolation>: PG::NotNullViolation: ERROR:  null value in column "uuid" of relation "hosts" violates not-null constraint
      DETAIL:  Failing row contains (107, null).
      /usr/share/gems/gems/sequel-5.95.1/lib/sequel/adapters/postgres.rb:171:in `exec'
      /usr/share/gems/gems/sequel-5.95.1/lib/sequel/adapters/postgres.rb:171:in `block in execute_query'
      /usr/share/gems/gems/sequel-5.95.1/lib/sequel/database/logging.rb:38:in `log_connection_yield'
      /usr/share/gems/gems/sequel-5.95.1/lib/sequel/adapters/postgres.rb:171:in `execute_query'
      /usr/share/gems/gems/sequel-5.95.1/lib/sequel/adapters/postgres.rb:159:in `block in execute'
      /usr/share/gems/gems/sequel-5.95.1/lib/sequel/adapters/postgres.rb:136:in `check_disconnect_errors'
      

      In postgres logs:

      2025-11-19 18:17:34 +06 ERROR:  null value in column "uuid" of relation "hosts" violates not-null constraint
      2025-11-19 18:17:34 +06 DETAIL:  Failing row contains (107, null).
      2025-11-19 18:17:34 +06 STATEMENT:  INSERT INTO "hosts" ("uuid") VALUES ('76eddb3b-b02b-484b-be46-8062c3a55737'), ('2d49f2a8-27eb-4496-9357-6da16bdaf5c8'), ('9d948537-156a-4451-a76e-de10d7f0402b'), ('49cdf206-52c5-44cb-8ec4-09a621717660'), ('5b9a1c2e-d1c5-4ebe-a910-1dfa81c0d03d'), ('bec186a9-d0d9-4f7c-8532-16aada1d689e'), ('29656313-da24-46a3-941a-a6538d01bf44'), ('69fe480b-dc03-4f19-a111-d56a17464370'), ('71a276c9-f870-42c3-b2c6-b36734bfcd14'), ('06dc43ab-3091-4887-a279-9b9915f5380a'), ('cc23bf64-380a-4a80-91c9-c9f4b001ac6b'), ('2d7e79ac-ed2b-42d0-b079-d675f08a208d'), ('876e0c67-813a-44c9-81da-0cc1e19d4ed5'), ('c6071874-ae5e-41cf-967f-6b9189860545'), ('7ec20d5e-e888-4d1d-a91c-ba2b43d08b48'), ('1eb4e763-56f3-413a-b86d-875f9db8c7c5'), (NULL), ('8a4df5f7-b7a9-4b80-9048-c24fd236078c'), ('0c90998e-3082-4b67-9a9c-6da9641a1fa9'), ('0931f443-a1e4-4b8a-aca8-2871f54970f8'), ('5284f38f-589c-4aff-9874-dd30ba40ffb2'), ('2b6e1350-65d1-4965-b045-2caeea284581'), ('189e3238-d2bb-486b-8517-9640ad435496'), ('7ed72c9a-4de4-4221-8799-e3a94ed14c29'), ('b964f8f1-04ff-4b80-a8f3-162632dd7b79'), ('9b30d41f-c03f-4fa5-835b-594a1c0902ea'), ('78abc1f8-696c-435a-b78a-169074060995'), ('e6f02c48-9113-4b41-ae5c-a9cafefbd217'), ('d298d898-e0e9-4e9b-aeec-d2c8c28a8477'), ('7fde4245-311c-4f89-a490-e49291a6f6b5'), ('5261898d-a9f5-45b8-ac75-79155aec8765'), ('5be3124f-7a8b-4e1f-b8ec-b98035c5ba0e'), ('3354663f-c461-45f2-8c6c-073158a8d4c0'), ('3aa4837c-18c4-49a7-aed4-264d5468eb5a'), ('7f086a55-9b50-4244-a4fb-a63908bb8293'), ('84d8cac4-5a28-4ec2-adad-4034cf64c1cd'), ('29b345c6-cf9d-4c1b-8580-d6520eac0553'), (NULL), ('b38804bd-6b28-4068-92da-562adab589b7'), ('186

      Additional Information:

      If executing this command on satellite i.e. 

      cat << EOF | foreman-rake console
      conf.echo = false
      SmartProxy.all.each do |sp|
        pp sp.name
        pp sp.content_facets.where(uuid: nil)
      end
      EOF

       

      Then in the output, under satellite and every capsule, some records should be displayed. And they would indicate the ID of hosts. If found any like that, Then re-register those hosts or else remove them from Satellite WebUI and that should allow syncing the capsule . 

      If the output indicates no such broken hosts, then the issue must have got resolved itself, and a subsequent capsule sync should not run into the same issue again.

              rhn-support-osousa Odilon Sousa
              satellite-jira-automation@redhat.com Satellite Jira-Automation
              Lena Ansorgová (zuansorg) Lena Ansorgová (zuansorg)
              Ian Ballou Ian Ballou
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: