Project

General

Profile

Bug #13598

katello-installer fails running foreman-rake db:seed

Added by Kedar Bidarkar almost 6 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Installer
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

currently running katello-installer fails with the below error.

[ERROR 2016-02-08 12:39:59 verbose] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: Failed to call refresh: /usr/sbin/foreman-rake db:seed returned 1 instead of one of [0]
[ERROR 2016-02-08 12:39:59 verbose] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: /usr/sbin/foreman-rake db:seed returned 1 instead of one of [0]
[ INFO 2016-02-08 12:39:59 verbose] /usr/share/ruby/vendor_ruby/puppet/util/errors.rb:106:in `fail'
[ INFO 2016-02-08 12:39:59 verbose] /usr/share/ruby/vendor_ruby/puppet/type/exec.rb:160:in `sync'
[ INFO 2016-02-08 12:39:59 verbose] /usr/share/ruby/vendor_ruby/puppet/type/exec.rb:583:in `refresh'
[ INFO 2016-02-08 12:39:59 verbose] /usr/share/ruby/vendor_ruby/puppet/transaction/event_manager.rb:101:in `process_callback'
[ INFO 2016-02-08 12:39:59 verbose] /usr/share/ruby/vendor_ruby/puppet/transaction/event_manager.rb:20:in `block in process_events'
[ INFO 2016-02-08 12:39:59 verbose] /usr/share/ruby/vendor_ruby/puppet/transaction/event_manager.rb:93:in `block in queued_events'
[ INFO 2016-02-08 12:39:59 verbose] /usr/share/ruby/vendor_ruby/puppet/transaction/event_manager.rb:92:in `each'
[ INFO 2016-02-08 12:39:59 verbose] /usr/share/ruby/vendor_ruby/puppet/transaction/event_manager.rb:92:in `queued_events'
[ INFO 2016-02-08 12:39:59 verbose] /usr/share/ruby/vendor_ruby/puppet/transaction/event_manager.rb:19:in `process_events'
[ INFO 2016-02-08 12:39:59 verbose] /usr/share/ruby/vendor_ruby/puppet/transaction.rb:221:in `eval_resource'
[ INFO 2016-02-08 12:39:59 verbose] /usr/share/ruby/vendor_ruby/puppet/transaction.rb:147:in `call'
[ INFO 2016-02-08 12:39:59 verbose] /usr/share/ruby/vendor_ruby/puppet/transaction.rb:147:in `block (2 levels) in evaluate'
[ INFO 2016-02-08 12:39:59 verbose] /usr/share/ruby/vendor_ruby/puppet/util.rb:335:in `block in thinmark'

History

#1 Updated by Ohad Levy almost 6 years ago

can you run:
foreman-rake db:seed --trace ?

thanks

#2 Updated by Kedar Bidarkar almost 6 years ago

Below is the output while running the same with --trace.

katello-installer]# foreman-rake db:seed --trace
Ignoring ruby-libvirt-0.5.2 because its extensions are not built. Try: gem pristine ruby-libvirt --version 0.5.2
/opt/theforeman/tfm/root/usr/share/gems/gems/docker-api-1.17.0/lib/docker.rb:103: warning: circular argument reference - connection
  • Invoke db:seed (first_time)
  • Execute db:seed
  • Invoke db:abort_if_pending_migrations (first_time)
  • Invoke environment (first_time)
  • Execute environment
  • Execute db:abort_if_pending_migrations
    Seeding /usr/share/foreman/db/seeds.d/03-auth_sources.rb
    Seeding /usr/share/foreman/db/seeds.d/03-permissions.rb
    Seeding /usr/share/foreman/db/seeds.d/03-roles.rb
    Seeding /usr/share/foreman/db/seeds.d/04-admin.rb
    Seeding /usr/share/foreman/db/seeds.d/05-taxonomies.rb
    Seeding /usr/share/foreman/db/seeds.d/06-architectures.rb
    Seeding /usr/share/foreman/db/seeds.d/07-provisioning_templates.rb
    Seeding /usr/share/foreman/db/seeds.d/08-partition_tables.rb
    Seeding /usr/share/foreman/db/seeds.d/10-installation_media.rb
    Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-2.5.0/db/seeds.d/101-locations.rb
    Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-2.5.0/db/seeds.d/102-organizations.rb
    Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-2.5.0/db/seeds.d/103-provisioning_templates.rb
    Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-2.5.0/db/seeds.d/104-proxy.rb
    Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-2.5.0/db/seeds.d/105-roles_permissions.rb
    Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-2.5.0/db/seeds.d/106-mail_notifications.rb
    Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-2.5.0/db/seeds.d/107-enable_dynflow.rb
    Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-2.5.0/db/seeds.d/108-ensure_sync_notification.rb
    rake aborted!
    RestClient::InternalServerError: 500 Internal Server Error
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!'
    /opt/theforeman/tfm/root/usr/share/gems/gems/runcible-1.6.0/lib/runcible/base.rb:79:in `block in get_response'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:228:in `call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:228:in `process_result'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rbovirt-0.0.35/lib/restclient_ext/request.rb:50:in `block in transmit'
    /opt/rh/rh-ruby22/root/usr/share/ruby/net/http.rb:853:in `start'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rbovirt-0.0.35/lib/restclient_ext/request.rb:44:in `transmit'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/resource.rb:51:in `get'
    /opt/theforeman/tfm/root/usr/share/gems/gems/runcible-1.6.0/lib/runcible/base.rb:78:in `get_response'
    /opt/theforeman/tfm/root/usr/share/gems/gems/runcible-1.6.0/lib/runcible/base.rb:66:in `call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/runcible-1.6.0/lib/runcible/resources/event_notifier.rb:48:in `list'
    /opt/theforeman/tfm/root/usr/share/gems/gems/katello-2.5.0/app/models/katello/glue/pulp/repo.rb:34:in `ensure_sync_notification'
    /opt/theforeman/tfm/root/usr/share/gems/gems/katello-2.5.0/db/seeds.d/108-ensure_sync_notification.rb:9:in `<top (required)>'
    /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:241:in `load'
    /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:241:in `block in load'
    /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in `load_dependency'
    /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:241:in `load'
    /usr/share/foreman/db/seeds.rb:81:in `block in <top (required)>'
    /usr/share/foreman/db/seeds.rb:79:in `each'
    /usr/share/foreman/db/seeds.rb:79:in `<top (required)>'
    /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:241:in `load'
    /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:241:in `block in load'
    /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in `load_dependency'
    /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:241:in `load'
    /opt/rh/rh-ror41/root/usr/share/gems/gems/railties-4.1.5/lib/rails/engine.rb:543:in `load_seed'
    /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/tasks/database_tasks.rb:184:in `load_seed'
    /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/railties/databases.rake:173:in `block (2 levels) in <top (required)>'
    /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
    /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
    /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
    /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
    /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
    /opt/rh/rh-ruby22/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
    /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
    /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
    /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
    /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
    /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
    /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
    /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
    /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
    /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
    /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
    /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
    /opt/rh/rh-ruby22/root/usr/bin/rake:33:in `<main>'
    Tasks: TOP => db:seed

#3 Updated by Justin Sherrill almost 6 years ago

caused by: https://github.com/Katello/puppet-pulp/pull/123/

example: /etc/pulp/server/plugins.conf.d/yum_importer.json


{
        "proxy_host": http://ginger.lab.eng.rdu2.redhat.com,

        "proxy_port": 3128,

        "proxy_username": admin,

        "proxy_password": redhat

}

#4 Updated by Eric Helms almost 6 years ago

  • Status changed from New to Closed
  • Legacy Backlogs Release (now unused) set to 86
  • Pull request https://github.com/Katello/puppet-pulp/pull/125 added

#5 Updated by Fink Nottle over 5 years ago

FYI, this bug breaks 2.4 (current stable) installs too. After pulling in the changes, it goes through.

#6 Updated by Mario Gamboa over 5 years ago

Hi Guys

Already apply the patch but no luck in my second attempt got all this

I got also this issues with RC5

Upgrade Step: Running installer...
Could not prefetch mongodb_user provider 'mongodb': Could not evalute MongoDB shell command: printjson(db.system.users.find().toArray())
/Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: Failed to call refresh: /usr/sbin/foreman-rake db:seed returned 1 instead of one of [0]
/Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: /usr/sbin/foreman-rake db:seed returned 1 instead of one of [0]

Upgrade step db_seed failed. Check logs for more information.
[root@nz2zsat01 katello-installer]# foreman-rake db:seed --trace
  • Invoke db:seed (first_time)
  • Execute db:seed
  • Invoke db:abort_if_pending_migrations (first_time)
  • Invoke environment (first_time)
  • Execute environment
  • Execute db:abort_if_pending_migrations
    You have 8 pending migrations:
    20151009084350 DropPtables
    20151019174035 RenameDomainHostCount
    20151025120534 AddHiddenValueToLookupKey
    20151104100257 AddHostsCountToHostgroup
    20151120153254 DeleteBootableInterface
    20151220093801 RemoveSpacesFromSmartVariableKey
    20160201131211 AddExpiredLogsToSmartProxy
    20160215143900 AddSubnetDomainRelationConstraints
    Run `rake db:migrate` to update your database then try again.
    [root@nz2zsat01 katello-installer]# foreman-rake db:seed
    You have 8 pending migrations:
    20151009084350 DropPtables
    20151019174035 RenameDomainHostCount
    20151025120534 AddHiddenValueToLookupKey
    20151104100257 AddHostsCountToHostgroup
    20151120153254 DeleteBootableInterface
    20151220093801 RemoveSpacesFromSmartVariableKey
    20160201131211 AddExpiredLogsToSmartProxy
    20160215143900 AddSubnetDomainRelationConstraints
    Run `rake db:migrate` to update your database then try again.
    [root@nz2zsat01 katello-installer]# rake db:migrate --trace
    rake aborted!
    No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
    /usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:598:in `raw_load_rakefile'
    /usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:89:in `block in load_rakefile'
    /usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:160:in `standard_exception_handling'
    /usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:88:in `load_rakefile'
    /usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:72:in `block in run'
    /usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:160:in `standard_exception_handling'
    /usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:70:in `run'
    /usr/bin/rake:37:in `<main>'
    [root@nz2zsat01 katello-installer]# rake db:migrate
    rake aborted!
    No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)

(See full trace by running task with --trace)
[root@nz2zsat01 katello-installer]# rake db:migrate --trace
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
/usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:598:in `raw_load_rakefile'
/usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:89:in `block in load_rakefile'
/usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:160:in `standard_exception_handling'
/usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:88:in `load_rakefile'
/usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:72:in `block in run'
/usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:160:in `standard_exception_handling'
/usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:70:in `run'
/usr/bin/rake:37:in `<main>'
[root@nz2zsat01 katello-installer]# packet_write_wait: Connection to 172.25.176.245: Broken pipe
mac:~ Mario$ DeleteBootableInterface
-bash: DeleteBootableInterface: command not found
mac:~ Mario$ 20151220093801 RemoveSpacesFromSmartVariableKey
-bash: 20151220093801: command not found
mac:~ Mario$ 20160201131211 AddExpiredLogsToSmartProxy
-bash: 20160201131211: command not found
mac:~ Mario$ 20160215143900 AddSubnetDomainRelationConstraints
-bash: 20160215143900: command not found
mac:~ Mario$ Run `rake db:migrate` to update your database then try again.
[root@nz2zsat01 katello-installer]# rake db:migrate --trace
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
/usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:598:in `raw_load_rakefile'
/usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:89:in `block in load_rakefile'
/usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:160:in `standard_exception_handling'
/usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:88:in `load_rakefile'
/usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:72:in `block in run'
/usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:160:in `standard_exception_handling'
/usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:70:in `run'
/usr/bin/rake:37:in `<main>'
[root@nz2zsat01 katello-installer]# rake db:migrate
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)

(See full trace by running task with --trace)
[root@nz2zsat01 katello-installer]# rake db:migrate --trake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)

(See full trace by running task with --trace)
-bash: Run: command not found
mac:~ Mario$ [root@nz2zsat01 katello-installer]# rake db:migrate --trace
-bash: [root@nz2zsat01: command not found
mac:~ Mario$ rake aborted!
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)

(See full trace by running task with --trace)
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
/usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:598:in `raw_load_rakefile'
/usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:89:in `block in load_rakefile'
/usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:160:in `standard_exception_handling'
/usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:88:in `load_rakefile'
/usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:72:in `block in run'
/usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:160:in `standard_exception_handling'
/usr/share/gems/gems/rake-0.9.6/lib/rake/application.rb:70:in `run'
/usr/bin/rake:37:in `<main>'
[root@nz2zsat01 katello-installer]# rake db:migrate
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)

Also available in: Atom PDF