Project

General

Profile

Actions

Bug #22266

closed

Fresh installation of Foreman with Ansible plugin and proxy is broken after host restart

Added by Romans Krjukovs about 6 years ago. Updated almost 6 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hey,

Fresh installation of Foreman 1.16 with Ansible plugin and proxy on clean Ubuntu Xenial is broken after host restart.

Steps to reproduce:
- get clean OS (virtualbox in my case);
- enable Ansible ppa:

sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-add-repository ppa:ansible/ansible

- install foreman installer:
sudo su - 
apt-get -y install ca-certificates
wget https://apt.puppetlabs.com/puppet5-release-xenial.deb
dpkg -i puppet5-release-xenial.deb

echo "deb http://deb.theforeman.org/ xenial 1.16" > /etc/apt/sources.list.d/foreman.list
echo "deb http://deb.theforeman.org/ plugins 1.16" >> /etc/apt/sources.list.d/foreman.list
apt-get -y install ca-certificates
wget -q https://deb.theforeman.org/pubkey.gpg -O- | apt-key add -

apt-get update && apt-get -y install foreman-installer

- install foreman:
foreman-installer --enable-foreman-plugin-ansible --enable-foreman-proxy-plugin-ansible -v

- installation is complete without errors:
...
[DEBUG 2018-01-15T11:35:30 main]  Finishing transaction 65695780
[DEBUG 2018-01-15T11:35:30 main]  Received report to process from foremansible.lan
[ INFO 2018-01-15T11:35:33 main] Puppet has finished, bye!
[ INFO 2018-01-15T11:35:33 main] Executing hooks in group post
[DEBUG 2018-01-15T11:35:33 main] Hook /usr/share/foreman-installer/hooks/post/10-post_install_message.rb returned nil
[ INFO 2018-01-15T11:35:33 main] All hooks in group post finished
[DEBUG 2018-01-15T11:35:33 main] Exit with status code: 2 (signal was 2)
[DEBUG 2018-01-15T11:35:33 main] Cleaning /tmp/kafo_puppet20180115-9397-3rrchs.conf
[DEBUG 2018-01-15T11:35:33 main] Cleaning /tmp/kafo_hiera20180115-9397-b011lm
[DEBUG 2018-01-15T11:35:33 main] Cleaning /tmp/kafo_puppet20180115-9397-1aae9jd.conf
[DEBUG 2018-01-15T11:35:33 main] Cleaning /tmp/default_values.yaml
[ INFO 2018-01-15T11:35:33 main] Installer finished in 1356.3395379 seconds

- check Foreman is up & running via browser (is OK);
- restart host;
- check Foreman is up & running via browser (is NOK):
got "We're sorry, but something went wrong." etc.;

Latest error in /var/log/apache2/error.lg:

[ 2018-01-15 11:45:42.1745 1399/7ff5a005c700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /usr/share/foreman: An error occured while starting the web application.
  Error ID: 8fbdc3a8
  Error details saved to: /tmp/passenger-error-PSIaZW.html
  Message from application: PG::DuplicateColumn: ERROR:  column "version" of relation "dynflow_schema_info" already exists
 (Sequel::DatabaseError)
  /usr/share/foreman/vendor/ruby/2.3.0/gems/sequel-5.2.0/lib/sequel/adapters/postgres.rb:145:in `async_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:153:in `block (2 levels) in <class:Engine>'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/public_api.rb:42:in `block in call_event'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/public_api.rb:41:in `each'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/public_api.rb:41:in `call_event'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:393:in `before_handling_requests'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:134:in `negotiate_spawn_command'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:158:in `<module:App>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'

[ 2018-01-15 11:45:42.1870 1399/7ff5a0bab700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-7] Cannot checkout session because a spawning error occurred. The identifier of the error is 8fbdc3a8. Please see earlier logs for details about the error.
App 2552 stdout: 
App 2552 stderr: The PGconn, PGresult, and PGError constants are deprecated, and will be
App 2552 stderr: removed as of version 1.0.
App 2552 stderr: 
App 2552 stderr: You should use PG::Connection, PG::Result, and PG::Error instead, respectively.
App 2552 stderr: 
App 2552 stderr: Called from /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `block in require'

Please, advise.
Thank You!

Regards
/Romans


Related issues 1 (0 open1 closed)

Is duplicate of Packaging - Bug #20050: ruby-sequel-pg DEB pollutes Foreman ruby gem environmentClosedIvan Necas06/19/2017Actions
Actions

Also available in: Atom PDF