500 Internal Server Error during any operation with katello

Problem:
I am getting “RestClient::InternalServerError: 500 Internal Server Error” all the time whenever I am trying to create a product, delete a product, create a repo, delete a repo etc. I upgraded katello with ‘foreman-installer --upgrade --scenario katello’ but still getting the same error.

Expected outcome:
Should be able to run katello related commands.

Foreman and Proxy versions:
[root@katello-host log]# rpm -qa | grep foreman
tfm-rubygem-foreman-tasks-core-0.1.8-1.fm1_15.el7.noarch
foreman-proxy-1.15.6-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-5.el7.noarch
katello-host.example.org-foreman-proxy-client-1.0-1.noarch
katello-host.example.org-foreman-client-1.0-1.noarch
tfm-rubygem-foreman_docker-3.2.1-1.fm1_15.el7.noarch
foreman-debug-1.15.6-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.4-2.el7.noarch
foreman-release-scl-3-1.el7.noarch
foreman-1.15.6-1.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.10.2-1.el7.noarch
tfm-rubygem-foreman-tasks-0.9.6-1.fm1_15.el7.noarch
foreman-postgresql-1.15.6-1.el7.noarch
foreman-cli-1.15.6-1.el7.noarch
foreman-release-1.15.6-1.el7.noarch
foreman-compute-1.15.6-1.el7.noarch
foreman-installer-1.15.6-2.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.12-1.fm1_15.el7.noarch
katello-host.example.org-foreman-proxy-1.0-1.noarch
foreman-selinux-1.15.6-1.el7.noarch
foreman-installer-katello-3.4.5-1.el7.noarch
[root@katello-host log]#

Foreman and Proxy plugin versions:

Other relevant data:
foreman/production.log and foreman-installer --upgrade --scenario katello output

katello_error.txt.gz (9.1 KB)

@John_Mitsch this is the rebuild that I am attempting since I couldn’t recover from the old server. Any input would be highly appreciated.

Thanks,