Client registration failure with "integer out of range" error in Red Hat Satellite

Solution Verified - Updated

Environment

  • Red Hat Satellite
    • 6.15
    • 6.16
    • 6.17

Issue

  • Client failed to register during the registration process to the Satellite

    The system has been registered with ID: xxxx-xxxx-xxxx-xxxx-xxxx
    The registered system name is: xxxx-xxxx-xxxx-xxxx-xxxx
    PG::NumericValueOutOfRange: ERROR:  integer out of range
     (HTTP error code 500: Internal Server Error)
    

Resolution

  • This issue has been reported to the Red Hat Satellite Engineering team via This content is not included.SAT-35478 bug and is being actively investigated.

  • To fix the issue manually on the affected Red Hat Satellite server, proceed with the following steps:

    1. Ensure that a backup or VM snapshot exists for the affected Red Hat Satellite server, before proceeding further.

    2. Clear any paused tasks that might be present.

      # foreman-rake foreman_tasks:cleanup TASK_SEARCH='label ~ *' STATES='paused' VERBOSE=true
      
    3. Stop all Satellite services except postgresql

      # satellite-maintain service stop --exclude postgresql
      
    4. Run the commands to change the column and the sequence type to bigint

      # su - postgres -c "psql -d foreman -c 'ALTER TABLE katello_host_installed_packages ALTER COLUMN id TYPE bigint;'"
      # su - postgres -c "psql -d foreman -c 'ALTER SEQUENCE katello_host_installed_packages_id_seq  AS bigint;'"
      
    5. Restart Satellite

      # satellite-maintain service restart
      # sleep 20 & hammer ping 
      
  • Reach out to Red Hat Technical Support in case of any further questions or concerns.

For more KB articles/solutions related to Red Hat Satellite 6.x PostgreSQL-related Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x PostgreSQL-related Issues

Root Cause

  • It is because the id of katello_host_installed_packages table has reached the maximum integer limit.

Diagnostic Steps

  • Inspecting the sequence and table in concern, the following can be found in the foreman database.

    # su - postgres -c "psql -d foreman -c 'select max(id) from katello_host_installed_packages;'"
    max     
    ------------
    2147439559  <================
    (1 row)
    
  • The following traceback recurs a lot in /var/log/foreman/production.log:

    2025-07-08T15:36:20 [I|app|b25476bf] Started PUT "/rhsm/consumers/xxxx-xxxx-xxxx-xxxx-xxxx/profiles" for AAA.BBB.CCC.DDD at 2025-07-08 15:36:20 +0300
    2025-07-08T15:36:20 [I|app|b25476bf] Processing by Katello::Api::Rhsm::CandlepinDynflowProxyController#upload_profiles as JSON
    2025-07-08T15:36:20 [I|app|b25476bf]   Parameters: {"id"=>"xxxx-xxxx-xxxx-xxxx-xxxx"}
    2025-07-08T15:36:20 [E|app|b25476bf] ActiveRecord::RangeError: PG::NumericValueOutOfRange: ERROR:  integer out of range
     b25476bf | 
     b25476bf | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:49:in `exec'
     b25476bf | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:49:in `block (2 levels) in execute'
     b25476bf | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
     .
     .
     .
     b25476bf | /usr/share/gems/gems/puma-6.4.2/lib/puma/server.rb:245:in `block in run'
     b25476bf | /usr/share/gems/gems/puma-6.4.2/lib/puma/thread_pool.rb:155:in `block in spawn_thread'
     b25476bf | /usr/share/gems/gems/logging-2.3.1/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
    2025-07-08T15:36:20 [I|app|b25476bf] Completed 500 Internal Server Error in 117ms (Views: 0.2ms | ActiveRecord: 30.3ms | Allocations: 86711)
    
SBR
Product(s)
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.