**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
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.
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?