Ansible: Always get Failed status for jobs and roles

  1. My instance was deployed using Foreman Installer.
  2. Currently I have:
    • /etc/smart_proxy_dynflow_core/settings.yml
      foreman url => FQDN:443

    • /var/log/foreman-proxy/smart_proxy_dynflow_core.log
      /usr/bin/smart_proxy_dynflow_core:23:in load' /usr/bin/smart_proxy_dynflow_core:23:in 'Could not open DB for dynflow at ‘’, will keep data
      in memory. Restart will drop all dynflow data.127.0.0.1 - - [02/Oct/2020:13:31:10 EEST] “POST
      /tasks/status? HTTP/1.1” 200 2
      127.0.0.1 - - [02/Oct/2020:13:35:19 EEST] “GET /tasks/count?state=running HTTP/1.1” 200 29
      127.0.0.1 - - [02/Oct/2020:13:35:19 EEST] “POST /tasks/launch? HTTP/1.1” 200 110
      127.0.0.1 - - [02/Oct/2020:13:35:21 EEST] “GET /tasks/757ec26b-df88-45df-94f1-
      3460eb46bc1c/status? HTTP/1.1” 200 6260
      127.0.0.1 - - [02/Oct/2020:13:35:21 EEST] “GET /tasks/757ec26b-df88-45df-94f1-
      3460eb46bc1c/status? HTTP/1.1” 200 6260
      127.0.0.1 - - [02/Oct/2020:13:35:23 EEST] “GET /tasks/757ec26b-df88-45df-94f1-
      3460eb46bc1c/status? HTTP/1.1” 200 7202
      127.0.0.1 - - [02/Oct/2020:13:35:24 EEST] “GET /tasks/757ec26b-df88-45df-94f1-
      3460eb46bc1c/status? HTTP/1.1” 200 7351
      127.0.0.1 - - [02/Oct/2020:13:35:25 EEST] “GET /tasks/757ec26b-df88-45df-94f1-
      3460eb46bc1c/status? HTTP/1.1” 200 7351
      127.0.0.1 - - [02/Oct/2020:13:35:27 EEST] “GET /tasks/757ec26b-df88-45df-94f1-
      3460eb46bc1c/status? HTTP/1.1” 200 7351
      127.0.0.1 - - [02/Oct/2020:13:35:29 EEST] “GET /tasks/757ec26b-df88-45df-94f1-
      3460eb46bc1c/status? HTTP/1.1” 200 7351

400 Bad Request (RestClient::BadRequest)

