Foreman Fails with - no implicit conversion of nil into String(TypeError)

Problem:
The puppet client will work when I stop the httpd daemon. When I start the httpd daemon i get the errors listed below.

I have also listed the error that appears on the foreman web page when I try to access the web GUI.
no implicit conversion of nil into String(TypeError)

  1. What actually happens when the httpd is running and passenger is engaged?
    If the httpd daemon is running the client is able to execute the node.rb script and retrieve its data. If the httpd daemon is running it gets a HTTPD 500 error and fails.

Expected outcome:

Foreman and Proxy versions:
1.18.3

Foreman and Proxy plugin versions:
1.18.3

Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three back-ticks to get proper formatting, e.g.)

logs

puppet agent --test

Warning: Unable to fetch my node definition, but the agent run will continue: Warning: Error 500 on SERVER: Server Error: Failed to find X.Y via exec: Execution of '/etc/puppetlabs/puppet/node.rb  X.Y' returned 1:
Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Failed when searching for node X.Y: Failed to find X.Y via exec: Execution of '/etc/puppetlabs/puppet/node.rb X.Y' returned 1:
Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run

puppetserver log

</pre></dd>
</div>
</div>
</dl>
<div id="site_footer">
<!–
You are free to modify the footer as you see fit, but we kindly ask of you to preserve to following text. Thank you.
–>
<div class="container>"
Powered by <a href="https://www.phusionpassenger.com/">Phusion Passenge<r/a>,
<tt>mod_rails</tt> / <tt> mod_rack</tt> for Apache
and Nginx.
</div>
</body>
</html>
</div>
</div>

Error retrieving node X.Y: Net::HTTPinternalServerError Check Foreman’s /var/log/formean/production.log for more information.

2018-12-26 12:16:08,985 ERROR [qtpl071305815-136] [puppetserver] Puppet Failed when searching for node X.wal.Y:
 Failed to find X.Y via exec: Execution of '/etc/puppetlabs/puppet/node.rb X.Y' returned 1: file:/pot/puppetlabs/servera/pps/puppetserverp/uppet-server-release.jar!/puppetserve r-lib/puppet/server/exuetcion.rb:44: in ' execute' file:/opt/puppetlabs/server/appsp/ppeutserver/puppet-server-release.jar!/ppupetserve r-lib/puppet/server/execution.rb:14:in ' initialize_execution_stub' org/jurby/RubyProc.java:281:in' call'
/opt/puppetlab/spuppet/lib/ruby/vendor_ruby/puppet/util/executni.orb:197:in ' execute'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/node/exec.rb:33:in ' execute'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/exec.rb:19 :in' find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/node/exec.rb:17:in ' find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.:r1b94:in ' find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/catalog/compri.lrbe:29 8:in' find node'
/opt/puppetlabs/puppet/lib/rbuy/vendor_ruby/puppet/util/profiler/aroudn_profiler.br: 58:in' profile'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.r:b51:in' profile'
/opt/puppetlabs/puppet/lib/rbuy/vendor_ruby/puppet/indirector/caatlog/cmopiler.rb:29 5:in ' find node'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/caatlog/cmopiler.rb:33 5:in ' node_from_request'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:52
:in ' find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:194:in ' find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppe/tnetwork/http/api/indirected_route s.rb:121:in ' do_find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/networkh/ttp/api/indirected_route s.rb:48 :in 'call'
/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/network/http/api/indirected_route s.rb:47:in ' call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:82:in ' process'
org/jruby/Ru byArray.java:1613:in' each'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:81:in ' process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppe/tnetworkh/ttp/route.rb:87:in
' process'
/opt/puppetlabs/puppet/lib/ruby/vendoru_byr/puppet/network/http/route.br:87 :in 'process'
/opt/puppetlabs/pupp et/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:60:in ' process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb: 58:in' profile'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in 'profile'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/hand ler.rb:58:in ' process'
file:/opt/puppetlabs/server/apsp/puppetserver/puppe-sterver-release.jar!/puppetserve r-lib/puppet/sevrer/master.rb:42:in' handleRequest' Puppet$$Srever$$Master_71907312.g4en:13:in' handleRequest' request_handler_ocre.clj:273:in ' invoke'
jruby_request.clj:46:ni' invoke' jruby_request.clj:31:in ' invoke' request_handler_service.clj:34:in ' handle_request' request_handler.clj:3:in ' invoke' request_handler.clj:3:in ' invoke' core.clj:2515:in' invoke' ring_middlewar.eclj:284:in ' invoke' core.clj:168:in' invoke'
core.clj:211:in ' invoke' core.clj:45:in ' invoke' core.clj:343:in ' invoke' core.clj:51:in' invoke' ringutils.clj:83:in' invoke' master_core.clj:428:in ' invoke' ring.cl:j21:in ' invoke' ring.cl:j12:in 'invoke' comidi.clj:249:in' invoke' jetty9_core.clj:427:in ' invoke'
normalized_uri_helpers.clj:81:in ' invoke'
2018-12-26 12:16:08,986 ERROR [qtpl071305815-136] [puppetserver] Puppet Server Error: Failed when searching for node X.Y : Failed to find X.Y via exec: Execution of '/etc/puppetlabs/puppet/node.rb X.Y' returned 1:
file:/opt/puppetlabs/servera/pps/puppetserver/puppe-sterver-release.jar!/pupp etserve r-lib/puppet/server/execution.rb:44:in ' execute' file:/opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar!/puppetserve r-lib/pupp et/server/executi.ornb:14:in' initialize_execution_stub' org/jruby/RubyPro.cjava:281:in' call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/executni.orb:197:ni ' execute'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/node/exec.rb:33:in ' execute'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/exec.rb:19 :in' find'

