Repo sync fails after a first app restart on new installation of Foreman 2.4 / Katello 4.0

Problem:

On a new successfully installation on CentOS 7.9 of Foreman 2.4 / Katello 4.0, repo sync feature works fine. After a first application restart through “foreman-maintain service restart” command, new or older repo sync tasks gets stalled on …

Action:

Actions::Pulp3::Repository::Sync
State:suspended

Input:
{"repo_id"=>10,
 "smart_proxy_id"=>1,
 "options"=>{"source_url"=>nil},
 "remote_user"=>"admin",
 "remote_cp_user"=>"admin",
 "current_request_id"=>"7e1baa60-78af-4b69-bd23-c72f23a4560d",
 "current_timezone"=>"Europe/Madrid",
 "current_organization_id"=>1,
 "current_location_id"=>2,
 "current_user_id"=>4}
Output:
{"pulp_tasks"=>
  [{"pulp_href"=>"/pulp/api/v3/tasks/f94ef000-f838-4080-bff7-e053bac0c1a7/",
    "pulp_created"=>"2021-05-12T07:09:29.473+00:00",
    "state"=>"waiting",
    "name"=>"pulp_rpm.app.tasks.synchronizing.synchronize",
    "logging_cid"=>"eedab3ee91204fae813e20fb689dc8d5",
    "worker"=>"/pulp/api/v3/workers/297808a9-db85-40c1-88ab-d2d31437dca8/",
    "child_tasks"=>[],
    "progress_reports"=>[],
    "created_resources"=>[],
    "reserved_resources_record"=>
     ["/pulp/api/v3/repositories/rpm/rpm/9196ca7f-2f91-4de4-872d-c27d3b4716f3/",
      "/pulp/api/v3/remotes/rpm/rpm/c4d862a8-bc23-41a9-a548-e40e958e79fb/"]}],
 "create_version"=>true,
 "task_groups"=>[],
 "**poll_attempts"=>{"total"=>30**, "failed"=>0}}

… increasing “poll_attempts” counter.

No related errors found on production, messages or other logs.

Thanks.

Expected outcome:
Repo syncronization after Foreman app restart.

Foreman and Proxy versions:
foreman-proxy-2.4.0-1.el7
foreman-2.4.0-1.el7

Foreman and Proxy plugin versions:
katello-4.0.0-1.el7

Name Description Author Version
foreman-tasks 4.0.1
foreman_ansible 6.2.0
foreman_remote_execution 4.3.0
foreman_snapshot_management 1.7.1
foreman_templates 9.0.2
foreman_virt_who_configure 0.5.5
katello Katello 4.0.0

Distribution and version:
CentOS 7.9 latest updates applied

Other relevant data:

Testing " [Fixes #32475 - clean_backend_objects still uses Pulp 2]" + “foreman-installer --reset-data” solution.

Simmilar issue on Tasks stuck with "waiting for Pulp to start the task" - foreman-2.4 / Katello 4.0.0 / Pulp3