and then a lot of same requests:
127.0.0.1 - - [02/Oct/2020:13:37:03 EEST] “GET /tasks/757ec26b-df88-45df-94f1-3460eb46bc1c/status? HTTP/1.1” 200 7351
127.0.0.1 - - [02/Oct/2020:13:37:05 EEST] “GET /tasks/757ec26b-df88-45df-94f1-3460eb46bc1c/status? HTTP/1.1” 200 7351
127.0.0.1 - - [02/Oct/2020:13:37:07 EEST] “GET /tasks/757ec26b-df88-45df-94f1-3460eb46bc1c/status? HTTP/1.1” 200 7351
2020-10-02T13:35:18 [I|aud|c912c33e] JobInvocation (69) create event on sudo_password
2020-10-02T13:35:18 [I|bac|c912c33e] Task {label: Actions::RemoteExecution::RunHostsJob, id: 07599ef3-afbe-4295-8fe5-08627a3d770b, execution_plan_id: 20c19566-cd4f-4873-9bd6-41d5a9a338fb} state changed: planning
2020-10-02T13:35:18 [I|bac|] Task {label: Actions::RemoteExecution::RunHostsJob, id: 07599ef3-afbe-4295-8fe5-08627a3d770b, execution_plan_id: 20c19566-cd4f-4873-9bd6-41d5a9a338fb} state changed: planned
2020-10-02T13:35:18 [I|app|] Redirected to https://kh0dl1000000075.dtc.dish.corp/job_invocations/69
2020-10-02T13:35:18 [I|app|] Completed 302 Found in 265ms (ActiveRecord: 70.4ms)
2020-10-02T13:35:18 [I|app|b563c0a8] Started GET “/job_invocations/69” for 10.203.2.32 at 2020-10-02 13:35:18 +0300
2020-10-02T13:35:18 [I|app|b563c0a8] Processing by JobInvocationsController#show as HTML
2020-10-02T13:35:18 [I|app|b563c0a8] Parameters: {“id”=>“69”}
2020-10-02T13:35:18 [I|app|b563c0a8] Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/job_invocations/show.html.erb within layouts/application
2020-10-02T13:35:18 [I|app|b563c0a8] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/job_invocations/_card_results.html.erb (0.6ms)
2020-10-02T13:35:18 [I|app|b563c0a8] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/job_invocations/_card_schedule.html.erb (2.7ms)
2020-10-02T13:35:18 [I|app|b563c0a8] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/job_invocations/_card_target_hosts.html.erb (2.9ms)
2020-10-02T13:35:18 [I|app|b563c0a8] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/job_invocations/_card_user_input.html.erb (3.6ms)
2020-10-02T13:35:18 [I|app|b563c0a8] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/job_invocations/_host_name_td.html.erb (1.1ms)
2020-10-02T13:35:18 [I|app|b563c0a8] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/job_invocations/_host_status_td.html.erb (0.9ms)
2020-10-02T13:35:18 [I|app|b563c0a8] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/job_invocations/_host_actions_td.html.erb (1.7ms)
2020-10-02T13:35:19 [I|app|b563c0a8] Rendered common/_pagination.html.erb (0.9ms)
2020-10-02T13:35:19 [I|app|b563c0a8] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/job_invocations/_tab_hosts.html.erb (26.4ms)
2020-10-02T13:35:19 [I|app|b563c0a8] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/job_invocations/_tab_overview.html.erb (55.0ms)
2020-10-02T13:35:19 [I|app|b563c0a8] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/job_invocations/_user_input.html.erb (13.0ms)
2020-10-02T13:35:19 [I|app|b563c0a8] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/job_invocations/tab_preview_templates.html.erb (25.8ms)
2020-10-02T13:35:19 [I|app|b563c0a8] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/job_invocations/show.html.erb within layouts/application (109.3ms)
2020-10-02T13:35:19 [I|app|b563c0a8] Rendered layouts/application_content.html.erb (1.0ms)
2020-10-02T13:35:19 [I|app|b563c0a8] Rendering layouts/base.html.erb
2020-10-02T13:35:19 [I|app|b563c0a8] Rendered layouts/base.html.erb (24.4ms)
2020-10-02T13:35:19 [I|app|b563c0a8] Completed 200 OK in 163ms (Views: 128.8ms | ActiveRecord: 15.5ms)
2020-10-02T13:35:19 [I|app|884fa872] Started GET “/notification_recipients” for 10.203.2.32 at 2020-10-02 13:35:19 +0300
2020-10-02T13:35:19 [I|app|fcac7a30] Started GET “/job_invocations/chart?id=69” for 10.203.2.32 at 2020-10-02 13:35:19 +0300
2020-10-02T13:35:19 [I|app|884fa872] Processing by NotificationRecipientsController#index as JSON
2020-10-02T13:35:19 [I|app|fcac7a30] Processing by JobInvocationsController#chart as JSON
2020-10-02T13:35:19 [I|app|fcac7a30] Parameters: {“id”=>“69”}
2020-10-02T13:35:19 [I|app|884fa872] Completed 200 OK in 9ms (Views: 0.1ms | ActiveRecord: 1.4ms)
2020-10-02T13:35:19 [I|app|fcac7a30] Completed 200 OK in 94ms (Views: 0.3ms | ActiveRecord: 8.3ms)
2020-10-02T13:35:20 [I|app|48512c7b] Started GET "/job_invocations/69?hosts_needs_refresh=&host_ids_needing_name_update%5B%5D=45&host_ids_needing_status_update%5B%5D=45&
=1601635413461" for 10.203.2.32 at 2020-10-02 13:35:20 +0300
2020-10-02T13:35:20 [I|app|48512c7b] Processing by JobInvocationsController#show as JS
2020-10-02T13:35:20 [I|app|48512c7b] Parameters: {“hosts_needs_refresh”=>"", “host_ids_needing_name_update”=>[“45”], “host_ids_needing_status_update”=>[“45”], "
"=>“1601635413461”, “id”=>“69”}
2020-10-02T13:35:20 [I|app|48512c7b] Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/job_invocations/show.js.erb
2020-10-02T13:35:20 [I|app|48512c7b] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/job_invocations/host_name_td.html.erb (1.5ms)
2020-10-02T13:35:20 [I|app|48512c7b] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/job_invocations/host_status_td.html.erb (1.2ms)
2020-10-02T13:35:20 [I|app|48512c7b] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/job_invocations/show.js.erb (74.3ms)
2020-10-02T13:35:20 [I|app|48512c7b] Completed 200 OK in 128ms (Views: 77.7ms | ActiveRecord: 7.0ms)
2020-10-02T13:35:20 [I|app|9f62831d] Started GET “/job_invocations/chart?id=69” for 10.203.2.32 at 2020-10-02 13:35:20 +0300
2020-10-02T13:35:20 [I|app|9f62831d] Processing by JobInvocationsController#chart as JSON
2020-10-02T13:35:20 [I|app|9f62831d] Parameters: {“id”=>“69”}
2020-10-02T13:35:20 [I|app|9f62831d] Completed 200 OK in 34ms (Views: 0.3ms | ActiveRecord: 3.9ms)
2020-10-02T13:35:21 [I|app|5e52e5d6] Started GET "/job_invocations/69?hosts_needs_refresh=&host_ids_needing_status_update%5B%5D=45&
=1601635413462" for 10.203.2.32 at 2020-10-02 13:35:21 +0300
2020-10-02T13:35:21 [I|app|5e52e5d6] Processing by JobInvocationsController#show as JS
2020-10-02T13:35:21 [I|app|5e52e5d6] Parameters: {“hosts_needs_refresh”=>"", “host_ids_needing_status_update”=>[“45”], "
"=>“1601635413462”, “id”=>“69”}
2020-10-02T13:35:21 [I|app|5e52e5d6] Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/job_invocations/show.js.erb
2020-10-02T13:35:21 [I|app|5e52e5d6] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/job_invocations/_host_status_td.html.erb (0.4ms)
2020-10-02T13:35:21 [I|app|5e52e5d6] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/job_invocations/show.js.erb (19.3ms)
2020-10-02T13:35:21 [I|app|5e52e5d6] Completed 200 OK in 39ms (Views: 17.6ms | ActiveRecord: 5.9ms)
2020-10-02T13:35:21 [I|app|0a1a70ba] Started GET “/template_invocations/138” for 10.203.2.32 at 2020-10-02 13:35:21 +0300
2020-10-02T13:35:21 [I|app|0a1a70ba] Processing by TemplateInvocationsController#show as HTML
2020-10-02T13:35:21 [I|app|0a1a70ba] Parameters: {“id”=>“138”}
2020-10-02T13:35:21 [I|app|a611c5a4] Started GET “/job_invocations/chart?id=69” for 10.203.2.32 at 2020-10-02 13:35:21 +0300
2020-10-02T13:35:21 [I|app|a611c5a4] Processing by JobInvocationsController#chart as JSON
2020-10-02T13:35:21 [I|app|a611c5a4] Parameters: {“id”=>“69”}
2020-10-02T13:35:21 [I|app|a611c5a4] Completed 200 OK in 37ms (Views: 0.3ms | ActiveRecord: 4.6ms)
2020-10-02T13:35:21 [I|app|0a1a70ba] Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/template_invocations/show.html.erb within layouts/application
2020-10-02T13:35:21 [I|app|0a1a70ba] Rendered collection of /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/template_invocations/_output_line_set.html.erb [0 times] (0.0ms)
2020-10-02T13:35:21 [I|app|0a1a70ba] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/template_invocations/_refresh.js.erb (0.7ms)
2020-10-02T13:35:21 [I|app|0a1a70ba] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/template_invocations/show.html.erb within layouts/application (24.1ms)
2020-10-02T13:35:21 [I|app|0a1a70ba] Rendered layouts/_application_content.html.erb (0.4ms)
2020-10-02T13:35:21 [I|app|0a1a70ba] Rendering layouts/base.html.erb
2020-10-02T13:35:21 [I|app|0a1a70ba] Rendered layouts/base.html.erb (19.7ms)
2020-10-02T13:35:21 [I|app|0a1a70ba] Completed 200 OK in 251ms (Views: 45.8ms | ActiveRecord: 9.1ms)
2020-10-02T13:35:21 [I|app|b7646f72] Started GET “/template_invocations/138” for 10.203.2.32 at 2020-10-02 13:35:21 +0300
2020-10-02T13:35:21 [I|app|b7646f72] Processing by TemplateInvocationsController#show as HTML
2020-10-02T13:35:21 [I|app|b7646f72] Parameters: {“id”=>“138”}
2020-10-02T13:35:21 [I|app|b7646f72] Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/template_invocations/show.html.erb within layouts/application
2020-10-02T13:35:21 [I|app|b7646f72] Rendered collection of /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/template_invocations/_output_line_set.html.erb [0 times] (0.0ms)
2020-10-02T13:35:21 [I|app|b7646f72] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/template_invocations/refresh.js.erb (0.7ms)
2020-10-02T13:35:21 [I|app|b7646f72] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/template_invocations/show.html.erb within layouts/application (19.3ms)
2020-10-02T13:35:21 [I|app|b7646f72] Rendered layouts/application_content.html.erb (0.4ms)
2020-10-02T13:35:21 [I|app|b7646f72] Rendering layouts/base.html.erb
2020-10-02T13:35:22 [I|app|b7646f72] Rendered layouts/base.html.erb (18.5ms)
2020-10-02T13:35:22 [I|app|b7646f72] Completed 200 OK in 139ms (Views: 37.4ms | ActiveRecord: 6.4ms)
2020-10-02T13:35:22 [I|app|1fcd8d99] Started POST “/api/v2/hosts/facts” for 10.203.97.175 at 2020-10-02 13:35:22 +0300
2020-10-02T13:35:22 [I|app|1fcd8d99] Processing by Api::V2::HostsController#facts as JSON
2020-10-02T13:35:22 [I|app|1fcd8d99] Parameters: {“facts”=>"[FILTERED]", “name”=>“kh0dl1000000071.dtc.dish.corp”, “apiv”=>“v2”, “host”=>{“name”=>“kh0dl1000000071.dtc.dish.corp”}}
2020-10-02T13:35:22 [I|app|1fcd8d99] Import facts for ‘kh0dl1000000071.dtc.dish.corp’ completed. Added: 0, Updated: 0, Deleted 0 facts
2020-10-02T13:35:22 [I|app|94f240a0] Started GET “/notification_recipients” for 10.203.2.32 at 2020-10-02 13:35:22 +0300
2020-10-02T13:35:22 [I|app|94f240a0] Processing by NotificationRecipientsController#index as JSON
2020-10-02T13:35:22 [I|app|94f240a0] Completed 200 OK in 8ms (Views: 0.1ms | ActiveRecord: 1.5ms)
2020-10-02T13:35:22 [I|app|1fcd8d99] Completed 201 Created in 230ms (Views: 26.3ms | ActiveRecord: 39.4ms)
2020-10-02T13:35:22 [I|app|4adc816a] Started POST “/api/v2/reports” for 10.203.97.175 at 2020-10-02 13:35:22 +0300
2020-10-02T13:35:22 [I|app|4adc816a] Processing by Api::V2::ReportsController#create as JSON
2020-10-02T13:35:22 [I|app|4adc816a] Parameters: {“report”=>"[FILTERED]", “apiv”=>“v2”}
2020-10-02T13:35:22 [I|app|4adc816a] Scanning report with: Foreman::PuppetReportScanner, ForemanAnsible::AnsibleReportScanner
2020-10-02T13:35:22 [I|app|4adc816a] Imported report for kh0dl1000000071.dtc.dish.corp in 36.3 ms, status refreshed in 25.5 ms
2020-10-02T13:35:22 [I|app|4adc816a] Rendering api/v2/reports/create.json.rabl
2020-10-02T13:35:22 [I|app|4adc816a] Rendered api/v2/reports/create.json.rabl (8.9ms)
2020-10-02T13:35:22 [I|app|4adc816a] Completed 201 Created in 91ms (Views: 16.2ms | ActiveRecord: 19.5ms)
2020-10-02T13:35:23 [I|app|cab2c0c6] Started GET "/template_invocations/138?since=&line_counter=0&
=1601635416398" for 10.203.2.32 at 2020-10-02 13:35:23 +0300
2020-10-02T13:35:23 [I|app|cab2c0c6] Processing by TemplateInvocationsController#show as JS
2020-10-02T13:35:23 [I|app|cab2c0c6] Parameters: {“since”=>"", “line_counter”=>“0”, "
"=>“1601635416398”, “id”=>“138”}
2020-10-02T13:35:23 [I|app|cab2c0c6] Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/template_invocations/show.js.erb
2020-10-02T13:35:23 [I|app|cab2c0c6] Rendered collection of /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/template_invocations/output_line_set.html.erb [7 times] (2.4ms)
2020-10-02T13:35:23 [I|app|cab2c0c6] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/template_invocations/refresh.js.erb (0.6ms)
2020-10-02T13:35:23 [I|app|cab2c0c6] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/template_invocations/show.js.erb (49.4ms)
2020-10-02T13:35:23 [I|app|cab2c0c6] Completed 200 OK in 172ms (Views: 52.0ms | ActiveRecord: 3.7ms)
a lot of requests
2020-10-02T13:42:07 [I|app|08075d83] Started GET "/template_invocations/138?since=1601634923.2003915&line_counter=8&
=1601635416601" for 10.203.2.32 at 2020-10-02 13:42:07 +0300
2020-10-02T13:42:07 [I|app|08075d83] Processing by TemplateInvocationsController#show as JS
2020-10-02T13:42:07 [I|app|08075d83] Parameters: {“since”=>“1601634923.2003915”, “line_counter”=>“8”, "
"=>“1601635416601”, “id”=>“138”}
2020-10-02T13:42:07 [I|app|08075d83] Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/template_invocations/show.js.erb
2020-10-02T13:42:07 [I|app|08075d83] Rendered collection of /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/template_invocations/_output_line_set.html.erb [0 times] (0.0ms)
2020-10-02T13:42:07 [I|app|08075d83] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/template_invocations/_refresh.js.erb (0.1ms)
2020-10-02T13:42:07 [I|app|08075d83] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.8/app/views/template_invocations/show.js.erb (0.6ms)
2020-10-02T13:42:07 [I|app|08075d83] Completed 200 OK in 96ms (Views: 1.2ms | ActiveRecord: 3.6ms)

Trying to go to the next page in browser:
https:///tasks/757ec26b-df88-45df-94f1-3460eb46bc1c/status?%
gives me
" The page you were looking for doesn’t exist.
You may have mistyped the address or the page may have moved."

And, also, for task I have next:
Failed to initialize: NoMethodError - undefined method `’ for nil:NilClass

Also, in /etc/foreman-proxy/settings.yml I’ve found next string:
:https_port: 8443

Should I use :8443 port for smart_proxy_dynflow?

Even when you enabled remote execution/ansible?

Alright, that might have been misleading. You should leave the protocol prefix in there and you can possibly omit the port so it would be https://FQDN. Have you restarted smart_proxy_dynflow_core service after changing that?

No

Not sure here…:frowning:

Each time I restart whole server (it’s pre-production, so no problem with it).

Hi, I got exactly the same problem on Foreman 2.2.0-rc3 running on Debian buster. Enabled remote execution before via

# foreman-installer --enable-foreman-plugin-remote-execution --enable-foreman-proxy-plugin-remote-execution-ssh

Unfortunaltely, there is no ansible-runner package available anymore for current Debian so I need to remove the installation source any time puppet added it again.

# cat /etc/apt/sources.list.d/ansible-runner.list
# This file is managed by Puppet. DO NOT EDIT.
# ansible-runner
deb https://releases.ansible.com/ansible-runner/deb buster main

For now I tried this version on debian buster:

https://releases.ansible.com/ansible-runner/deb/pool/main/a/ansible-runner/ansible-runner_1.4.5-1_all.deb

Quite interesting thing.

I’ve pointed smart_proxy_dynflow_core to fqdn:3000 port again.
Also, :require_ssl: false was set in /etc/foreman/settings.yaml

In /var/log/foreman/production.log:
I have next output for POST:
2020-10-02T14:30:07 [I|app|c6978d0e] Started POST “/foreman_tasks/api/tasks/callback” for 10.203.97.175 at 2020-10-02 14:30:07 +0300
2020-10-02T14:30:07 [I|app|c6978d0e] Processing by ForemanTasks::Api::TasksController#callback as /
2020-10-02T14:30:07 [I|app|c6978d0e] Parameters: {“callbacks”=>[{“callback”=>{“task_id”=>“1186ac68-58dc-4dcf-9a77-ab6e2d245b2a”, “step_id”=>3}, “data”=>{“result”=>[{“output_type”=>“stdout”, “output”=>"\n", “timestamp”=>1601638199.676836}, {“output_type”=>“stdout”, “output”=>"\r\nPLAY [Basic Playbook. It checks hosts availability in network.] ****************\n", “timestamp”=>1601638199.67689}, {“output_type”=>“stdout”, “output”=>"\r\nTASK [Ping hosts.] *************************************************************\n", “timestamp”=>1601638199.676968}, {“output_type”=>“stdout”, “output”=>"\n", “timestamp”=>1601638199.6770196}, {“output_type”=>“stdout”, “output”=>“ok: [kh0dl1000000071.dtc.dish.corp]\n”, “timestamp”=>1601638200.681134}, {“output_type”=>“stdout”, “output”=>“PLAY RECAP *********************************************************************\nkh0dl1000000071.dtc.dish.corp : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0”, “timestamp”=>1601638200.681284}, {“output_type”=>“stdout”, “output”=>“Playbook run took 0 days, 0 hours, 0 minutes, 1 seconds\n”, “timestamp”=>1601638200.6813426}], “exit_status”=>0}}], “task”=>{}}
2020-10-02T14:30:07 [W|app|c6978d0e] Action failed
2020-10-02T14:30:07 [I|app|c6978d0e] Rendering api/v2/errors/standard_error.json.rabl within api/v2/layouts/error_layout
2020-10-02T14:30:07 [I|app|c6978d0e] Rendered api/v2/errors/standard_error.json.rabl within api/v2/layouts/error_layout (1.0ms)
2020-10-02T14:30:07 [I|app|c6978d0e] Completed 500 Internal Server Error in 62ms (Views: 4.7ms | ActiveRecord: 27.5ms)

I see quite large POST only for port :3000. For port :443 I don’t have so detailed POST section.
Do I need to use port 443 or 3000?

Guys,

I want to inform you that problem was solved:

  • /etc/smart_proxy_dynflow_core/settings.yml
    :foreman_url: ‘https://’

  • /etc/foreman/settings.yaml
    :require_ssl: true

Finally, it’s working and I’m pretty happy with it :):):slight_smile:

Thank you for all your support!

Hm, did you change anything else? I allready got “:require_ssl: true” in foreman/settings.yml and changed the foreman_url for dynflow as you mentioned. Everything restarted but still get “RestClient::NotFound”:

2020-10-02T14:21:41 [I|app|371a30e2] Rendered vendor/ruby/2.5.0/gems/foreman_remote_execution-4.1.0/app/views/job_invocations/show.js.erb (Duration: 116.9ms | Allocations: 15069)
2020-10-02T14:21:41 [I|app|371a30e2] Completed 200 OK in 237ms (Views: 92.2ms | ActiveRecord: 75.7ms | Allocations: 31741)
2020-10-02T14:21:42 [E|bac|] 404 Not Found (RestClient::NotFound)

I tried FQDN:443 as well, but id did not succeed. In the proxy.log I still get an “uninitialized constant ForemanAnsibleCore”, you got that as well? How to fix that?

# less /var/log/foreman-proxy/proxy.log
2020-10-02T15:36:26 d86ea6a2 [I] Finished POST /dynflow/tasks/launch with 404 (3.05 ms)
2020-10-02T15:36:26 1ea48ac3 [I] Started POST /dynflow/tasks/
2020-10-02T15:36:26 1ea48ac3 [W] Error processing request ‘1ea48ac3-58a6-45e2-b223-c98d15933347: : uninitialized constant ForemanAnsibleCore
Did you mean? ForemanTasksCore
/usr/lib/ruby/vendor_ruby/dynflow/utils.rb:46:in const_get' /usr/lib/ruby/vendor_ruby/dynflow/utils.rb:46:in block in constantize’

/usr/lib/ruby/vendor_ruby/logging/diagnostic_context.rb:474:in `block in create_with_logging_context’
2020-10-02T15:36:27 9fda8d5a [I] Finished POST /dynflow/tasks/ with 500 (13.03 ms)
2020-10-02T15:36:27 d1bd5bcc [I] Started GET /dynflow/tasks/status
2020-10-02T15:36:27 d1bd5bcc [I] Finished GET /dynflow/tasks/status with 404 (1.41 ms)