Project

General

Profile

Actions

Bug #23572

closed

Foreman1.17 + Katello3.6, remote postgresql 9.2 failing db:migrate]/Exec[foreman-rake-db:migrate]: Failed to call refresh

Added by prem prakash about 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
medium
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Trying to connect to Remote Postgresql 9.2 db but its failing : db:migrate]/Exec[foreman-rake-db:migrate]: Failed to call refresh

/Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]: Failed to call refresh: '/usr/sbin/foreman-rake db:migrate' returned 1 instead of one of [0]
/Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]: '/usr/sbin/foreman-rake db:migrate' returned 1 instead of one of [0]
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/errors.rb:106:in `fail'

Running foreman-rake db:migrate give this error
/opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/database/schema_generator.rb:19: warning: constant ::Fixnum is deprecated
/opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/database/schema_generator.rb:19: warning: constant ::Bignum is deprecated
/usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP
/usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here
/usr/share/foreman/lib/core_extensions.rb:183: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here
/opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/appender.rb:139: warning: constant ::Fixnum is deprecated
/opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/logger.rb:295: warning: constant ::Fixnum is deprecated
Apipie cache enabled but not present yet. Run apipie:cache rake task to speed up API calls.
The PGconn, PGresult, and PGError constants are deprecated, and will be
removed as of version 1.0.

You should use PG::Connection, PG::Result, and PG::Error instead, respectively.

Called from /opt/theforeman/tfm/root/usr/share/gems/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
rake aborted!
Sequel::Migrator::Error: More than 1 row in migrator table
/opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:589:in `schema_dataset'

Running this installer
foreman-installer --scenario katello \
--foreman-db-host xx.njrar.tus.amr1907.com \
--foreman-db-password rrr! \
--foreman-db-database foreman \
--foreman-db-manage false \
--katello-candlepin-db-host xx.njrar.tus.amr1907.com \
--katello-candlepin-db-name candlepin \
--katello-candlepin-db-password rrr! \
--katello-candlepin-manage-db false


Files

foreman-rake_db_migrate.txt foreman-rake_db_migrate.txt 6.05 KB foreman-rake db:migrate logs prem prakash, 05/11/2018 06:35 PM
foreman_installer.txt foreman_installer.txt 8.48 KB logs at the time of calling foreman_installer prem prakash, 05/11/2018 06:37 PM
Actions #1

Updated by prem prakash about 6 years ago

I can connect DB from Katello+Foreman box

[root@xx lib]# PGPASSWORD='rrr!' psql h xx.njrar.tus.amr1907.com -p 5432 -U foreman -d foreman -c "SELECT 1 as ping"
ping
-----

1
(1 row)

[root@xx lib]# PGPASSWORD='rrr!' psql h xx.njrar.tus.amr1907.com -p 5432 -U candlepin -d candlepin -c "SELECT 1 as ping"
ping
-----

1
(1 row)

Actions #2

Updated by prem prakash about 6 years ago

  • Assignee changed from Adam Price to Marek Hulán
Actions #3

Updated by Eric Helms almost 6 years ago

  • Project changed from Packaging to Katello
  • Triaged set to No
Actions #4

Updated by Jonathon Turel almost 6 years ago

You may want to try upgrading to a Katello 3.7 RC which has better support for remote databases.

Actions #5

Updated by Jonathon Turel almost 6 years ago

  • Status changed from New to Need more information
Actions #6

Updated by John Mitsch almost 6 years ago

  • Status changed from Need more information to Closed
  • Triaged changed from No to Yes

Closing due to inactivity, please reopen if this is still relevant.

Actions

Also available in: Atom PDF