Remote Execution Plugin failing with: Failed to initialize: RuntimeError - Could not use any proxy

Problem:
I installed the Remote Execution Plugin using foreman-installer as per the official instructions - Foreman :: Plugin Manuals. Installation went OK, and without errors. Additionally I copied foreman-proxy ssh key to remote hosts and configured the Smart Proxy Dynflow settings accordingly.

When I run a remote execution job I get this error:
Failed to initialize: RuntimeError - Could not use any proxy. Consider configuring remote_execution_global_proxy, remote_execution_fallback_proxy in settings

Additionally I noticed that when I go to Infrastructure -> Smart Proxies, no smart proxies are visible.

Expected outcome:
To run a remote job, and to have a smart proxy visible.

Foreman and Proxy versions:
Foreman 1.22
Remote Execution Plugin: 1.7

Foreman and Proxy plugin versions:

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

Hi, most likely the proxy registered during installation doesn’t have any organization/location set. If you set both organization and location to any, then you should be able to see it in Infrastructure > Smart Proxies. From there, you can assign the proxy to the organization and location and rex should start working.

Thanks that did the trick. Strange however, as this was on a clean installation.

This will be fixed for new installs in the upcoming 1.23 release via Feature #26092: When only one taxonomy of specific type is defined, api should default to that taxonomy - Foreman

1 Like

Hi All,
I have the same problem again.
Fresh installed Foreman 3.1
with enabled plugin-remote-execution, and proxy-plugin-remote-execution-ssh
Under Smart Proxy I see my smart proxy, Location, Organisation configured.
Subnet Configured all to use the proxy on my foreman server.
Foreman Proxy Server is also Answering on port 9090.
ssh key copyied to client root.

always get

Failed to initialize: RuntimeError - Could not use any proxy. Consider configuring remote_execution_global_proxy, remote_execution_fallback_proxy in settings

the two settings are both set to yes.

what am I missing.

thanks for any help.

Thomas

Please open a new thread. Chances you’re running into the same issue as described in this thread from 2019 are pretty low.