CentOS host cannot subscribe to repositories

I just had this same problem (I think), and the issue like was mentioned was that certificate expiration for the subscriptions is set 30 years in the future to a date > 2050…and that causes an internal python datetime module to overflow.

There was a solution posted on the redhat satellite forum about this, basically, updating the candlepin database to change the subscription expiration date to something < the year 2050, then updating foreman. See if this works:

sudo -u postgres -H – psql -d candlepin -c “update cp_pool set enddate = ‘2049-12-01 00:00:00’ where enddate > ‘2049-12-31 00:00:00’;”

echo ’
User.current = User.anonymous_admin
m = Katello::Subscription
m.import_all
m = Katello::Pool
m.import_all
’ | foreman-rake console

Thanks for RedHat for that solution. I sorta figured out how to do the database update, but the foreman-rake thing I was clueless about.

Hope this helps

1 Like