Problems with foreman-installer possible during rake::db migration

Hi all,

I’m having an issue with Foreman when trying to add in plugins. There seems to be a problem with the rake::db migrate portion when trying to use the discovery plugin

I’ve managed to get foreman up and running on a basic Ubuntu 16.04.3 install. repo and such set up fine and foreman WebUI is accessible.

I then tried to add in some plugins, and there now seems to be problems iwth the rake database, per the below log.

[ INFO 2017-12-09T12:17:44 main] Foreman_proxy::Feature[Logs]: Starting to evaluate the resource
[ INFO 2017-12-09T12:17:44 main] Foreman_proxy::Feature[Logs]: Evaluated in 0.00 seconds
[ INFO 2017-12-09T12:17:44 main] Foreman_proxy::Settings_file[logs]: Starting to evaluate the resource
[ INFO 2017-12-09T12:17:44 main] Foreman_proxy::Settings_file[logs]: Evaluated in 0.00 seconds
[ INFO 2017-12-09T12:17:44 main] Class[Foreman_proxy::Config]: Starting to evaluate the resource
[ INFO 2017-12-09T12:17:44 main] Class[Foreman_proxy::Config]: Evaluated in 0.00 seconds
[ INFO 2017-12-09T12:17:44 main] /Stage[main]/Foreman_proxy::Service/Service[foreman-proxy]: Starting to evaluate the resource
[DEBUG 2017-12-09T12:17:44 main] Executing: '/bin/systemctl is-active foreman-proxy'
[DEBUG 2017-12-09T12:17:44 main] Executing: '/bin/systemctl is-enabled foreman-proxy'
[ INFO 2017-12-09T12:17:44 main] /Stage[main]/Foreman_proxy::Service/Service[foreman-proxy]: Evaluated in 0.02 seconds
[ INFO 2017-12-09T12:17:44 main] Class[Foreman_proxy::Service]: Starting to evaluate the resource
[ INFO 2017-12-09T12:17:44 main] Class[Foreman_proxy::Service]: Evaluated in 0.00 seconds
[ INFO 2017-12-09T12:17:44 main] Class[Foreman_proxy::Register]: Starting to evaluate the resource
[ INFO 2017-12-09T12:17:44 main] Class[Foreman_proxy::Register]: Evaluated in 0.00 seconds
[ INFO 2017-12-09T12:17:44 main] /Stage[main]/Foreman_proxy::Register/Datacat_collector[foreman_proxy::enabled_features]: Starting to evaluate the resource
[DEBUG 2017-12-09T12:17:44 main] Datacat_collector[foreman_proxy::enabled_features](provider=datacat_collector): Collected {"features"=>["DHCP", "DNS", "Puppet", "Puppet CA", "TFTP", "Logs"]}
[DEBUG 2017-12-09T12:17:44 main] Datacat_collector[foreman_proxy::enabled_features](provider=datacat_collector): Selecting source_key features
[DEBUG 2017-12-09T12:17:44 main] Datacat_collector[foreman_proxy::enabled_features](provider=datacat_collector): Now setting field :features
[ INFO 2017-12-09T12:17:44 main] /Stage[main]/Foreman_proxy::Register/Datacat_collector[foreman_proxy::enabled_features]: Evaluated in 0.00 seconds
[ INFO 2017-12-09T12:17:44 main] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[foreman]: Starting to evaluate the resource
[DEBUG 2017-12-09T12:17:44 main] Foreman_smartproxy[foreman](provider=rest_v3): Making get request to foreman/api/v2/smart_proxies?search=name=%22foreman%22
[DEBUG 2017-12-09T12:17:53 main] Foreman_smartproxy[foreman](provider=rest_v3): Received response 500 from request to https://foreman/api/v2/smart_proxies?search=name=%22foreman%22
[ERROR 2017-12-09T12:17:53 main] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[foreman]: Could not evaluate: Proxy foreman cannot be retrieved: unknown error (response 500)
[ERROR 2017-12-09T12:17:53 main] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:7:in `proxy'
[ERROR 2017-12-09T12:17:53 main] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:13:in `id'
[ERROR 2017-12-09T12:17:53 main] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:17:in `exists?'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property/ensure.rb:81:in `retrieve'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1070:in `retrieve'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1098:in `retrieve_resource'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:300:in `from_resource'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:20:in `evaluate'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:230:in `apply'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:246:in `eval_resource'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `call'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block (2 levels) in evaluate'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:507:in `block in thinmark'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:506:in `thinmark'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block in evaluate'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `evaluate'
[ERROR 2017-12-09T12:17:53 main] /usr/lib/ruby/vendor_ruby/kafo/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:142:in `as_logging_destination'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:221:in `apply'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `block in apply_catalog'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:224:in `block in benchmark'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `benchmark'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:170:in `apply_catalog'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:343:in `run_internal'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `block in run'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:195:in `run'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:350:in `apply_catalog'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:274:in `block in main'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:225:in `main'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:170:in `run_command'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:358:in `block in run'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:662:in `exit_on_fail'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:358:in `run'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
[ERROR 2017-12-09T12:17:53 main] /opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
[ INFO 2017-12-09T12:17:53 main] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[foreman]: Evaluated in 9.04 seconds
[ INFO 2017-12-09T12:17:53 main] Class[Foreman_proxy::Register]: Starting to evaluate the resource
[DEBUG 2017-12-09T12:17:53 main] Class[Foreman_proxy::Register]: Resource is being skipped, unscheduling all events
[ INFO 2017-12-09T12:17:53 main] Class[Foreman_proxy::Register]: Evaluated in 0.00 seconds
[ INFO 2017-12-09T12:17:53 main] Class[Foreman_proxy]: Starting to evaluate the resource
[DEBUG 2017-12-09T12:17:53 main] Class[Foreman_proxy]: Resource is being skipped, unscheduling all events
[ INFO 2017-12-09T12:17:53 main] Class[Foreman_proxy]: Evaluated in 0.00 seconds
[ INFO 2017-12-09T12:17:53 main] Class[Foreman_proxy]: Starting to evaluate the resource
[DEBUG 2017-12-09T12:17:53 main] Class[Foreman_proxy]: Resource is being skipped, unscheduling all events
[ INFO 2017-12-09T12:17:53 main] Class[Foreman_proxy]: Evaluated in 0.00 seconds
[ INFO 2017-12-09T12:17:53 main] Stage[main]: Starting to evaluate the resource
[DEBUG 2017-12-09T12:17:53 main] Stage[main]: Resource is being skipped, unscheduling all events
[ INFO 2017-12-09T12:17:53 main] Stage[main]: Unscheduling all events on Stage[main]
[ INFO 2017-12-09T12:17:53 main] Stage[main]: Evaluated in 0.00 seconds
[ INFO 2017-12-09T12:17:53 main] /Schedule[puppet]: Starting to evaluate the resource
[ INFO 2017-12-09T12:17:53 main] /Schedule[puppet]: Evaluated in 0.00 seconds
[ INFO 2017-12-09T12:17:53 main] /Schedule[hourly]: Starting to evaluate the resource
[ INFO 2017-12-09T12:17:53 main] /Schedule[hourly]: Evaluated in 0.00 seconds
[ INFO 2017-12-09T12:17:53 main] /Schedule[daily]: Starting to evaluate the resource
[ INFO 2017-12-09T12:17:53 main] /Schedule[daily]: Evaluated in 0.00 seconds
[ INFO 2017-12-09T12:17:53 main] /Schedule[weekly]: Starting to evaluate the resource
[ INFO 2017-12-09T12:17:53 main] /Schedule[weekly]: Evaluated in 0.00 seconds
[ INFO 2017-12-09T12:17:53 main] /Schedule[monthly]: Starting to evaluate the resource
[ INFO 2017-12-09T12:17:53 main] /Schedule[monthly]: Evaluated in 0.00 seconds
[ INFO 2017-12-09T12:17:53 main] /Schedule[never]: Starting to evaluate the resource
[ INFO 2017-12-09T12:17:53 main] /Schedule[never]: Evaluated in 0.00 seconds
[ INFO 2017-12-09T12:17:53 main] /Filebucket[puppet]: Starting to evaluate the resource
[ INFO 2017-12-09T12:17:53 main] /Filebucket[puppet]: Evaluated in 0.00 seconds
[DEBUG 2017-12-09T12:17:53 main] Finishing transaction 65285620
[DEBUG 2017-12-09T12:17:53 main] Storing state
[DEBUG 2017-12-09T12:17:53 main] Stored state in 0.20 seconds
[ WARN 2017-12-09T12:17:53 main] Applied catalog in 73.53 seconds
[DEBUG 2017-12-09T12:17:54 main] Applying settings catalog for sections main, reporting, metrics
[DEBUG 2017-12-09T12:17:54 main] Using settings: adding file resource 'confdir': 'File[/etc/puppetlabs/puppet]{:path=>"/etc/puppetlabs/puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
[DEBUG 2017-12-09T12:17:54 main] Using settings: adding file resource 'codedir': 'File[/etc/puppetlabs/code]{:path=>"/etc/puppetlabs/code", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
[DEBUG 2017-12-09T12:17:54 main] Using settings: adding file resource 'vardir': 'File[/opt/puppetlabs/puppet/cache]{:path=>"/opt/puppetlabs/puppet/cache", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
[DEBUG 2017-12-09T12:17:54 main] Using settings: adding file resource 'logdir': 'File[/var/log/puppetlabs/puppet]{:path=>"/var/log/puppetlabs/puppet", :mode=>"750", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
[DEBUG 2017-12-09T12:17:54 main] Using settings: adding file resource 'statedir': 'File[/opt/puppetlabs/puppet/cache/state]{:path=>"/opt/puppetlabs/puppet/cache/state", :mode=>"1755", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
[DEBUG 2017-12-09T12:17:54 main] Using settings: adding file resource 'rundir': 'File[/var/run/puppetlabs]{:path=>"/var/run/puppetlabs", :mode=>"755", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
[DEBUG 2017-12-09T12:17:54 main] Using settings: adding file resource 'libdir': 'File[/opt/puppetlabs/puppet/cache/lib]{:path=>"/opt/puppetlabs/puppet/cache/lib", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
[DEBUG 2017-12-09T12:17:54 main] Using settings: adding file resource 'hiera_config': 'File[/tmp/kafo_hiera20171209-24379-r5u0wx/hiera.conf]{:path=>"/tmp/kafo_hiera20171209-24379-r5u0wx/hiera.conf", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
[DEBUG 2017-12-09T12:17:54 main] Using settings: adding file resource 'preview_outputdir': 'File[/opt/puppetlabs/puppet/cache/preview]{:path=>"/opt/puppetlabs/puppet/cache/preview", :mode=>"750", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
[DEBUG 2017-12-09T12:17:54 main] Using settings: adding file resource 'certdir': 'File[/etc/puppetlabs/puppet/ssl/certs]{:path=>"/etc/puppetlabs/puppet/ssl/certs", :mode=>"755", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
[DEBUG 2017-12-09T12:17:54 main] Using settings: adding file resource 'ssldir': 'File[/etc/puppetlabs/puppet/ssl]{:path=>"/etc/puppetlabs/puppet/ssl", :mode=>"771", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
[DEBUG 2017-12-09T12:17:54 main] Using settings: adding file resource 'publickeydir': 'File[/etc/puppetlabs/puppet/ssl/public_keys]{:path=>"/etc/puppetlabs/puppet/ssl/public_keys", :mode=>"755", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
[DEBUG 2017-12-09T12:17:54 main] Using settings: adding file resource 'requestdir': 'File[/etc/puppetlabs/puppet/ssl/certificate_requests]{:path=>"/etc/puppetlabs/puppet/ssl/certificate_requests", :mode=>"755", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
[DEBUG 2017-12-09T12:17:54 main] Using settings: adding file resource 'privatekeydir': 'File[/etc/puppetlabs/puppet/ssl/private_keys]{:path=>"/etc/puppetlabs/puppet/ssl/private_keys", :mode=>"750", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
[DEBUG 2017-12-09T12:17:54 main] Using settings: adding file resource 'privatedir': 'File[/etc/puppetlabs/puppet/ssl/private]{:path=>"/etc/puppetlabs/puppet/ssl/private", :mode=>"750", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
[DEBUG 2017-12-09T12:17:54 main] Using settings: adding file resource 'hostcert': 'File[/etc/puppetlabs/puppet/ssl/certs/foreman.pem]{:path=>"/etc/puppetlabs/puppet/ssl/certs/foreman.pem", :mode=>"644", :owner=>"puppet", :group=>"puppet", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
[DEBUG 2017-12-09T12:17:54 main] Using settings: adding file resource 'hostprivkey': 'File[/etc/puppetlabs/puppet/ssl/private_keys/foreman.pem]{:path=>"/etc/puppetlabs/puppet/ssl/private_keys/foreman.pem", :mode=>"640", :owner=>"puppet", :group=>"puppet", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
[DEBUG 2017-12-09T12:17:54 main] Using settings: adding file resource 'hostpubkey': 'File[/etc/puppetlabs/puppet/ssl/public_keys/foreman.pem]{:path=>"/etc/puppetlabs/puppet/ssl/public_keys/foreman.pem", :mode=>"644", :owner=>"puppet", :group=>"puppet", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
[DEBUG 2017-12-09T12:17:54 main] Using settings: adding file resource 'localcacert': 'File[/etc/puppetlabs/puppet/ssl/certs/ca.pem]{:path=>"/etc/puppetlabs/puppet/ssl/certs/ca.pem", :mode=>"644", :owner=>"puppet", :group=>"puppet", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
[DEBUG 2017-12-09T12:17:54 main] Using settings: adding file resource 'hostcrl': 'File[/etc/puppetlabs/puppet/ssl/crl.pem]{:path=>"/etc/puppetlabs/puppet/ssl/crl.pem", :mode=>"644", :owner=>"puppet", :group=>"puppet", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
[DEBUG 2017-12-09T12:17:54 main] Using settings: adding file resource 'pluginfactdest': 'File[/opt/puppetlabs/puppet/cache/facts.d]{:path=>"/opt/puppetlabs/puppet/cache/facts.d", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
[DEBUG 2017-12-09T12:17:54 main] /File[/opt/puppetlabs/puppet/cache/state]: Adding autorequire relationship with File[/opt/puppetlabs/puppet/cache]
[DEBUG 2017-12-09T12:17:54 main] /File[/opt/puppetlabs/puppet/cache/lib]: Adding autorequire relationship with File[/opt/puppetlabs/puppet/cache]
[DEBUG 2017-12-09T12:17:54 main] /File[/opt/puppetlabs/puppet/cache/preview]: Adding autorequire relationship with File[/opt/puppetlabs/puppet/cache]
[DEBUG 2017-12-09T12:17:54 main] /File[/etc/puppetlabs/puppet/ssl/certs]: Adding autorequire relationship with File[/etc/puppetlabs/puppet/ssl]
[DEBUG 2017-12-09T12:17:54 main] /File[/etc/puppetlabs/puppet/ssl]: Adding autorequire relationship with File[/etc/puppetlabs/puppet]
[DEBUG 2017-12-09T12:17:54 main] /File[/etc/puppetlabs/puppet/ssl/public_keys]: Adding autorequire relationship with File[/etc/puppetlabs/puppet/ssl]
[DEBUG 2017-12-09T12:17:54 main] /File[/etc/puppetlabs/puppet/ssl/certificate_requests]: Adding autorequire relationship with File[/etc/puppetlabs/puppet/ssl]
[DEBUG 2017-12-09T12:17:54 main] /File[/etc/puppetlabs/puppet/ssl/private_keys]: Adding autorequire relationship with File[/etc/puppetlabs/puppet/ssl]
[DEBUG 2017-12-09T12:17:54 main] /File[/etc/puppetlabs/puppet/ssl/private]: Adding autorequire relationship with File[/etc/puppetlabs/puppet/ssl]
[DEBUG 2017-12-09T12:17:54 main] /File[/etc/puppetlabs/puppet/ssl/certs/foreman.pem]: Adding autorequire relationship with File[/etc/puppetlabs/puppet/ssl/certs]
[DEBUG 2017-12-09T12:17:54 main] /File[/etc/puppetlabs/puppet/ssl/private_keys/foreman.pem]: Adding autorequire relationship with File[/etc/puppetlabs/puppet/ssl/private_keys]
[DEBUG 2017-12-09T12:17:54 main] /File[/etc/puppetlabs/puppet/ssl/public_keys/foreman.pem]: Adding autorequire relationship with File[/etc/puppetlabs/puppet/ssl/public_keys]
[DEBUG 2017-12-09T12:17:54 main] /File[/etc/puppetlabs/puppet/ssl/certs/ca.pem]: Adding autorequire relationship with File[/etc/puppetlabs/puppet/ssl/certs]
[DEBUG 2017-12-09T12:17:54 main] /File[/etc/puppetlabs/puppet/ssl/crl.pem]: Adding autorequire relationship with File[/etc/puppetlabs/puppet/ssl]
[DEBUG 2017-12-09T12:17:54 main] /File[/opt/puppetlabs/puppet/cache/facts.d]: Adding autorequire relationship with File[/opt/puppetlabs/puppet/cache]
[DEBUG 2017-12-09T12:17:54 main] /File[/etc/puppetlabs/code/environments/production]: Adding autorequire relationship with File[/etc/puppetlabs/code]
[DEBUG 2017-12-09T12:17:54 main] Finishing transaction 59008060
[DEBUG 2017-12-09T12:17:54 main] Received report to process from foreman
[ INFO 2017-12-09T12:17:56 main] Puppet has finished, bye!
[ INFO 2017-12-09T12:17:56 main] Executing hooks in group post
[DEBUG 2017-12-09T12:17:56 main] Hook /usr/share/foreman-installer/hooks/post/10-post_install_message.rb returned nil
[ INFO 2017-12-09T12:17:56 main] All hooks in group post finished
[DEBUG 2017-12-09T12:17:56 main] Exit with status code: 6 (signal was 6)
[ERROR 2017-12-09T12:17:56 main] Errors encountered during run:
[ERROR 2017-12-09T12:17:56 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 2017-12-09T12:17:56 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]
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/errors.rb:106:in `fail'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/exec.rb:164:in `sync'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/exec.rb:603:in `refresh'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:147:in `process_callback'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:34:in `block in process_events'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:119:in `block in queued_events'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:118:in `each'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:118:in `queued_events'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:33:in `process_events'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:247:in `eval_resource'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `call'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block (2 levels) in evaluate'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:507:in `block in thinmark'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:506:in `thinmark'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block in evaluate'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `evaluate'
[ERROR 2017-12-09T12:17:56 main] /usr/lib/ruby/vendor_ruby/kafo/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:142:in `as_logging_destination'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:221:in `apply'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `block in apply_catalog'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:224:in `block in benchmark'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `benchmark'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:170:in `apply_catalog'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:343:in `run_internal'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `block in run'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:195:in `run'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:350:in `apply_catalog'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:274:in `block in main'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:225:in `main'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:170:in `run_command'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:358:in `block in run'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:662:in `exit_on_fail'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:358:in `run'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
[ERROR 2017-12-09T12:17:56 main] /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 2017-12-09T12:17:56 main] /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]
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/errors.rb:106:in `fail'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/exec.rb:164:in `sync'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/exec.rb:603:in `refresh'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:147:in `process_callback'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:34:in `block in process_events'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:119:in `block in queued_events'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:118:in `each'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:118:in `queued_events'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:33:in `process_events'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:247:in `eval_resource'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `call'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block (2 levels) in evaluate'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:507:in `block in thinmark'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:506:in `thinmark'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block in evaluate'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `evaluate'
[ERROR 2017-12-09T12:17:56 main] /usr/lib/ruby/vendor_ruby/kafo/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
[ERROR 2017-12-09T12:17:56 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:142:in 

I was executing this as:

sudo foreman-installer --enable-foreman-proxy --foreman-proxy-tftp=true --foreman-proxy-tftp-servername=192.168.100.2 --foreman-proxy-dhcp=true --foreman-proxy-dhcp-interface=eth0 --foreman-proxy-dhcp-gateway=192.168.100.1 --foreman-proxy-dhcp-nameservers="192.168.100.2,192.168.100.1" --foreman-proxy-dns=true --foreman-proxy-dns-interface=eth0 --foreman-proxy-dns-zone=myotherdomain --foreman-proxy-dns-reverse=100.168.192.in-addr.arpa --foreman-proxy-dns-forwarders=192.168.1.6 --foreman-proxy-dns-forwarders=192.168.1.7 --foreman-proxy-dns-forwarders=192.168.1.1 --foreman-proxy-foreman-base-url=foreman --foreman-proxy-oauth-consumer-key=AAABBBCCCDDDDEEEEFFF --foreman-proxy-oauth-consumer-secret=somesecret --enable-foreman-compute-vmware --enable-foreman-compute-libvirt --enable-foreman-plugin-bootdisk --enable-foreman-plugin-salt --enable-foreman-plugin-default-hostgroup --enable-foreman-plugin-dhcp-browser --enable-foreman-plugin-salt --enable-foreman-plugin-remote-execution

After doing some digging, I found http://www.arvinep.com/2015/06/issue-with-foreman-rake-db-during.html and tried the steps from the second link, but this did not seem to fix the issue.

I also purged the package for discovery with sudo apt-get purge ruby-foreman-discovery, again though, with no luck.

Also tried foreman-rake apipie:cache with no luck. Any suggestions welcome.

Thanks!
Robert

Hey @robertmc, welcome to the community :slight_smile:

So I think the issue is here:

[ERROR 2017-12-09T12:17:53 main] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[foreman]: Could not evaluate: Proxy foreman cannot be retrieved: unknown error (response 500)
[ERROR 2017-12-09T12:17:53 main] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:7:in `proxy'

For some reason your smart-proxy is giving 500 errors when it’s being contacted (the Foreman_proxy::Register resource ensures the proxy is registered in the Foreman UI). Can you take a look in the proxy logs and see what errors are present? You may need to bump up the logging level in /etc/foreman-proxy/settings.yml to DEBUG to get stack traces.

I’ve set proxy to be DEBUG and restarted it. The following is shown in the log:

I, [2017-12-09T16:30:43.040948 ]  INFO -- : WEBrick::HTTPServer#start: pid=17638 port=8443
I, [2017-12-09T16:30:43.042301 ]  INFO -- : Smart proxy has launched on 1 socket(s), waiting for requests
I, [2017-12-09T16:30:43.560998 ]  INFO -- : Finished puppet class cache initialization
I, [2017-12-09T16:33:57.014192 ]  INFO -- : 192.168.100.2 - - [09/Dec/2017:16:33:57 +0000] "GET /features HTTP/1.1" 200 48 0.0059

Which corresponds to:

user@foreman:~$ curl https://foreman.example.com:8443/features -k
["dhcp","dns","logs","puppet","puppetca","tftp"]

try running again:

user@foreman:~$ sudo foreman-installer   --enable-foreman-proxy   --foreman-proxy-tftp=true   --foreman-proxy-tftp-servername=192.168.100.2   --foreman-proxy-dhcp=true   --foreman-proxy-dhcp-interface=eth0   --foreman-proxy-dhcp-gateway=192.168.100.1   --foreman-proxy-dhcp-nameservers="192.168.100.2,192.168.100.1"   --foreman-proxy-dns=true   --foreman-proxy-dns-interface=eth0   --foreman-proxy-dns-zone=notexample.com   --foreman-proxy-dns-reverse=210.168.192.in-addr.arpa   --foreman-proxy-dns-forwarders=192.168.1..6   --foreman-proxy-dns-forwarders=192.168.1..7   --foreman-proxy-dns-forwarders=192.168.1..1   --foreman-proxy-foreman-base-url=https://foreman.example.com   --foreman-proxy-oauth-consumer-key=YUZyjuABYSmPfFm78ZSdXvPPy6MboxLM   --foreman-proxy-oauth-consumer-secret=prPEUz3mi9nygwTnStBRbtiWST7KQpvB --enable-foreman-compute-vmware --enable-foreman-compute-libvirt --enable-foreman-plugin-discovery --enable-foreman-plugin-bootdisk --enable-foreman-plugin-salt --enable-foreman-plugin-default-hostgroup --enable-foreman-plugin-dhcp-browser --enable-foreman-plugin-salt --enable-foreman-compute-libvirt --enable-foreman-plugin-remote-execution
 /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'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/exec.rb:164:in `sync'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/exec.rb:603:in `refresh'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:147:in `process_callback'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:34:in `block in process_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:119:in `block in queued_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:118:in `each'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:118:in `queued_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:33:in `process_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:247:in `eval_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block (2 levels) in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:507:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:506:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `evaluate'
/usr/lib/ruby/vendor_ruby/kafo/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:142:in `as_logging_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:221:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `block in apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:224:in `block in benchmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `benchmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:170:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:343:in `run_internal'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:195:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:350:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:274:in `block in main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:225:in `main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:170:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:358:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:662:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:358:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
 /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]
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/errors.rb:106:in `fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/exec.rb:164:in `sync'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/exec.rb:603:in `refresh'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:147:in `process_callback'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:34:in `block in process_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:119:in `block in queued_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:118:in `each'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:118:in `queued_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:33:in `process_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:247:in `eval_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block (2 levels) in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:507:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:506:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `evaluate'
/usr/lib/ruby/vendor_ruby/kafo/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:142:in `as_logging_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:221:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `block in apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:224:in `block in benchmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `benchmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:170:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:343:in `run_internal'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:195:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:350:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:274:in `block in main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:225:in `main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:170:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:358:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:662:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:358:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
 /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[foreman.example.com]: Could not evaluate: Proxy foreman.example.com cannot be retrieved: unknown error (response 500)
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:7:in `proxy'
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:13:in `id'
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:17:in `exists?'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property/ensure.rb:81:in `retrieve'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1070:in `retrieve'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1098:in `retrieve_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:300:in `from_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:20:in `evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:230:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:246:in `eval_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block (2 levels) in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:507:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:506:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `evaluate'
/usr/lib/ruby/vendor_ruby/kafo/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:142:in `as_logging_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:221:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `block in apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:224:in `block in benchmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `benchmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:170:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:343:in `run_internal'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:195:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:350:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:274:in `block in main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:225:in `main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:170:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:358:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:662:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:358:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
 /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[foreman.example.com]: Failed to call refresh: Proxy foreman.example.com cannot be retrieved: unknown error (response 500)
 /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[foreman.example.com]: Proxy foreman.example.com cannot be retrieved: unknown error (response 500)
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:7:in `proxy'
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:13:in `id'
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:17:in `exists?'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property/ensure.rb:81:in `retrieve'
/usr/share/foreman-installer/modules/foreman/lib/puppet/type/foreman_smartproxy.rb:72:in `refresh'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:147:in `process_callback'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:34:in `block in process_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:119:in `block in queued_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:118:in `each'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:118:in `queued_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:33:in `process_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:247:in `eval_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block (2 levels) in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:507:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:506:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `evaluate'
/usr/lib/ruby/vendor_ruby/kafo/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:142:in `as_logging_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:221:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `block in apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:224:in `block in benchmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `benchmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:170:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:343:in `run_internal'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:195:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:350:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:274:in `block in main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:225:in `main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:170:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:358:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:662:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:358:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
Installing             Done                                               [100%] [...........................................................]

Check proxy log:

I, [2017-12-09T16:30:43.040948 ]  INFO -- : WEBrick::HTTPServer#start: pid=17638 port=8443
I, [2017-12-09T16:30:43.042301 ]  INFO -- : Smart proxy has launched on 1 socket(s), waiting for requests
I, [2017-12-09T16:30:43.560998 ]  INFO -- : Finished puppet class cache initialization
I, [2017-12-09T16:33:57.014192 ]  INFO -- : 192.168.210.2 - - [09/Dec/2017:16:33:57 +0000] "GET /features HTTP/1.1" 200 48 0.0059

Thanks.

OK, so the 500 from the proxy is gone, let’s put that down to something network-transient and just watch out if it comes back.

The installer may be eating part of the error. You can run the migrate yourself with foreman-rake db:migrate, so can you post the result of that? It might not be more informative, but at least it will show which migration is failing. Can you also post the output of foreman-rake about:plugins? This will help in case we see any plugins conflicting with each other (unusual but possible).

foreman:~$ sudo 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.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `block in require'
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:44:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:44:in `tsort_each_child'
/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)

Then for the plugins command:

foreman:~$ sudo foreman-rake about:plugins
rake aborted!
Don't know how to build task 'about:plugins' (see --tasks)

(See full trace by running task with --trace)

Same again with --trace

foreman:~$ sudo foreman-rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
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:274:in `block in require'
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/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:422:in `block (2 levels) in each_strongly_connected_component_from'
/usr/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
/usr/lib/ruby/2.3.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:44:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:44:in `tsort_each_child'
/usr/lib/ruby/2.3.0/tsort.rb:415:in `call'
/usr/lib/ruby/2.3.0/tsort.rb:415: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

Thanks

Oh sorry, I always get that wrong, it’s foreman-rake plugins:list - for the record, you can use foreman-rake -T for a list of all tasks.

However, it seems like your db:migrate isn’t even getting started, which implies something is badly borked. Which Foreman version is this by the way? @tbrisker any ideas?

Some more output with packages etc:

foreman:~$ dpkg --list | grep foreman
ii  foreman                             1.16.0-1                                   amd64        Systems management web interface
ii  foreman-cli                         1.16.0-1                                   all          metapackage providing hammer CLI for Foreman
ii  foreman-debug                       1.16.0-1                                   all          provides support utility foreman-debug.
ii  foreman-installer                   1.16.0-1                                   all          Automated puppet-based installer for The Foreman
ii  foreman-libvirt                     1.16.0-1                                   all          metapackage providing libvirt dependencies for Foreman
ii  foreman-postgresql                  1.16.0-1                                   all          metapackage providing PostgreSQL dependencies for Foreman
ii  foreman-proxy                       1.16.0-1                                   all          RESTful proxies for DNS, DHCP, TFTP, and Puppet
ii  foreman-vmware                      1.16.0-1                                   all          metapackage providing vmware dependencies for Foreman
ii  ruby-foreman-bootdisk               9.0.0-1                                    all          Foreman Bootdisk Plugin
ii  ruby-foreman-deface                 1.2.0-1                                    all          Foreman Deface Plugin Dependency
ii  ruby-foreman-default-hostgroup      4.0.0-1                                    all          Foreman Default Hostgroup Plugin
ii  ruby-foreman-dhcp-browser           0.0.7-1                                    all          Foreman DHCP browser Plugin
ii  ruby-foreman-discovery              10.0.0-1                                   all          Foreman Discovery Plugin
ii  ruby-foreman-remote-execution       1.3.3-1                                    all          Foreman Remote Execution Plugin
ii  ruby-foreman-salt                   9.0.0-1                                    all          Foreman Salt Plugin
ii  ruby-foreman-setup                  5.0.0-1                                    all          Foreman Setup Plugin
ii  ruby-foreman-tasks                  0.10.4-1                                   all          Tasks management engine for Foreman.
ii  ruby-hammer-cli-foreman             0.11.0-1                                   all          Foreman commands for Hammer

and for the plugins:

sudo foreman-rake -T | grep plugin
rake plugin:apipie:cache[engine]                    # Generate apipie:cache for plugin - called via rake plugin:apipie:cache[plugin_name]
rake plugin:assets:precompile[plugin]               # Compile plugin assets - called via rake plugin:assets:precompile[plugin_name]
rake plugin:list                                    # List Installed plugins
rake plugin:validate_roles                          # Validate permissions for built-in roles

Giving:

foreman:~$ sudo foreman-rake plugin:list
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:274:in `block in require'
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:44:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:44:in `tsort_each_child'
/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 => plugin:list => environment
(See full trace by running task with --trace)

Let me know if there’s any more info I can post to assist.

Thanks.

The -T thing was just for your own info, there’s all sorts of useful stuff in there.

So I note that the first line of your stacktrace is this:

which is looping over plugins, so I’m assuming one of the plugins is broken. Since we can’t even list plugins while rake tasks are broken, I’m going to take a stab at default hostgroup since that’s (a) one of mine and (b) definitely not updated for 1.16 yet. Try uninstalling it and see if db:migrate gets any better.

Got it working now. For anyone else with this issue:

sudo apt-get purge ruby-foreman-default-hostgroup

The foreman=installer then flubbed again, I noticed it had tried to migrate/install the default-hostgroup plug-in again, so after another purge, I then added an explicit

--no-enable-foreman-plugin-default-hostgroup

to then end of my foreman-installer command and it completed OK.

Thanks again for all your help this weekend.

For the record, that’s because the installer remembers previous options, so that you don’t have to specify huge invocations every time. Once you have it working the way you want, simply running foreman-installer will produce the same result.

Glad it’s working. I really need to get default hostgroup fixed up…

2 Likes

Will https://github.com/theforeman/foreman_default_hostgroup/commit/4277ba7eb09f96276d0b9c9b908c81c119afbb12 make it compatible with 1.16 again?

Possibly, the main issue is my lack of development environment right now. I can’t really test anything until I get that sorted :wink: