Unable to open Suse subscription tab in Foreman

I have installed SCC_MANAGER package on the foreman but when i try to open Suse subscriotion tab under the content from the foreman UI, getting below error message

Expected outcome:

It should give the login screen for suse portal with the URL username/password

Foreman and Proxy versions:

Foreman and Proxy plugin versions:

Distribution and version:
Centos 7 / foreman 2.0

Other relevant data:
Error message in the GUI :

Oops, we’re sorry but something went wrong PG::UndefinedTable: ERROR: relation “scc_accounts” does not exist LINE 1: SELECT “scc_accounts”.* FROM “scc_accounts” ORDER BY "scc_a… ^ : SELECT “scc_accounts”.* FROM “scc_accounts” ORDER BY “scc_accounts”.“login” ASC LIMIT $1 OFFSET $2

From the production.log :

==> /var/log/httpd/foreman-ssl_access_ssl.log <== - - [21/Aug/2020:17:17:20 +0530] “GET /scc_accounts HTTP/1.1” 500 22839 “https://punforeman.ansys.com/scc_accounts” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36”

==> /var/log/foreman/production.log <==
2020-08-21T17:17:20 [I|app|d6ba2a97] Started GET “/scc_accounts” for at 2020-08-21 17:17:20 +0530
2020-08-21T17:17:20 [I|app|d6ba2a97] Processing by SccAccountsController#index as HTML
2020-08-21T17:17:20 [I|app|d6ba2a97] Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_scc_manager-1.8.4/app/views/scc_accounts/index.html.erb within layouts/application
2020-08-21T17:17:20 [I|app|d6ba2a97] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_scc_manager-1.8.4/app/views/scc_accounts/index.html.erb within layouts/application (2.5ms)
2020-08-21T17:17:20 [W|app|d6ba2a97] Action failed
2020-08-21T17:17:20 [I|app|d6ba2a97] Rendering common/500.html.erb within layouts/application
2020-08-21T17:17:20 [I|app|d6ba2a97] Rendered common/500.html.erb within layouts/application (0.7ms)
2020-08-21T17:17:20 [I|app|d6ba2a97] Rendered layouts/_application_content.html.erb (0.3ms)
2020-08-21T17:17:20 [I|app|d6ba2a97] Rendering layouts/base.html.erb
2020-08-21T17:17:20 [I|app|d6ba2a97] Rendered layouts/base.html.erb (2.2ms)
2020-08-21T17:17:20 [I|app|d6ba2a97] Completed 500 Internal Server Error in 19ms (Views: 4.7ms | ActiveRecord: 2.4ms)
–More-- /tmp/suse (100%)

can you please help on this, as we are going to include lot of Suse servers in the Foreman server.

Thanks in advance.

Ganesh Patil.

Before this, i was getting below error after the scc_manager package installation

ERF73-0602 [Foreman::PermissionMissingException]: some permissions were not found: [“use_scc”, “view_scc”, “new_scc”, “edit_scc”, “delete_scc”, “sync_scc”, :view_scc, :use_scc, :new_scc, :edit_scc, :delete_scc, :sync_scc] (Foreman::PermissionMissingException)
The above error was showing up while accessing the Foreman UI.
I have taken below steps to resolve the issue :

# su postgres -c 'psql katello'

foreman=# SELECT * FROM permissions WHERE name='view_scc';
 id  |   name   | resource_type |         created_at         |         updated_at         
 240 | view_scc |               | 2020-06-12 07:35:56.199982 | 2020-06-12 07:35:56.199982
 241 | view_scc |               | 2020-06-12 07:35:56.210071 | 2020-06-12 07:35:56.210071
(2 rows)

foreman=# DELETE FROM permissions WHERE id=241;
foreman=# \q

Following the above steps that issue got resolved.

Can someone please share some inputs on this?

“Table does not exist” sounds like the migrations weren’t run.
Can you execute “foreman-rake db:migrate”?

1 Like


Thanks a lot, it helped.

Ganesh Patil,
System Administrator ll
ANSYS Software Pvt. Ltd.
Plot No. 34/1,
Rajiv Gandhi Infotech Park,
M.I.D.C. Hinjewadi,
Pune 411057, INDIA

1 Like