The satellite-installer execution failed at db:migrate stage with error "PG::ConnectionBad: could not connect to server: Permission denied" in Red Hat Satellite 6

Solution Verified - Updated -

Issue

  • During satellite-installer execute on Red Hat Satellite Server, the db:migrate step with the following traceback.

    [DEBUG 2021-08-17T07:06:48 main]  Exec[foreman-rake-db:migrate](provider=posix): Executing '/usr/sbin/foreman-rake db:migrate'
    [DEBUG 2021-08-17T07:06:48 main]  Executing with uid=foreman: '/usr/sbin/foreman-rake db:migrate'
    [ WARN 2021-08-17T07:07:05 main]  /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: rake aborted!
    [ WARN 2021-08-17T07:07:05 main]  /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: PG::ConnectionBad: could not connect to server: Permission denied
    [ WARN 2021-08-17T07:07:05 main]  /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns:    Is the server running locally and accepting
    [ WARN 2021-08-17T07:07:05 main]  /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns:    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
    [ WARN 2021-08-17T07:07:05 main]  /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /opt/theforeman/tfm/root/usr/share/gems/gems/pg-1.1.4/lib/pg.rb:56:in `initialize'
    [ WARN 2021-08-17T07:07:05 main]  /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /opt/theforeman/tfm/root/usr/share/gems/gems/pg-1.1.4/lib/pg.rb:56:in `new'
    

Environment

  • Red Hat Satellite 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content