Bug #20050

Installer crashes on db:migrate

Added by Wim Godden 7 months ago. Updated 14 days ago.

Status:New
Priority:Urgent
Assigned To:Ivan Necas
Category:-
Target version:-
Difficulty: Bugzilla link:
Found in release: Pull request:
Story points-
Velocity based estimate-

Description

I had a running foreman install, but needed to run the foreman-installer again to change some settings. Upon doing so, the installer failed on this :
/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]

Apparently the issue is at :
Sequel::DatabaseError: PG::DuplicateColumn: ERROR: column "version" of relation "dynflow_schema_info" already exists

Any idea if this is a bug or something I did wrong ?

I tried dropping the database, then restarting, but that didn't change anything.


Related issues

Related to foreman-tasks - Bug #17372: Installation of foreman_tasks fails on Debian jessie Duplicate 11/17/2016
Related to foreman-tasks - Bug #12993: PostgreSQL DuplicateColumn Error Closed 01/05/2016
Related to foreman-tasks - Bug #17875: ruby-foreman-tasks fails to intsall on debian/ubuntu Duplicate 12/29/2016
Related to Installer - Bug #22135: Installation of foreman-proxy-plugin-ansible always fails New 01/03/2018
Related to Installer - Bug #22266: Fresh installation of Foreman with Ansible plugin and pro... New 01/15/2018

History

#1 Updated by Marek Hulán 7 months ago

  • Status changed from New to Need more information

Could you please try running "foreman-rake db:migrate" and upload the whole output? It seems like the DB was manually manipulated. Also it would be great if you could provide the exact command, you're using for the installer. Dynflow is only used when some plugins are enabled.

#2 Updated by Marek Hulán 7 months ago

Seems like a duplicit of #17372, waiting for confirmation that foreman-tasks is involved.

#3 Updated by Marek Hulán 7 months ago

  • Related to Bug #17372: Installation of foreman_tasks fails on Debian jessie added

#4 Updated by Wim Godden 7 months ago

