Problem:
running subscription-manager refresh shows a database error:
# subscription-manager refresh
HTTP error (500 - Internal Server Error): Runtime Error could not execute statement at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse:2,433
Expected outcome:
redhat.repo file updated with repos listed in attached content view
Foreman and Proxy versions:
3.0
Foreman and Proxy plugin versions:
Katello 4.2.0.1
Distribution and version:
CentOS 8-Stream
Other relevant data:
This shows up in /var/log/foreman/production.log:
2021-10-23T21:52:45 [E|app|615f923a] RestClient::InternalServerError: Katello::Resources::Candlepin::CandlepinResource: 500 Internal Server Error {"displayMessage":"Runtime Error could not execute statement at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse:2,433","requestUuid":"f4e01985-496c-4782-95d9-f0ad2a5bfa2b"} (GET /candlepin/consumers/2b98f728-b447-4e8d-81d6-4b4f2a520a43/certificates/serials)
I had changed some of the repo listings in the CCV associated with a few of my servers, and was expecting subscription-manager refresh to adjust redhat.repo to match. I can edit redhat.repo as a workaround in the meantime, but either I’ve done something wrong or this is an issue worth reporting.
This server has only ever run the 4.2 release series, so I don’t think I would have had an upgrade in that sense.
I did try to run foreman-rake db:migrate before trying this. I looked into it further and found cpdb which did indeed perform a migration to drop that column (and it finished successfully), and my subscription-manager refresh's still run successfully, so I’m betting on a failed migration during a package upgrade.
We’d appreciate seeing any errors from your production log or your foreman-installer logs. You would’ve seen the foreman-installer error out during installation, though, so maybe there wasn’t anything.
Ah, I didn’t realize it was the Candlepin DB that was the issue. I’ll ask around about this to see if it’s anything to worry about. Thanks for the info and debugging.