Error message on smart proxy when installing discovery, ansible and dynaflow

**Problem: When using the foreman-installer to add the additional modules above i receive the below error message. I get the error message on two fresh installs of Ubuntu 16 with Foreman 1.19.

**Expected outcome: Modules install correctly without error messages.

Other relevant data:
foreman-proxy.log contains no error messages.
foreman-installer.log only contains the below error messages.

Log Message

 Proxy ubuntu-foreman-smartproxy has failed to load one or more features (Discovery), check /var/log/foreman-proxy/proxy.log for configuration errors
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:70:in `validate_features!'
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:59:in `refresh_features!'
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:48:in `features='
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:195:in `call_provider'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:506:in `set'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:568:in `sync'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:236:in `sync'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:134:in `sync_if_needed'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:88:in `block in perform_changes'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:87:in `each'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:87:in `perform_changes'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:21:in `evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:257:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:277:in `eval_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:181:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:181:in `block (2 levels) in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:515:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:514:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:181:in `block in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:121:in `traverse'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:171: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:239:in `block (2 levels) in apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:515:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:514:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:238:in `block in apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:156:in `with_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in `as_logging_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:237:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:186:in `block (2 levels) in apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:515:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:514:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:185:in `block in apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:232:in `block in benchmark'
/opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:231:in `benchmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:184:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:369:in `run_internal'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:237: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:260:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:211:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:354:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in `block (2 levels) in main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:260:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:280: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:260:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:233:in `main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:174:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:663:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:136:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:73:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
 /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ubuntu-foreman-smartproxy]/features: change from ["Logs"] to ["Discovery", "Logs"] failed: Proxy ubuntu-foreman-smartproxy has failed to load one or more features (Discovery), check /var/log/foreman-proxy/proxy.log for configuration errors

Are you sure there aren’t more logs? I can’t imagine /var/log/foreman-proxy/proxy.log hasn’t anything.

contents of /var/log/foreman-proxy/proxy.log;

# Logfile created on 2018-09-06 15:19:52 +0800 by logger.rb/v1.2.7
I, [2018-09-06T15:19:52.146438 ]  INFO -- : Successfully initialized 'foreman_proxy'
W, [2018-09-06T15:19:52.147427 ]  WARN -- : Missing SSL setup, https is disabled.
I, [2018-09-06T15:19:52.147691 ]  INFO -- : WEBrick 1.3.1
I, [2018-09-06T15:19:52.147757 ]  INFO -- : ruby 2.3.1 (2016-04-26) [x86_64-linux-gnu]
I, [2018-09-06T15:19:52.149651 ]  INFO -- : WEBrick::HTTPServer#start: pid=29560 port=8000
I, [2018-09-06T15:19:52.149714 ]  INFO -- : Smart proxy has launched on 1 socket(s), waiting for requests
I, [2018-09-06T15:19:58.350362 ]  INFO -- : going to shutdown ...
I, [2018-09-06T15:19:58.350445 ]  INFO -- : WEBrick::HTTPServer#start done.
I, [2018-09-06T15:19:58.698193 ]  INFO -- : Successfully initialized 'foreman_proxy'
I, [2018-09-06T15:19:58.698326 ]  INFO -- : Successfully initialized 'logs'
I, [2018-09-06T15:19:58.700327 ]  INFO -- : WEBrick 1.3.1
I, [2018-09-06T15:19:58.700402 ]  INFO -- : ruby 2.3.1 (2016-04-26) [x86_64-linux-gnu]
I, [2018-09-06T15:19:58.701161 ]  INFO -- :
Certificate:
<<REMOVED>>
I, [2018-09-06T15:19:58.702914 ]  INFO -- : WEBrick::HTTPServer#start: pid=29843 port=8443
I, [2018-09-06T15:19:58.702978 ]  INFO -- : Smart proxy has launched on 1 socket(s), waiting for requests
I, [2018-09-06T15:19:58.903325 b7ecaa35]  INFO -- : 192.168.50.100 - - [06/Sep/2018:15:19:58 +0800] "GET /features HTTP/1.1" 200 8 0.0042

I, [2018-09-06T15:19:59.165860 b49b41ab]  INFO -- : 192.168.50.100 - - [06/Sep/2018:15:19:59 +0800] "GET /features HTTP/1.1" 200 8 0.0011

I, [2018-09-06T15:19:59.253682 b49b41ab]  INFO -- : 192.168.50.100 - - [06/Sep/2018:15:19:59 +0800] "GET /features HTTP/1.1" 200 8 0.0026

I, [2018-09-06T15:20:49.714317 8f9e1d8b]  INFO -- : 192.168.50.100 - - [06/Sep/2018:15:20:49 +0800] "GET /version HTTP/1.1" 200 48 0.0011