Full details :
  1. foreman-rake db:migrate
    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.1.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `new'
rake aborted!
Sequel::DatabaseError: PG::DuplicateColumn: ERROR: column "version" of relation "dynflow_schema_info" already exists
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:187:in `async_exec'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:187:in `block in execute_query'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/database/logging.rb:44:in `log_connection_yield'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:187:in `execute_query'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:174:in `block in execute'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:150:in `check_disconnect_errors'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:174:in `execute'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:526:in `_execute'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:342:in `block (2 levels) in execute'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:547:in `check_database_errors'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:342:in `block in execute'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/database/connecting.rb:251:in `block in synchronize'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/connection_pool/threaded.rb:107:in `hold'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/database/connecting.rb:251:in `synchronize'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:342:in `execute'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/database/query.rb:52:in `execute_dui'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/database/query.rb:45:in `execute_ddl'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/database/schema_methods.rb:420:in `block in apply_alter_table'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/database/schema_methods.rb:420:in `each'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/database/schema_methods.rb:420:in `apply_alter_table'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/database/schema_methods.rb:425:in `apply_alter_table_generator'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/database/schema_methods.rb:81:in `alter_table'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/extensions/migration.rb:602:in `schema_dataset'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/extensions/migration.rb:452:in `initialize'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/extensions/migration.rb:522:in `initialize'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/extensions/migration.rb:399:in `new'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/extensions/migration.rb:399:in `run'
/usr/share/foreman/vendor/ruby/2.1.0/gems/dynflow-0.8.24/lib/dynflow/persistence_adapters/sequel.rb:221:in `migrate_db'
/usr/share/foreman/vendor/ruby/2.1.0/gems/dynflow-0.8.24/lib/dynflow/persistence_adapters/sequel.rb:44:in `initialize'
/usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.9.2/lib/foreman_tasks/dynflow/configuration.rb:145:in `new'
/usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.9.2/lib/foreman_tasks/dynflow/configuration.rb:145:in `initialize_persistence'
/usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.9.2/lib/foreman_tasks/dynflow/configuration.rb:102:in `block in world_config'
/usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.9.2/lib/foreman_tasks/dynflow/configuration.rb:98:in `tap'
/usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.9.2/lib/foreman_tasks/dynflow/configuration.rb:98:in `world_config'
/usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.9.2/lib/foreman_tasks/dynflow/configuration.rb:61:in `initialize_world'
/usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.9.2/lib/foreman_tasks/dynflow.rb:128:in `init_world'
/usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.9.2/lib/foreman_tasks/dynflow.rb:41:in `initialize!'
/usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.9.2/lib/foreman_tasks/engine.rb:156:in `block in <class:Engine>'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.8/lib/active_support/lazy_load_hooks.rb:36:in `call'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.8/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.8/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.8/lib/active_support/lazy_load_hooks.rb:44:in `each'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.8/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/usr/share/foreman/vendor/ruby/2.1.0/gems/railties-4.2.8/lib/rails/application/finisher.rb:62:in `block in <module:Finisher>'
/usr/share/foreman/vendor/ruby/2.1.0/gems/railties-4.2.8/lib/rails/initializable.rb:30:in `instance_exec'
/usr/share/foreman/vendor/ruby/2.1.0/gems/railties-4.2.8/lib/rails/initializable.rb:30:in `run'
/usr/share/foreman/vendor/ruby/2.1.0/gems/railties-4.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/share/foreman/vendor/ruby/2.1.0/gems/railties-4.2.8/lib/rails/initializable.rb:54:in `run_initializers'
/usr/share/foreman/vendor/ruby/2.1.0/gems/railties-4.2.8/lib/rails/application.rb:352:in `initialize!'
/usr/share/foreman/vendor/ruby/2.1.0/gems/railties-4.2.8/lib/rails/railtie.rb:194:in `public_send'
/usr/share/foreman/vendor/ruby/2.1.0/gems/railties-4.2.8/lib/rails/railtie.rb:194:in `method_missing'
/usr/share/foreman/config/environment.rb:5:in `<top (required)>'
/usr/share/foreman/vendor/ruby/2.1.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/usr/share/foreman/vendor/ruby/2.1.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `block in require'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `require'
/usr/share/foreman/vendor/ruby/2.1.0/gems/railties-4.2.8/lib/rails/application.rb:328:in `require_environment!'
/usr/share/foreman/vendor/ruby/2.1.0/gems/railties-4.2.8/lib/rails/application.rb:457:in `block in run_tasks_blocks'
PG::DuplicateColumn: ERROR: column "version" of relation "dynflow_schema_info" already exists
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:187:in `async_exec'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:187:in `block in execute_query'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/database/logging.rb:44:in `log_connection_yield'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:187:in `execute_query'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:174:in `block in execute'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:150:in `check_disconnect_errors'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:174:in `execute'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:526:in `_execute'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:342:in `block (2 levels) in execute'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:547:in `check_database_errors'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:342:in `block in execute'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/database/connecting.rb:251:in `block in synchronize'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/connection_pool/threaded.rb:107:in `hold'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/database/connecting.rb:251:in `synchronize'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/adapters/postgres.rb:342:in `execute'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/database/query.rb:52:in `execute_dui'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/database/query.rb:45:in `execute_ddl'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/database/schema_methods.rb:420:in `block in apply_alter_table'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/database/schema_methods.rb:420:in `each'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/database/schema_methods.rb:420:in `apply_alter_table'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/database/schema_methods.rb:425:in `apply_alter_table_generator'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/database/schema_methods.rb:81:in `alter_table'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/extensions/migration.rb:602:in `schema_dataset'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/extensions/migration.rb:452:in `initialize'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/extensions/migration.rb:522:in `initialize'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/extensions/migration.rb:399:in `new'
/usr/share/foreman/vendor/ruby/2.1.0/gems/sequel-4.37.0/lib/sequel/extensions/migration.rb:399:in `run'
/usr/share/foreman/vendor/ruby/2.1.0/gems/dynflow-0.8.24/lib/dynflow/persistence_adapters/sequel.rb:221:in `migrate_db'
/usr/share/foreman/vendor/ruby/2.1.0/gems/dynflow-0.8.24/lib/dynflow/persistence_adapters/sequel.rb:44:in `initialize'
/usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.9.2/lib/foreman_tasks/dynflow/configuration.rb:145:in `new'
/usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.9.2/lib/foreman_tasks/dynflow/configuration.rb:145:in `initialize_persistence'
/usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.9.2/lib/foreman_tasks/dynflow/configuration.rb:102:in `block in world_config'
/usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.9.2/lib/foreman_tasks/dynflow/configuration.rb:98:in `tap'
/usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.9.2/lib/foreman_tasks/dynflow/configuration.rb:98:in `world_config'
/usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.9.2/lib/foreman_tasks/dynflow/configuration.rb:61:in `initialize_world'
/usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.9.2/lib/foreman_tasks/dynflow.rb:128:in `init_world'
/usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.9.2/lib/foreman_tasks/dynflow.rb:41:in `initialize!'
/usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.9.2/lib/foreman_tasks/engine.rb:156:in `block in <class:Engine>'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.8/lib/active_support/lazy_load_hooks.rb:36:in `call'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.8/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.8/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.8/lib/active_support/lazy_load_hooks.rb:44:in `each'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.8/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/usr/share/foreman/vendor/ruby/2.1.0/gems/railties-4.2.8/lib/rails/application/finisher.rb:62:in `block in <module:Finisher>'
/usr/share/foreman/vendor/ruby/2.1.0/gems/railties-4.2.8/lib/rails/initializable.rb:30:in `instance_exec'
/usr/share/foreman/vendor/ruby/2.1.0/gems/railties-4.2.8/lib/rails/initializable.rb:30:in `run'
/usr/share/foreman/vendor/ruby/2.1.0/gems/railties-4.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/share/foreman/vendor/ruby/2.1.0/gems/railties-4.2.8/lib/rails/initializable.rb:54:in `run_initializers'
/usr/share/foreman/vendor/ruby/2.1.0/gems/railties-4.2.8/lib/rails/application.rb:352:in `initialize!'
/usr/share/foreman/vendor/ruby/2.1.0/gems/railties-4.2.8/lib/rails/railtie.rb:194:in `public_send'
/usr/share/foreman/vendor/ruby/2.1.0/gems/railties-4.2.8/lib/rails/railtie.rb:194:in `method_missing'
/usr/share/foreman/config/environment.rb:5:in `<top (required)>'
/usr/share/foreman/vendor/ruby/2.1.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/usr/share/foreman/vendor/ruby/2.1.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `block in require'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `require'
/usr/share/foreman/vendor/ruby/2.1.0/gems/railties-4.2.8/lib/rails/application.rb:328:in `require_environment!'
/usr/share/foreman/vendor/ruby/2.1.0/gems/railties-4.2.8/lib/rails/application.rb:457:in `block in run_tasks_blocks'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

