Whenever I try to run a remote execution job I receive this error:
Failed to initialize: RuntimeError - Could not use any proxy. Consider configuring remote_execution_global_proxy, remote_execution_fallback_proxy or remote_execution_no_proxy in settings.
The foreman proxy service runs on the same server.
Foreman and Proxy versions:
Foreman version 1.20.1
Foreman and Proxy plugin versions:
to use remote execution after installation, you have to do at least one of the following:
a) Configure at least one of the named options. You can find them in the UI under Administer -> Settings -> RemoteExecution
b) Assign a remote execution proxy to the network(s) of the hosts you try to run the remote execution job on. That can be done via Infrastructure -> Subnets -> Click the one you want to edit -> Remote Execution
If you are running the remote execution proxy on your main Foreman server, you should configure that server as the Remote Execution proxy.
I think you also need to set the “Remote Execution” flag on the corresponding interfaces on your host, though I’m not sure wether this is done automatically by default. (I doubt that though)
You can also check wether the smartproxy plugin is installed and working correctly by going to Infratructure -> Smart Proxys. There you should see your Foreman Server and (among other things) SSH should be listed in the “Features” column. If you installed via foreman-installer as described in the docs, this should always be the case, but you can still check just to be sure.
Thank you Sir for all of your help. I have never run a Foreman environment so this all very new to me. Besides what you said I figured out that during installation, even though I told the installation to install the remote execution plugin, which it did, I also needed to enable the ssh plugin:
foreman-installer --enable-foreman-plugin-remote-execution --enable-foreman-proxy-plugin-remote-execution-ssh.
After that I was able to run a remote execution command, specifically ssh, with no issues.
Thank you again for your help it’s much appreciated. I have been tasked with managing close to 1,000, mostly CentOS hosts, which have been neglected for years, and I believe Foreman will help me to better manage these hosts.