I, [2018-09-06T15:23:12.735611 ]  INFO -- : going to shutdown ...
I, [2018-09-06T15:23:12.735751 ]  INFO -- : WEBrick::HTTPServer#start done.
I, [2018-09-06T15:23:13.071700 ]  INFO -- : Successfully initialized 'discovery'
I, [2018-09-06T15:23:13.071818 ]  INFO -- : Successfully initialized 'foreman_proxy'
I, [2018-09-06T15:23:13.071866 ]  INFO -- : Successfully initialized 'logs'
I, [2018-09-06T15:23:13.227367 ]  INFO -- : WEBrick 1.3.1
I, [2018-09-06T15:23:13.227592 ]  INFO -- : ruby 2.3.1 (2016-04-26) [x86_64-linux-gnu]
I, [2018-09-06T15:23:13.229869 ]  INFO -- :
Certificate:
<<REMOVED>>

I, [2018-09-06T15:23:13.235329 ]  INFO -- : WEBrick::HTTPServer#start: pid=30647 port=8443
I, [2018-09-06T15:23:13.235517 ]  INFO -- : Smart proxy has launched on 1 socket(s), waiting for requests
I, [2018-09-06T15:23:13.410386 be2df841]  INFO -- : 192.168.50.100 - - [06/Sep/2018:15:23:13 +0800] "GET /features HTTP/1.1" 200 20 0.0041

I, [2018-09-06T15:23:13.502361 be2df841]  INFO -- : 192.168.50.100 - - [06/Sep/2018:15:23:13 +0800] "GET /features HTTP/1.1" 200 20 0.0008

I, [2018-09-06T15:23:13.642576 887e8899]  INFO -- : 192.168.50.100 - - [06/Sep/2018:15:23:13 +0800] "GET /features HTTP/1.1" 200 20 0.0013

I, [2018-09-06T15:23:13.730838 887e8899]  INFO -- : 192.168.50.100 - - [06/Sep/2018:15:23:13 +0800] "GET /features HTTP/1.1" 200 20 0.0011

I, [2018-09-06T15:27:18.158037 8f9e1d8b]  INFO -- : 192.168.50.100 - - [06/Sep/2018:15:27:18 +0800] "GET /version HTTP/1.1" 200 68 0.0014

I, [2018-09-06T15:28:56.356414 5af9fcf1]  INFO -- : 192.168.50.100 - - [06/Sep/2018:15:28:56 +0800] "GET /features HTTP/1.1" 200 20 0.0008

I, [2018-09-06T15:28:56.430025 5af9fcf1]  INFO -- : 192.168.50.100 - - [06/Sep/2018:15:28:56 +0800] "GET /features HTTP/1.1" 200 20 0.0008

I, [2018-09-06T16:27:02.326681 9a77946e]  INFO -- : 192.168.50.100 - - [06/Sep/2018:16:27:02 +0800] "GET /features HTTP/1.1" 200 20 0.0010

I, [2018-09-06T16:27:02.407287 9a77946e]  INFO -- : 192.168.50.100 - - [06/Sep/2018:16:27:02 +0800] "GET /features HTTP/1.1" 200 20 0.0008

And the smart proxy discovery plugin really is installed? There wasn’t an error in doing so? It’s also configured and enabled? Nothing in the installer log?

You can try to rerun the installer, it should be idempotent.

I am not entirely sure if it is installed. The foreman-proxy.log says that its enabled despite the error, however on my smart proxy page within the foreman WebUI it only displays the feature for Logs, not Discovery.

I have the same on a separate box when installing the Ansible proxy plugin.

If i re-run the installer i get the same error message as above and same text in the foreman-proxy.log.

