Bug #23572
closedForeman1.17 + Katello3.6, remote postgresql 9.2 failing db:migrate]/Exec[foreman-rake-db:migrate]: Failed to call refresh
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
Updated by prem prakash over 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)
Updated by prem prakash over 6 years ago
- Assignee changed from Adam Price to Marek Hulán
Updated by Eric Helms over 6 years ago
- Project changed from Packaging to Katello
- Triaged set to No
Updated by Jonathon Turel over 6 years ago
You may want to try upgrading to a Katello 3.7 RC which has better support for remote databases.
Updated by Jonathon Turel over 6 years ago
- Status changed from New to Need more information
Updated by John Mitsch over 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.