Failed to call refresh: '/usr/sbin/foreman-rake db:migrate' returned 1 instead of one of [0]

[ERROR 2018-02-02T15:20:21 main]  /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]
[ERROR 2018-02-02T15:20:21 main]  /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]

Executinge the file manually gets me

root@foreman:/var/lib# /usr/sbin/foreman-rake db:migrate
API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
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 /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:240:in `load_dependency'
rake aborted!
Sequel::DatabaseError: PG::DuplicateColumn: ERROR:  column "version" of relation "dynflow_schema_info" already exists

I already have purged/deleted the postgresql executables and db files but the error still comes around? Any idea why?

Package: foreman
Version: 1.16.0-1
Architecture: amd64

Thanks!
Tobias Köck

Hi,

See Bug #20050: Installer crashes on db:migrate - foreman-tasks - Foreman for more details: the current workaround, until we track down the real cause of the issue is to downgrade the sequel and pg gems.

1 Like