root@ubuntu-foreman-smartproxy:/# cat var/log/foreman-installer/foreman.log | grep ERROR
[ERROR 2018-09-06T18:23:51 main]  Proxy ubuntu-foreman-smartproxy has failed to load one or more features (Discovery), check /var/log/foreman-proxy/proxy.log for configuration errors
[ERROR 2018-09-06T18:23:51 main] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:70:in `validate_features!'
[ERROR 2018-09-06T18:23:51 main] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:59:in `refresh_features!'
[ERROR 2018-09-06T18:23:51 main] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:48:in `features='
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:195:in `call_provider'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:506:in `set'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:568:in `sync'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:236:in `sync'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:134:in `sync_if_needed'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:88:in `block in perform_changes'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:87:in `each'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:87:in `perform_changes'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:21:in `evaluate'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:257:in `apply'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:277:in `eval_resource'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:181:in `call'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:181:in `block (2 levels) in evaluate'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:515:in `block in thinmark'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:514:in `thinmark'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:181:in `block in evaluate'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:121:in `traverse'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:171:in `evaluate'
[ERROR 2018-09-06T18:23:51 main] /usr/lib/ruby/vendor_ruby/kafo/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:239:in `block (2 levels) in apply'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:515:in `block in thinmark'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:514:in `thinmark'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:238:in `block in apply'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:156:in `with_destination'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in `as_logging_destination'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:237:in `apply'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:186:in `block (2 levels) in apply_catalog'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:515:in `block in thinmark'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:514:in `thinmark'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:185:in `block in apply_catalog'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:232:in `block in benchmark'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:231:in `benchmark'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:184:in `apply_catalog'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:369:in `run_internal'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:237:in `block in run'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:260:in `override'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:211:in `run'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:354:in `apply_catalog'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in `block (2 levels) in main'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:260:in `override'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in `block in main'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:260:in `override'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:233:in `main'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:174:in `run_command'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:663:in `exit_on_fail'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:136:in `run'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:73:in `execute'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
[ERROR 2018-09-06T18:23:51 main]  /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ubuntu-foreman-smartproxy]/features: change from ["Logs"] to ["Discovery", "Logs"] failed: Proxy ubuntu-foreman-smartproxy has failed to load one or more features (Discovery), check /var/log/foreman-proxy/proxy.log for configuration errors
[ERROR 2018-09-06T18:23:51 main] Errors encountered during run:
[ERROR 2018-09-06T18:23:51 main]  Proxy ubuntu-foreman-smartproxy has failed to load one or more features (Discovery), check /var/log/foreman-proxy/proxy.log for configuration errors
[ERROR 2018-09-06T18:23:51 main] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:70:in `validate_features!'
[ERROR 2018-09-06T18:23:51 main] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:59:in `refresh_features!'
[ERROR 2018-09-06T18:23:51 main] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:48:in `features='
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:195:in `call_provider'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:506:in `set'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:568:in `sync'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:236:in `sync'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:134:in `sync_if_needed'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:88:in `block in perform_changes'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:87:in `each'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:87:in `perform_changes'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:21:in `evaluate'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:257:in `apply'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:277:in `eval_resource'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:181:in `call'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:181:in `block (2 levels) in evaluate'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:515:in `block in thinmark'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:514:in `thinmark'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:181:in `block in evaluate'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:121:in `traverse'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:171:in `evaluate'
[ERROR 2018-09-06T18:23:51 main] /usr/lib/ruby/vendor_ruby/kafo/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:239:in `block (2 levels) in apply'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:515:in `block in thinmark'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:514:in `thinmark'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:238:in `block in apply'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:156:in `with_destination'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in `as_logging_destination'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:237:in `apply'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:186:in `block (2 levels) in apply_catalog'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:515:in `block in thinmark'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:514:in `thinmark'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:185:in `block in apply_catalog'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:232:in `block in benchmark'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:231:in `benchmark'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:184:in `apply_catalog'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:369:in `run_internal'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:237:in `block in run'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:260:in `override'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:211:in `run'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:354:in `apply_catalog'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in `block (2 levels) in main'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:260:in `override'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in `block in main'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:260:in `override'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:233:in `main'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:174:in `run_command'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:663:in `exit_on_fail'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:136:in `run'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:73:in `execute'
[ERROR 2018-09-06T18:23:51 main] /opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
[ERROR 2018-09-06T18:23:51 main]  /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ubuntu-foreman-smartproxy]/features: change from ["Logs"] to ["Discovery", "Logs"] failed: Proxy ubuntu-foreman-smartproxy has failed to load one or more features (Discovery), check /var/log/foreman-proxy/proxy.log for configuration errors

Further to the above it seems that the smart proxy is not reporting back that the feature is enabled and running which is causing the error.

I found the below in foreman-installer/foreman.log

