Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Descriptionsthirugn@redhat.com
2019-10-03 18:54:24 UTC
Description of problem:
A Satellite running for many many years may run into integer out of range. This is rare but possible.
Version-Release number of selected component (if applicable):
Satellite 6.5.2
How reproducible:
Difficult to reproduce but happens very rarely at customer environments
Steps to Reproduce:
1. It is difficult to reproduce as a normal user, but can be reproduced easily with updating the table.
2. sudo su - postgres
psql foreman
ALTER SEQUENCE sessions_id_seq RESTART WITH 9223372036854775805;
3. Now, hit some api calls or hammer or UI.
Actual results:
curl -X GET -k -u admin:changeme https://satellite.example.com/api/v2/hosts
{
"error": {"message":"PG::NumericValueOutOfRange: ERROR: integer out of range\n: INSERT INTO \"sessions\" (\"session_id\", \"data\", \"created_at\", \"updated_at\") VALUES ($1, $2, $3, $4) RETURNING \"id\""}
}
At this point, you can't login to UI as well.
production.log would show:
==> /var/log/foreman/production.log <==
2019-10-03T18:52:42 [I|app|] Started GET "/api/v2/hosts" for 192.168.121.1 at 2019-10-03 18:52:42 +0000
2019-10-03T18:52:42 [I|app|f447d679] Processing by Api::V2::HostsController#index as JSON
2019-10-03T18:52:42 [I|app|f447d679] Parameters: {"apiv"=>"v2"}
2019-10-03T18:52:42 [I|app|f447d679] Authorized user admin(Admin User)
2019-10-03T18:52:42 [I|app|f447d679] Current user set to admin (admin)
2019-10-03T18:52:42 [W|app|f447d679] Action failed
ActiveRecord::StatementInvalid: PG::ObjectNotInPrerequisiteState: ERROR: nextval: reached maximum value of sequence "sessions_id_seq" (9223372036854775807)
: INSERT INTO "sessions" ("session_id", "data", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"
Expected results:
The sessions_id_seq should be reset once in a while to avoid this error.
Additional info:
This kcs article explains how to clear the sessions and reset the sequence: https://access.redhat.com/solutions/3660801
Description of problem: A Satellite running for many many years may run into integer out of range. This is rare but possible. Version-Release number of selected component (if applicable): Satellite 6.5.2 How reproducible: Difficult to reproduce but happens very rarely at customer environments Steps to Reproduce: 1. It is difficult to reproduce as a normal user, but can be reproduced easily with updating the table. 2. sudo su - postgres psql foreman ALTER SEQUENCE sessions_id_seq RESTART WITH 9223372036854775805; 3. Now, hit some api calls or hammer or UI. Actual results: curl -X GET -k -u admin:changeme https://satellite.example.com/api/v2/hosts { "error": {"message":"PG::NumericValueOutOfRange: ERROR: integer out of range\n: INSERT INTO \"sessions\" (\"session_id\", \"data\", \"created_at\", \"updated_at\") VALUES ($1, $2, $3, $4) RETURNING \"id\""} } At this point, you can't login to UI as well. production.log would show: ==> /var/log/foreman/production.log <== 2019-10-03T18:52:42 [I|app|] Started GET "/api/v2/hosts" for 192.168.121.1 at 2019-10-03 18:52:42 +0000 2019-10-03T18:52:42 [I|app|f447d679] Processing by Api::V2::HostsController#index as JSON 2019-10-03T18:52:42 [I|app|f447d679] Parameters: {"apiv"=>"v2"} 2019-10-03T18:52:42 [I|app|f447d679] Authorized user admin(Admin User) 2019-10-03T18:52:42 [I|app|f447d679] Current user set to admin (admin) 2019-10-03T18:52:42 [W|app|f447d679] Action failed ActiveRecord::StatementInvalid: PG::ObjectNotInPrerequisiteState: ERROR: nextval: reached maximum value of sequence "sessions_id_seq" (9223372036854775807) : INSERT INTO "sessions" ("session_id", "data", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" Expected results: The sessions_id_seq should be reset once in a while to avoid this error. Additional info: This kcs article explains how to clear the sessions and reset the sequence: https://access.redhat.com/solutions/3660801