Bug #19425
openTimeout when running job
Description
Hi,
I updated Foreman from 1.11.4 to 1.14.3 (through 1.12.4 and 1.13.4) with rpm
It seems to be ok, but I have a wreid issue
When I run a job with remote exec, I have this message :
Failed to initialize: Dynflow::ExecutionPlan::Steps::Error - ERF42-6909 [Foreman::Exception]: The smart proxy task 8f4725b8-41fa-4b1f-94cf-75e53cfa3333 failed.
and it's failed.
But the command is ok
On Foreman proxy log I have :
[2017-04-28 11:21:28.986 #28740] DEBUG -- dynflow: Step 8f4725b8-41fa-4b1f-94cf-75e53cfa3333: 2 got event #<ForemanTasksCore::Runner::Update:0x000000038fc750>
[2017-04-28 11:21:28.986 #28740] DEBUG -- dynflow: Step 8f4725b8-41fa-4b1f-94cf-75e53cfa3333: 2 suspended >> running in phase Run ForemanRemoteExecutionCore::Actions::RunScript
[2017-04-28 11:21:28.988 #28740] DEBUG -- dynflow: Step 8f4725b8-41fa-4b1f-94cf-75e53cfa3333: 2 running >> success in phase Run ForemanRemoteExecutionCore::Actions::RunScript
[2017-04-28 11:21:28.991 #28740] DEBUG -- dynflow: Step 8f4725b8-41fa-4b1f-94cf-75e53cfa3333: 5 pending >> running in phase Run SmartProxyDynflowCore::Callback::Action
[2017-04-28 11:21:29.002 #28740] ERROR -- action: Connection refused - connect(2) for "localhost" port 3000 (Errno::ECONNREFUSED)
- Endpoint for reverse communication
:foreman_url: https://my.server.company.com
I can't find anywhere why the remote command tries to connect on port 3000
Can someone help ?
Thanks
Updated by Dominic Cleal over 7 years ago
- Project changed from Foreman to Foreman Remote Execution
Updated by Sebastien LAMY over 7 years ago
Hi,
do you have any news about this issue ?
Thanks
Updated by Adam Ruzicka over 7 years ago
Hello,
please take a look at my and Ivan's comments on this issue1, especially the parts about smart_proxy_dynflow_core. It seems the core is misconfigured.
Updated by Sebastien LAMY over 7 years ago
Thanks, it's better, but I have this error now :
[2017-05-04 10:56:11.355 #19887] DEBUG -- dynflow: Step 98f755a9-c3aa-4a3e-ba49-56d54d6e795d: 2 suspended >> running in phase Run ForemanRemoteExecutionCore::Actions::RunScript
[2017-05-04 10:56:11.356 #19887] DEBUG -- dynflow: Step 98f755a9-c3aa-4a3e-ba49-56d54d6e795d: 2 running >> success in phase Run ForemanRemoteExecutionCore::Actions::RunScript
[2017-05-04 10:56:11.360 #19887] DEBUG -- dynflow: Step 98f755a9-c3aa-4a3e-ba49-56d54d6e795d: 5 pending >> running in phase Run SmartProxyDynflowCore::Callback::Action
[2017-05-04 10:56:11.396 #19887] ERROR -- action: 403 Forbidden (RestClient::Forbidden)
Updated by Sebastien LAMY over 7 years ago
Ok, I found something.
in /etc/smart_proxy_dynflow_core/settings.yml, I set :use_https: false
but I have to activate
:ssl_ca_file: ssl_ca.pem
:ssl_private_key: ssl_key.pem
:ssl_certificate: ssl_cert.pem
If I comment these 3 options, it does not work
Updated by Adam Ruzicka over 7 years ago
The ssl_* options are used to configure the part of the dynflow core which listens for incoming http requests so they are not probably what you're looking for.
The error you are seeing means that it tries to report back to foreman after running a job, but fails because foreman rejects the connection as "Unauthorized". If I recall correctly this can be fixed by either following the advice about Trusted puppetmaster hosts provided in here1 or setting the foreman_ssl_ca, foreman_ssl_key and foreman_ssl_cert to make the dynflow core authenticate using those certificates against foreman.
Updated by Sebastien LAMY over 7 years ago
Well,
When I comment these lines, I have the callback error.
When I uncomment, it works perfectly.
My server is already in trusted, and I don't have untrusted error,
Regards