No smart proxy?

Trying to install 1.22 fresh on CentOS 7 using the following:

# sudo foreman-installer -v \
–enable-foreman \
–enable-foreman-cli \
–enable-foreman-cli-discovery \
–enable-foreman-cli-remote-execution \
–enable-foreman-cli-tasks \
–enable-foreman-cli-templates \
–enable-foreman-proxy \
–enable-puppet \
–enable-foreman-plugin-bootdisk \
–enable-foreman-plugin-default-hostgroup \
–enable-foreman-plugin-dhcp-browser \
–enable-foreman-plugin-discovery \
–enable-foreman-plugin-expire-hosts \
–enable-foreman-plugin-hooks \
–enable-foreman-plugin-host-extra-validator \
–enable-foreman-plugin-remote-execution \
–enable-foreman-plugin-setup \
–enable-foreman-plugin-tasks \
–enable-foreman-plugin-templates \
–enable-foreman-compute-libvirt \
–enable-foreman-compute-vmware \
–enable-foreman-proxy-plugin-discovery \
–foreman-proxy-plugin-discovery-install-images true \
–enable-foreman-proxy-plugin-pulp \
–enable-foreman-proxy-plugin-remote-execution-ssh \
–foreman-proxy-plugin-remote-execution-ssh-install-key true
# sudo puppet agent --test

There are no errors reported and I’m able to login without issue. However, if I attempt to execute a remote command on the server itself, I get the following error: Failed to initialize: RuntimeError - Could not use any proxy. Consider configuring remote_execution_global_proxy, remote_execution_fallback_proxy in settings

When I browse to Infrastructure > Smart Proxies the foreman server is not listed. Running # sudo hammer proxy list shows it with the correct features, and # sudo hammer proxy info --id 1 shows me the following:

Id: 1
Name: hostname.domain.com
URL: https://hostname.domain.com:8443
Features:
Discovery
Dynflow
SSH
TFTP
Puppet CA
Puppet
Logs
HTTPBoot

Does anyone have any advice on where I should look next? I appreciate any help!

This is what I see in /var/log/foreman/dynflow_executor.output:

Starting Rails environment
Starting dynflow with the following options: {:rails_root=>"/usr/share/foreman", :process_name=>“dynflow_executor”, :pid_dir=>"/usr/share/foreman/tmp/pids", :log_dir=>"/usr/share/foreman/log", :wait_attempts=>300, :wait_sleep=>1, :executors_count=>1, :memory_limit=>0, :memory_init_d
elay=>7200, :memory_polling_interval=>60}
Everything ready for world: 8a7dd288-9b1e-42b3-adc3-47412f1f52b4
E, [2019-07-26T10:48:43.300224 #6057] ERROR – /client-dispatcher: Could not find an executor for Dynflow::Dispatcher::Envelope[request_id: 7, sender_id: 8a7dd288-9b1e-42b3-adc3-47412f1f52b4, receiver_id: Dynflow::Dispatcher::UnknownWorld, message: Dynflow::Dispatcher::Event[executi
on_plan_id: 1d8f904d-61fc-4b80-88bd-6e7cafecbb19, step_id: 2, event: Actions::Middleware::WatchDelegatedProxySubTasks::CheckOnProxyActions]] (Dynflow::Error)
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.3/lib/dynflow/dispatcher/client_dispatcher.rb:146:in `dispatch_request’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.3/lib/dynflow/dispatcher/client_dispatcher.rb:117:in `block (2 levels) in publish_request’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.3/lib/dynflow/dispatcher/client_dispatcher.rb:204:in `track_request’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.3/lib/dynflow/dispatcher/client_dispatcher.rb:116:in `block in publish_request’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.3/lib/dynflow/dispatcher/client_dispatcher.rb:246:in `with_ping_request_caching’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.3/lib/dynflow/dispatcher/client_dispatcher.rb:115:in `publish_request’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.3/lib/dynflow/actor.rb:6:in `on_message’
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/context.rb:46:in `on_envelope’
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/executes_context.rb:7:in `on_envelope’
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/abstract.rb:25:in `pass’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.3/lib/dynflow/actor.rb:26:in `on_envelope’
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/abstract.rb:25:in `pass’
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/awaits.rb:15:in `on_envelope’
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/abstract.rb:25:in `pass’
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/sets_results.rb:14:in `on_envelope’
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/abstract.rb:25:in `pass’
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/buffer.rb:38:in `process_envelope’
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/buffer.rb:31:in `process_envelopes?’
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/buffer.rb:20:in `on_envelope’
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/abstract.rb:25:in `pass’
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/termination.rb:55:in `on_envelope’
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/abstract.rb:25:in `pass’
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/removes_child.rb:10:in `on_envelope’
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/abstract.rb:25:in `pass’
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/sets_results.rb:14:in `on_envelope’
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/core.rb:162:in `process_envelope’
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/core.rb:96:in `block in on_envelope’
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/core.rb:119:in `block (2 levels) in schedule_execution’
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/synchronization/mutex_lockable_object.rb:41:in `block in synchronize’
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/synchronization/mutex_lockable_object.rb:41:in `synchronize’
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/synchronization/mutex_lockable_object.rb:41:in `synchronize’
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/core.rb:116:in `block in schedule_execution’
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/executor/serialized_execution.rb:18:in `call’
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/executor/serialized_execution.rb:96:in `work’
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/executor/serialized_execution.rb:77:in `block in call_job’
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/executor/ruby_thread_pool_executor.rb:348:in `run_task’
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/executor/ruby_thread_pool_executor.rb:337:in `block (3 levels) in create_worker’
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `loop’
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `block (2 levels) in create_worker’
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in `catch’
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in `block in create_worker’
/opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context’

Hi,
this tells you the proxy exists, but is in a different organization/location than you are when looking into the web ui. Change your organization/location to any/any and look into Infrastructure > Smart Proxies again. You should be able to see it there. If you do, assign it to an organization and location and you should then be able to use it for remote execution.

Thanks! That was it. Interestingly enough, when I opened the default location and organizations, I got the following error: expecting smart proxies used by hosts or inherited (check mismatches report). Clicking the Fix Mismatches button seems to have fixed that and I can now execute remotely.