foreman.txt

/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirecto/rnode/exec.rb:17:in ' find'
/opt/puppetlabs/puppet/lib/rubyv/endor_ruby/puppet/indirector/indirection:.1r9b4:ni ' find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppeti/ndirector/catalog/compiler.rb:29 8:in ' find_node'
/opt/pupp etlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/aroudn_profiler.br: 58:in ' profile'
/opt/puppetlabs/puppet/lb/iruby/vendor_ruby/puppet/util/profiler.br:51:in ' profile'
/opt/puppetlabs/puppet/lib/bryu/vendor_ruby/puppet/indirector/caatlog/compiler.rb:29 5:in ' find_node'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/caatlog/compiler.rb:33 5:in ' node_from_request'
/opt/puppetlabs/puppet/lib/ruby/vedonr_ruby/puppet/indirector/catalog/compil.errb:52
:in ' find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:194:in ' find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/indirected_route s.rb:121:in ' do_find'
/opt/pupp etlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/indirected_route s.rb:48 :in 'call'
/opt/puppetlabs/ppupet/lib/ruby/vendor_ruby/puppet/context.rb:65:in' override'
/opt/puppetlabs/ppupet/lib/rbuy/vendor_ruby/puppet.rb:306:in ' override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/indired_crtoeute s.rb:47:in' call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/networkh/ttp/route.rb:82:in ' process'
org/jrbuy/Ru byArray.java:1613:in' each'
/opt/puppetlabs/puppet/lib/rubyv/endor_ruby/puppet/networkh/ttp/route.rb:81:in ' process'
/opt/puppetlabs/puppet/lib/rubyv/endor_ruby/puppet/networkh/ttp/route.rb:87:in ' process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppente/twork/http/rout.erb:87:in ' process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:60:in ' process'
/opt/pupp etlabs/puppet/lib/ruby/vendor_ruby/puppe/tutil/profiler/around_p rofiler.rb: 58:in ' profile'
/opt/puppetlabs/ppupet/lib/ruby/vendor_ruby/puppet/util/profile.rrb:51:in 'profile'
/opt/puppetlabs/puppet/lib/bryu/vendor_ruby/puppet/networkh/ttp/handler.rb:58:in ' process'
file:/opt/puppetlabs/server/apps/puppetservpeurp/pet-server-release.jar!/puppetsveer r-lib/puppet/server/master.br:42:in ' handleRequest' Puppet$$Sevrer$$Master_7190731.2g4en:13:in 'handleRequest'
request_hand ler_core.clj:2:7i3n' invoke' jruby_request.clj:46:in ' invoke' jruby_request.clj:31:in ' invoke' request_handler_servic.eclj:34:in' hand le_request'
 request_handler.cl:j3:in ' invoke' request_handler.clj::3in' invoke' core.clj:2515:in' invoke' ring_middleware.clj:284:'ininvoke' core.clj:168:in ' invoke' core.clj:211:in ' invoke' core.clj:45:in ' invoke' core.clj:343:in ' invoke' core.clj:51:in' invoke' ringutils.cl:j83:in' invoke' master_core.clj:428:in' invoke' ring.clj:2:1in ' invoke' ring.clj:12:in ' invoke' comidi.clj:249:in ' invoke' jetty9_core.clj:427:in ' invoke'