[ INFO 2018-09-06T21:21:51 main]  /Stage[main]/Foreman_proxy::Register/Datacat_collector[foreman_proxy::enabled_features]: Starting to evaluate the resource
[DEBUG 2018-09-06T21:21:51 main]  Datacat_collector[foreman_proxy::enabled_features](provider=datacat_collector): Collected {"features"=>["Discovery", "Logs"]}
[DEBUG 2018-09-06T21:21:51 main]  Datacat_collector[foreman_proxy::enabled_features](provider=datacat_collector): Selecting source_key features
[DEBUG 2018-09-06T21:21:51 main]  Datacat_collector[foreman_proxy::enabled_features](provider=datacat_collector): Now setting field :features
[ INFO 2018-09-06T21:21:51 main]  /Stage[main]/Foreman_proxy::Register/Datacat_collector[foreman_proxy::enabled_features]: Evaluated in 0.00 seconds
[ INFO 2018-09-06T21:21:51 main]  /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ubuntu-foreman-smartproxy.lab]: Starting to evaluate the resource
[DEBUG 2018-09-06T21:21:51 main]  Foreman_smartproxy[ubuntu-foreman-smartproxy.lab](provider=rest_v3): Making get request to https://ubuntu-foreman.lab/api/v2/smart_proxies?search=name=%22ubuntu-foreman-smartproxy.lab%22
[DEBUG 2018-09-06T21:21:51 main]  Foreman_smartproxy[ubuntu-foreman-smartproxy.lab](provider=rest_v3): Received response 200 from request to https://ubuntu-foreman.lab/api/v2/smart_proxies?search=name=%22ubuntu-foreman-smartproxy.lab%22
[DEBUG 2018-09-06T21:21:51 main]  Foreman_smartproxy[ubuntu-foreman-smartproxy.lab](provider=rest_v3): Making put request to https://ubuntu-foreman.lab/api/v2/smart_proxies/3/refresh
[DEBUG 2018-09-06T21:21:51 main]  Foreman_smartproxy[ubuntu-foreman-smartproxy.lab](provider=rest_v3): Received response 200 from request to https://ubuntu-foreman.lab/api/v2/smart_proxies/3/refresh
[ERROR 2018-09-06T21:21:51 main]  Proxy ubuntu-foreman-smartproxy.lab has failed to load one or more features (Discovery), check /var/log/foreman-proxy/proxy.log for configuration errors

When i look in the foreman-proxy/proxy.log i can see that the proxy started with the discovery module.

I, [2018-09-06T18:37:24.230592 ]  INFO -- : WEBrick::HTTPServer#start done.
I, [2018-09-06T18:37:24.624247 ]  INFO -- : Successfully initialized 'discovery'
I, [2018-09-06T18:37:24.624377 ]  INFO -- : Successfully initialized 'foreman_proxy'
I, [2018-09-06T18:37:24.624428 ]  INFO -- : Successfully initialized 'logs'
I, [2018-09-06T18:37:24.788676 ]  INFO -- : WEBrick 1.3.1
I, [2018-09-06T18:37:24.788905 ]  INFO -- : ruby 2.3.1 (2016-04-26) [x86_64-linux-gnu]
I, [2018-09-06T18:37:24.791242 ]  INFO -- : 
Certificate:

Has anyone else seen this issue on Foreman 1.19 with Ubuntu 16. Any further help would be greatly appreciated.

The installer error is exactly that: it gets what registered in Foreman and compares to the expected values. It found a mismatch between the two and reports that.

What is in /etc/foreman-proxy/settings.d/discovery.yml?

Another thing to try is increasing the proxy log level in /etc/foreman-proxy/settings.yaml.

Are you sure about that? What happens if you hit /features on the proxy? I would guess it reports discovery, but the Foreman server doesn’t know about the Discovery feature. In order to use smart-proxy-discovery, you need to have installed foreman-discovery on the Foreman server and run db:migrate/db:seed (if you do it with the installer it’ll do that for you)

You were correct my friend, looks like the discovery module was not installed on the foreman host hence why it was not showing up. Once installed on the main foreman server, i re-ran the installation on the proxy and it completed successfully.

Unfortunately looks like the error with my ansible server is slightly different.

-- Unit foreman-proxy.service has begun starting up.
Sep 07 11:10:53 ubuntu-ansible smart-proxy[26515]: /usr/lib/ruby/vendor_ruby/smart_proxy_dynflow_core/webrick-patch.rb:3: warning: already initialized constant CIPHERS
Sep 07 11:10:53 ubuntu-ansible smart-proxy[26515]: /usr/share/foreman-proxy/lib/webrick-patch.rb:3: warning: previous definition of CIPHERS was here
Sep 07 11:10:53 ubuntu-ansible smart-proxy[26515]: Running Foreman Ansible Core in non-SCL context
Sep 07 11:10:53 ubuntu-ansible smart-proxy[26515]: Running Foreman Ansible Core in non-SCL context
Sep 07 11:10:53 ubuntu-ansible smart-proxy[26515]: Errors detected on startup, see log for details. Exiting: settings ansible already registered
Sep 07 11:10:53 ubuntu-ansible systemd[1]: foreman-proxy.service: Main process exited, code=exited, status=1/FAILURE
Sep 07 11:10:53 ubuntu-ansible systemd[1]: Failed to start Foreman Proxy.
-- Subject: Unit foreman-proxy.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

I am not sure what settings ansible already registered means?