#5 Updated by Michael Moll 20 days ago

  • Related to Bug #12993: PostgreSQL DuplicateColumn Error added

#6 Updated by Michael Moll 20 days ago

  • Related to Bug #17875: ruby-foreman-tasks fails to intsall on debian/ubuntu added

#7 Updated by Michael Moll 20 days ago

  • Related to Bug #22135: Installation of foreman-proxy-plugin-ansible always fails added

#8 Updated by yannick N 16 days ago

Debian 9.3 stretch

Hi,

Wim Godden, I think yout problem is the pg version
show your /usr/share/foreman/bundler.d/postgresql.rb

After a fresh install, i have the same Error.

Actives plugins

1. [✓] Configure foreman
2. [✓] Configure foreman_cli
4. [✓] Configure foreman_proxy
5. [✓] Configure puppet
10. [✓] Configure foreman_plugin_cockpit
14. [✓] Configure foreman_plugin_discovery
17. [✓] Configure foreman_plugin_hooks
19. [✓] Configure foreman_plugin_memcache
25. [✓] Configure foreman_plugin_remote_execution
27. [✓] Configure foreman_plugin_setup
28. [✓] Configure foreman_plugin_tasks
36. [✓] Configure foreman_compute_vmware
42. [✓] Configure foreman_proxy_plugin_discovery
45. [✓] Configure foreman_proxy_plugin_dynflow
50. [✓] Configure foreman_proxy_plugin_remote_execution_ssh