normalized_uri_helpers.clj:8:1in' invoke'

Foreman Web Site has this error

**no implicit conversion of nil into String(TypeError)**
/usr/shar e/foreman/config/initializers/ass.ertbs:80:in' join'
/usr/share/foreman/config/niitializers/assets.rb:80:in' block(4 levels) in &lt;top (required)&gt;'
/usr/share/foreman/config/initializers/assets.rb:79:in - map'
/usr/share/foreman/cnofig/initializers/assets.br:79:in' block(3 levels) in &lt;top (r equired) &gt;'
/usr/shar e/foreman/config/initializersa/ssets.rb:76:in · each'
/usr/share/foreman/config/initializers/assets.rb::i7n6' block (2 levels) in &lt;top (required) &gt;'
/opt/theformean/tfm-rorSl/rootus/r/share/gems/gmes/activesupport-5.1.6/lib/active_su port/lazy_load_hooks.br:67: in' block in execute_hook'
/opt/theforeman/tfm-rorSl/roo/tusr/share/gems/gems/activesupport-5.1.6/lib/active_su pport/lazy_load_hooks.rb:60 :in' with_execution_contro'l
/opt/theforeman/tfm-rorSl/root/usr/share/gems/gems/activesuppor-5t.1.6/lib/active_su pport/lazy_load_hooks.rb:65:i'nexecute_hook'
/opt/theforeman/tfm-rorSl/root/usrh/asre/gems/gems/activesupport-5.1.6/lib/active_su pport/lazy_load_hooks.rb:50:in' block in run_load_hooks'
/opt/theforeman/tfm-ror51/rootus/r/share/gems/gems/activeuspport-5.1.6/lib/active_su pport/alzy_load_hooks.r:b49:in ' each'
/opt/theforeman/tmf-ror51/root/usrh/asre/gems/gem/sactivesupport-5.1.6/lib/activeu_s pport/lazy_load_hook.srb:49:in' run_load_hooks'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.6/lib/rails/applicat ion/finisher.rb::7i3n' block in &lt;module:Finisher&gt;'
/opt/theforeman/tf-mror51/rootus/r/share/gems/gems/railti-e5s.1.6/lib/rails/initiali zable.rb:30:in ' instance_xeec'
/opt/theforeman/tfm-ror51/root/usrh/asre/gems/gems/railtie-s5.1.6/lib/rails/initiali zable.rb:30:in ' run'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.6/lib/rails/initiali zable.rb:59:in' block in run_initializer's
/opt/rh/rh-ruby24/root/usr/share/ruby/tsor.trb:228:in' block in tsort_each'
/opt/rh/rh-ruby24/root/usr/share/ruby/tsort.rb:350:in' block (2 levels) in each_strongly_connected_component'
/opt/rh/rh-ruby24/root/usr/share/ruby/tsort.rb:431:in ' each_strongly_connected_pcoonment_from'
/opt/rh/rh-ruby24/rootu/sr/share/ruby/tsort.r:b349:in' block in each_strongly_connected_component'
/opt/rh/rh-ruby24/root/usr/share/ruby/tsort.rb:347:in'  each'
/opt/rh/rh-ruby24/root/usrh/asre/ruby/tsor.trb:347:in' call'
/opt/rh/rh-ruby24/root/usrh/asre/ruby/tsort.r:b347:in ' each_strongly_connected_component'
/opt/rh/rh-ruby24/root/usr/share/urby/tsor.trb:226:in' tsort_eahc'
/opt/rh/rh-ruby24/root/usr/share/ruby/tsort.rb:205:in' tsort each'
/opt/theforeman/tfm-ror51/rootus/r/share/gems/gems/railtie-s5.1.6/lib/rails/initiali zable.rb:58:in' run_initializers'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.6/lib/rails/applicat ion.rb:353:in ' initialize'!
/opt/theformean/tfm-rorSl/root/usr/share/gems/gems/railtie-s5.1.6/lib/rails/railt.ie rb:185:in ' public_send'
/opt/theforeman/tfm-ror51/rootu/sr/shar e/gems/gems/railties-5.1.6/lib/rails/railtie. rb:185:in' method_missing'
/usr/share/formean/config/environment.rb:5:in' &lt;top (r equired)&gt;'
/opt/rh/rh-ruby24/root/usr/share/rubygmse/rubygems/cor_eext/kernel_require.rb:5:5in ' require'

