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.
Description of problem:
Can't open a new foreman session. WebUI gives "We're sorry, but something went wrong.". API calls return Error 500.
=== production.log ===
2018-10-19 11:46:36 39364d1c [app] [F]
| ActiveRecord::StatementInvalid (PG::Error: ERROR: integer out of range
| : INSERT INTO "sessions" ("created_at", "data", "session_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"):
| lib/middleware/tagged_logging.rb:18:in `call'
===
=== postgresql.log ===
2018-10-20 14:40:18 AEDT STATEMENT: INSERT INTO "sessions" ("session_id", "data", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"
2018-10-20 14:40:18 AEDT ERROR: integer out of range
2018-10-20 14:40:18 AEDT STATEMENT: INSERT INTO "sessions" ("session_id", "data", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"
===
Version-Release number of selected component (if applicable):
Satellite 6.2, 6.3, 6.4
How reproducible:
100%
Steps to Reproduce:
1. Clean your sessions to avoid further mess by running 'foreman-rake db:sessions:clear'
2. Modify your last value in foreman.sessions_id_seq to something bigger than integer. So the next value for ID in foreman.sessions will be bigger than integer. Like:
foreman=# alter sequence sessions_id_seq restart with 2151782968;
ALTER SEQUENCE
foreman=# select * from sessions_id_seq;
sequence_name | last_value | start_value | increment_by | max_value | min_value | cache_value | log_cnt | is_cycled | is_called
-----------------+------------+-------------+--------------+---------------------+-----------+-------------+---------+-----------+-----------
sessions_id_seq | 2151782969 | 1 | 1 | 9223372036854775807 | 1 | 1 | 31 | f | t
(1 row)
foreman=# \d+ sessions;
Table "public.sessions"
Column | Type | Modifiers | Storage | Stats target | Description
------------+-----------------------------+-------------------------------------------------------+----------+--------------+-------------
id | integer | not null default nextval('sessions_id_seq'::regclass) | plain | |
session_id | character varying(255) | not null | extended | |
data | text | | extended | |
created_at | timestamp without time zone | | plain | |
updated_at | timestamp without time zone | | plain | |
Indexes:
"sessions_pkey" PRIMARY KEY, btree (id)
"index_sessions_on_session_id" btree (session_id)
"index_sessions_on_updated_at" btree (updated_at)
3. Done.
Actual results:
"We're sorry, but something went wrong." in the webui. Not able to register new servers, etc.
Expected results:
Functionality as usual.
Additional info:
Restart the sequence with 1 to bring your Satellite back online.
foreman=# alter sequence sessions_id_seq restart with 1;
ALTER SEQUENCE
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2020:1454
Description of problem: Can't open a new foreman session. WebUI gives "We're sorry, but something went wrong.". API calls return Error 500. === production.log === 2018-10-19 11:46:36 39364d1c [app] [F] | ActiveRecord::StatementInvalid (PG::Error: ERROR: integer out of range | : INSERT INTO "sessions" ("created_at", "data", "session_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"): | lib/middleware/tagged_logging.rb:18:in `call' === === postgresql.log === 2018-10-20 14:40:18 AEDT STATEMENT: INSERT INTO "sessions" ("session_id", "data", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" 2018-10-20 14:40:18 AEDT ERROR: integer out of range 2018-10-20 14:40:18 AEDT STATEMENT: INSERT INTO "sessions" ("session_id", "data", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" === Version-Release number of selected component (if applicable): Satellite 6.2, 6.3, 6.4 How reproducible: 100% Steps to Reproduce: 1. Clean your sessions to avoid further mess by running 'foreman-rake db:sessions:clear' 2. Modify your last value in foreman.sessions_id_seq to something bigger than integer. So the next value for ID in foreman.sessions will be bigger than integer. Like: foreman=# alter sequence sessions_id_seq restart with 2151782968; ALTER SEQUENCE foreman=# select * from sessions_id_seq; sequence_name | last_value | start_value | increment_by | max_value | min_value | cache_value | log_cnt | is_cycled | is_called -----------------+------------+-------------+--------------+---------------------+-----------+-------------+---------+-----------+----------- sessions_id_seq | 2151782969 | 1 | 1 | 9223372036854775807 | 1 | 1 | 31 | f | t (1 row) foreman=# \d+ sessions; Table "public.sessions" Column | Type | Modifiers | Storage | Stats target | Description ------------+-----------------------------+-------------------------------------------------------+----------+--------------+------------- id | integer | not null default nextval('sessions_id_seq'::regclass) | plain | | session_id | character varying(255) | not null | extended | | data | text | | extended | | created_at | timestamp without time zone | | plain | | updated_at | timestamp without time zone | | plain | | Indexes: "sessions_pkey" PRIMARY KEY, btree (id) "index_sessions_on_session_id" btree (session_id) "index_sessions_on_updated_at" btree (updated_at) 3. Done. Actual results: "We're sorry, but something went wrong." in the webui. Not able to register new servers, etc. Expected results: Functionality as usual. Additional info: Restart the sequence with 1 to bring your Satellite back online. foreman=# alter sequence sessions_id_seq restart with 1; ALTER SEQUENCE