/usr/share/foreman/bundler.d/postgresql.rb

group :postgresql do
  # Matches gem requirement specified in ActiveRecord connection adapter
  gem 'pg', (SETTINGS[:rails] == '4.2' ? '0.15.0' : '0.18.0')
  #gem 'pg', '0.21.0'
end
#gem 'pg', '0.19.0'

Output foreman-rake db:migrate

 foreman-rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
rake aborted!
Sequel::DatabaseError: PG::Error: ERREUR:  la colonne « version » de la relation « dynflow_schema_info » existe déjà
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:145:in `exec'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:145:in `block in execute_query'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/database/logging.rb:38:in `log_connection_yield'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:145:in `execute_query'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:133:in `block in execute'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:109:in `check_disconnect_errors'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:133:in `execute'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:449:in `_execute'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:273:in `block (2 levels) in execute'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:471:in `check_database_errors'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:273:in `block in execute'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/database/connecting.rb:264:in `block in synchronize'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/connection_pool/threaded.rb:91:in `hold'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/database/connecting.rb:264:in `synchronize'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:273:in `execute'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/database/query.rb:50:in `execute_dui'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/database/query.rb:43:in `execute_ddl'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/database/schema_methods.rb:411:in `block in apply_alter_table'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/database/schema_methods.rb:411:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/database/schema_methods.rb:411:in `apply_alter_table'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/database/schema_methods.rb:424:in `apply_alter_table_generator'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/database/schema_methods.rb:70:in `alter_table'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/extensions/migration.rb:622:in `schema_dataset'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/extensions/migration.rb:450:in `initialize'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/extensions/migration.rb:517:in `initialize'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/extensions/migration.rb:398:in `new'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/extensions/migration.rb:398:in `run'
/usr/share/foreman/vendor/ruby/2.3.0/gems/dynflow-0.8.33/lib/dynflow/persistence_adapters/sequel.rb:238:in `migrate_db'
/usr/share/foreman/vendor/ruby/2.3.0/gems/dynflow-0.8.33/lib/dynflow/persistence_adapters/sequel.rb:46:in `initialize'
/usr/share/foreman/vendor/ruby/2.3.0/gems/foreman-tasks-0.10.6/lib/foreman_tasks/dynflow/configuration.rb:39:in `new'
/usr/share/foreman/vendor/ruby/2.3.0/gems/foreman-tasks-0.10.6/lib/foreman_tasks/dynflow/configuration.rb:39:in `initialize_persistence'
/usr/share/foreman/vendor/ruby/2.3.0/gems/dynflow-0.8.33/lib/dynflow/rails/configuration.rb:107:in `block in world_config'
/usr/share/foreman/vendor/ruby/2.3.0/gems/dynflow-0.8.33/lib/dynflow/rails/configuration.rb:103:in `tap'
/usr/share/foreman/vendor/ruby/2.3.0/gems/dynflow-0.8.33/lib/dynflow/rails/configuration.rb:103:in `world_config'
/usr/share/foreman/vendor/ruby/2.3.0/gems/foreman-tasks-0.10.6/lib/foreman_tasks/dynflow/configuration.rb:8:in `world_config'
/usr/share/foreman/vendor/ruby/2.3.0/gems/dynflow-0.8.33/lib/dynflow/rails/configuration.rb:66:in `initialize_world'
/usr/share/foreman/vendor/ruby/2.3.0/gems/dynflow-0.8.33/lib/dynflow/rails.rb:100:in `init_world'
/usr/share/foreman/vendor/ruby/2.3.0/gems/dynflow-0.8.33/lib/dynflow/rails.rb:37:in `initialize!'
/usr/share/foreman/vendor/ruby/2.3.0/gems/foreman-tasks-0.10.6/lib/foreman_tasks/engine.rb:156:in `block in <class:Engine>'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/lazy_load_hooks.rb:44:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application/finisher.rb:62:in `block in <module:Finisher>'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:30:in `instance_exec'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:30:in `run'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
/usr/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
/usr/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
/usr/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
/usr/lib/ruby/2.3.0/tsort.rb:347:in `each'
/usr/lib/ruby/2.3.0/tsort.rb:347:in `call'
/usr/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
/usr/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
/usr/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:54:in `run_initializers'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application.rb:352:in `initialize!'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/railtie.rb:194:in `public_send'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/railtie.rb:194:in `method_missing'
/usr/share/foreman/config/environment.rb:5:in `<top (required)>'
/usr/share/foreman/vendor/ruby/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/usr/share/foreman/vendor/ruby/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `block in require'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `require'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application.rb:328:in `require_environment!'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:251:in `block in execute'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:251:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:251:in `execute'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:195:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:217:in `block in invoke_prerequisites'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:215:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:215:in `invoke_prerequisites'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:181:in `invoke'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/application.rb:160:in `invoke_task'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/application.rb:116:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/application.rb:116:in `block in top_level'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/application.rb:125:in `run_with_threads'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/application.rb:110:in `top_level'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/application.rb:83:in `block in run'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/application.rb:80:in `run'
/usr/bin/rake:27:in `<main>'

Caused by:
PG::Error: ERREUR:  la colonne « version » de la relation « dynflow_schema_info » existe déjà
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:145:in `exec'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:145:in `block in execute_query'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/database/logging.rb:38:in `log_connection_yield'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:145:in `execute_query'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:133:in `block in execute'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:109:in `check_disconnect_errors'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:133:in `execute'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:449:in `_execute'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:273:in `block (2 levels) in execute'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:471:in `check_database_errors'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:273:in `block in execute'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/database/connecting.rb:264:in `block in synchronize'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/connection_pool/threaded.rb:91:in `hold'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/database/connecting.rb:264:in `synchronize'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:273:in `execute'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/database/query.rb:50:in `execute_dui'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/database/query.rb:43:in `execute_ddl'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/database/schema_methods.rb:411:in `block in apply_alter_table'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/database/schema_methods.rb:411:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/database/schema_methods.rb:411:in `apply_alter_table'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/database/schema_methods.rb:424:in `apply_alter_table_generator'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/database/schema_methods.rb:70:in `alter_table'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/extensions/migration.rb:622:in `schema_dataset'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/extensions/migration.rb:450:in `initialize'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/extensions/migration.rb:517:in `initialize'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/extensions/migration.rb:398:in `new'
/usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/extensions/migration.rb:398:in `run'
/usr/share/foreman/vendor/ruby/2.3.0/gems/dynflow-0.8.33/lib/dynflow/persistence_adapters/sequel.rb:238:in `migrate_db'
/usr/share/foreman/vendor/ruby/2.3.0/gems/dynflow-0.8.33/lib/dynflow/persistence_adapters/sequel.rb:46:in `initialize'
/usr/share/foreman/vendor/ruby/2.3.0/gems/foreman-tasks-0.10.6/lib/foreman_tasks/dynflow/configuration.rb:39:in `new'
/usr/share/foreman/vendor/ruby/2.3.0/gems/foreman-tasks-0.10.6/lib/foreman_tasks/dynflow/configuration.rb:39:in `initialize_persistence'
/usr/share/foreman/vendor/ruby/2.3.0/gems/dynflow-0.8.33/lib/dynflow/rails/configuration.rb:107:in `block in world_config'
/usr/share/foreman/vendor/ruby/2.3.0/gems/dynflow-0.8.33/lib/dynflow/rails/configuration.rb:103:in `tap'
/usr/share/foreman/vendor/ruby/2.3.0/gems/dynflow-0.8.33/lib/dynflow/rails/configuration.rb:103:in `world_config'
/usr/share/foreman/vendor/ruby/2.3.0/gems/foreman-tasks-0.10.6/lib/foreman_tasks/dynflow/configuration.rb:8:in `world_config'
/usr/share/foreman/vendor/ruby/2.3.0/gems/dynflow-0.8.33/lib/dynflow/rails/configuration.rb:66:in `initialize_world'
/usr/share/foreman/vendor/ruby/2.3.0/gems/dynflow-0.8.33/lib/dynflow/rails.rb:100:in `init_world'
/usr/share/foreman/vendor/ruby/2.3.0/gems/dynflow-0.8.33/lib/dynflow/rails.rb:37:in `initialize!'
/usr/share/foreman/vendor/ruby/2.3.0/gems/foreman-tasks-0.10.6/lib/foreman_tasks/engine.rb:156:in `block in <class:Engine>'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/lazy_load_hooks.rb:44:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application/finisher.rb:62:in `block in <module:Finisher>'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:30:in `instance_exec'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:30:in `run'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
/usr/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
/usr/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
/usr/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
/usr/lib/ruby/2.3.0/tsort.rb:347:in `each'
/usr/lib/ruby/2.3.0/tsort.rb:347:in `call'
/usr/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
/usr/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
/usr/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:54:in `run_initializers'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application.rb:352:in `initialize!'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/railtie.rb:194:in `public_send'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/railtie.rb:194:in `method_missing'
/usr/share/foreman/config/environment.rb:5:in `<top (required)>'
/usr/share/foreman/vendor/ruby/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/usr/share/foreman/vendor/ruby/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `block in require'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `require'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application.rb:328:in `require_environment!'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:251:in `block in execute'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:251:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:251:in `execute'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:195:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:217:in `block in invoke_prerequisites'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:215:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:215:in `invoke_prerequisites'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/task.rb:181:in `invoke'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/application.rb:160:in `invoke_task'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/application.rb:116:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/application.rb:116:in `block in top_level'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/application.rb:125:in `run_with_threads'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/application.rb:110:in `top_level'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/application.rb:83:in `block in run'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.0/lib/rake/application.rb:80:in `run'
/usr/bin/rake:27:in `<main>'
Tasks: TOP => db:migrate => environment

#9 Updated by yannick N 15 days ago

  • Priority changed from High to Urgent

#10 Updated by Luke Alexander 15 days ago

I run into this issue while upgrading from 1.15.6 to 1.16, I am running Debian Jessie with Postgresql 9.6/9.5, the 'workaround' that seems to help is downgrading the sequel gem from 5.2.0 to 4.15.0:

/usr/share/foreman # grep sequel Gemfile
gem 'sequel', '4.15.0'

Then as the foreman user running:

bundle update sequel

Then as the root user running:

foreman-rake db:migrate

#11 Updated by Luke Alexander 15 days ago

Luke Alexander wrote:

I run into this issue while upgrading from 1.15.6 to 1.16, I am running Debian Jessie with Postgresql 9.6/9.5, the 'workaround' that seems to help is downgrading the sequel gem from 5.2.0 to 4.15.0:

/usr/share/foreman # grep sequel Gemfile
gem 'sequel', '4.15.0'

I forgot to add another bit:

 /usr/share/foreman # cat bundler.d/postgresql.rb
 group :postgresql do
   # Matches gem requirement specified in ActiveRecord connection adapter
   #gem 'pg', (SETTINGS[:rails] == '4.2' ? '~> 0.15' : '~> 0.18')
   gem 'pg', '0.17.1'
 end

Then as the foreman user running:

bundle update sequel

Then as the root user running:

foreman-rake db:migrate

#12 Updated by Luke Alexander 15 days ago

Luke Alexander wrote:

Luke Alexander wrote:

I run into this issue while upgrading from 1.15.6 to 1.16, I am running Debian Jessie with Postgresql 9.6/9.5, the 'workaround' that seems to help is downgrading the sequel gem from 5.2.0 to 4.15.0:

/usr/share/foreman # grep sequel Gemfile
gem 'sequel', '4.15.0'

I forgot to add another bit:
[...]

Then as the foreman user running:

bundle update

Then as the root user running:

foreman-rake db:migrate

#13 Updated by yannick N 15 days ago

OMG it's Work For Me !!! Luke Alexander can you give more explain ? please

I run into this issue while upgrading from 1.15.6 to 1.16, I am running Debian Jessie with Postgresql 9.6/9.5, the 'workaround' that seems to help is downgrading the sequel gem from >>5.2.0 to 4.15.0:

usr/share/foreman # nano Gemfile
add gem 'sequel', '4.15.0'

/usr/share/foreman # cat bundler.d/postgresql.rb
group :postgresql do
  1. Matches gem requirement specified in ActiveRecord connection adapter
    #gem 'pg', (SETTINGS[:rails] == '4.2' ? '~> 0.15' : '~> 0.18')
    gem 'pg', '0.17.1'
    end

if you do not have pg 0.17.1' install it like this

cd usr/share/foreman
gem install pg -v '0.17.1'
bundle install

Then as the foreman user running:

bundle update sequel

Then as the root user running:

foreman-rake db:migrate

#14 Updated by Michael Moll 15 days ago

  • Priority changed from Urgent to Normal
  • Assigned To set to Ivan Necas
  • Status changed from Need more information to New
  • Project changed from Installer to foreman-tasks

Ivan, if you have time, could you have a look there, again?

In the past it looks like it was only related to pg versions, but now it seems, sequel 5.x is the culprit.

#15 Updated by Ivan Necas 15 days ago

Interesting, I had limited way to debug this in the past, as I could not reproduce this locally. I can guve it a try again, can't promise it will be tomorrow though

#16 Updated by yannick N 14 days ago

Now, i have another problem when i run /usr/sbin/foreman-rake db:migrate (no implicit conversion of nil into String)

Michael Moll if u want i can create another redmine

issue

/usr/sbin/foreman-rake db:migrate
API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
rake aborted!
TypeError: no implicit conversion of nil into String
/usr/share/foreman/config/initializers/assets.rb:73:in `join'
/usr/share/foreman/config/initializers/assets.rb:73:in `block (4 levels) in <top (required)>'
/usr/share/foreman/config/initializers/assets.rb:72:in `map'
/usr/share/foreman/config/initializers/assets.rb:72:in `block (3 levels) in <top (required)>'
/usr/share/foreman/config/initializers/assets.rb:69:in `each'
/usr/share/foreman/config/initializers/assets.rb:69:in `block (2 levels) in <top (required)>'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/lazy_load_hooks.rb:44:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application/finisher.rb:62:in `block in <module:Finisher>'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:30:in `instance_exec'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:30:in `run'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:54:in `run_initializers'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application.rb:352:in `initialize!'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/railtie.rb:194:in `public_send'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/railtie.rb:194:in `method_missing'
/usr/share/foreman/config/environment.rb:5:in `<top (required)>'
/usr/share/foreman/vendor/ruby/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/usr/share/foreman/vendor/ruby/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `block in require'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `require'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application.rb:328:in `require_environment!'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application.rb:457:in `block in run_tasks_blocks'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

#17 Updated by yannick N 14 days ago

after installing a plugin (I do not know which one) : i have no implicit conversion of nil into String

#18 Updated by yannick N 14 days ago

  • Priority changed from Normal to Urgent

#19 Updated by Ewoud Kohl van Wijngaarden 9 days ago

  • Related to Bug #22266: Fresh installation of Foreman with Ansible plugin and proxy is broken after host restart added

Also available in: Atom PDF