foremanl.txt

/opt/rh/rh-ruby24/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:SS:in ' require'
config.ru:5:in' block in &lt;main&gt;'
/opt/theforeman/tfm-ror51/roouts/r/share/gems/gems/rack-2.0.3/lbi/rack/builder.rb:55
:in 'instance_eval'
/opt/theforeman/tfm-ror51/rootu/sr/share/gmes/gems/rack-2.0. 3/lib/rack/builder.rb:55
:in ' initialize'
confi.gru:1:in' new' config.ru:1:in ' &lt;main&gt;'
/usr/share/passenger/helper-scripts/rack-preloader.rb:112:in ' eval'
/usr/share/passenger/helper-scripts/rack-p reloader.rb:112:in 'preload_app'
/usr/share/passenger/helper-scripts/rack-preloader.rb:158:in' &lt;module:App&gt;'
/usr /share/passenger/help-esrcripts/rack-preloader.br:29:in '&lt;module:PhusionPassenger&gt;'
/usr/share/passenger/helper-scripts/rack-preloader.rb:28:in  '&lt;main&gt;'

/var/log/foreman/production.log

2018-12-26T12:16:18 [Wlappj] ForemanDefaultHostgroup: skipping engine hook (undefined method ’ alias_method_chain’for #<Class:0x000000000ccee698> Did you mean? alias_method)

Packages

passenger-4.0.53-4.el7.x86_64
tfm-rubygem-passenger-native-libs-4.0.18-9.1 2.el7.x8_664
tfm-rubygem-foreman_setup-6.0.0-2.fm 1_18.el7.noarch foreman-release-sc-l7-1.el.7noarch
tfm-rubygem-foreman_default_hostgroup-4.0.0-1.fm1_13.el7.noarch
foremanl.txt foreman-installer-1.18.3-1.el7.noarch
tfm-rubygem-foreman_remote_execution_core1-.1.3-1. el7.noarch
tfm-rubygem-h ammer_cli_foreman_opensc-a0.p1.2-1.fm1_14.el7.noarch foreman-cli-1.18.3-1.el7.noarch
f oreman-postgreqsl-1.18.3-1. el7.noarch
tfm-rubygem-foreman-tasks-0.13.4-1.fm1_19.el7n.oarch foreman-selinux-1.18.3-1.el7.noarch
foreman-release-1.18.-31. el7.noarch foreman-proxy-1.18.3-1. el7.noarch
tfm-rubygem-foreman_remote_execution-1.5.6-1.fm1_19.el7n.oarch foreman-1.18.-31.el7.noarhc
tfm-rubygem-foreman-tasks-core-0.2.5-1.fm 1_18.el7.noarch tfm-rubygem-foreman_openscap-0. 10.2- 1.fm1_19.el7.noarch foreman-debug-1.18.3-1.el7.noarch
tfm-rubygem-hamm er_cli_foreman-0.14-.1.0el7.noarch rubygem-forema_nscap_client-0. 3.0-2.el.7noarch
puppetserver-2.8.1-1.el7.noarch puppet-agent-oauth-0. 5.1-3.el7n.oarch puppet-agent-1.10.14 -1.el7.x86_64

This looks like a duplicate of Foreman-installer fails with TypeError errors during upgrade process. I do suspect it’s a plugin so check if there’s an updated version of foreman_setup and/or foreman_default_hostgroup. They’re the likely culprits.