Cannot sync Ubuntu 22.04 on Foreman 3.9.1

When I try to sync my Ubuntu repos I get an error:
400, message=“Data after Connection: close :\n\n b’</body\x00\x06nP\xb5A\xd4\xdc’\n ^”, url=URL(‘http://archive.ubuntu.com/ubuntu/pool/main/o/optipng/optipng_0.7.7-2build1_amd64.deb’)

Basic Information

Name Ubuntu-22.04-REPO
Label Ubuntu-22_04-REPO
Description
Backend Identifier 38aaebb1-adba-4d8f-ae0b-810957915b86
Type deb
Sync Settings
Upstream URL Index of /ubuntu
Releases/Distributions jammy
Components main
Architectures amd64

I see:

{“pulp_tasks”=>

[{“pulp_href”=>“/pulp/api/v3/tasks/018e9992-41cf-7876-b30e-0f14fbebebe0/”,

"pulp_created"=>"2024-04-01T12:11:22.959+00:00",

"state"=>"failed",

"name"=>"pulp_deb.app.tasks.synchronizing.synchronize",

"logging_cid"=>"832c7ef4-8201-470c-bef4-2a53b653e4fc",

"created_by"=>"/pulp/api/v3/users/1/",

"started_at"=>"2024-04-01T12:11:23.029+00:00",

"finished_at"=>"2024-04-01T12:15:23.827+00:00",

"error"=>

 {"traceback"=>

   "  File \"/usr/lib/python3.11/site-packages/pulpcore/tasking/tasks.py\", line 61, in _execute_task\n" +

   "    result = func(*args, **kwargs)\n" +

   "             ^^^^^^^^^^^^^^^^^^^^^\n" +

   "  File \"/usr/lib/python3.11/site-packages/pulp_deb/app/tasks/synchronizing.py\", line 183, in synchronize\n" +

   "    DebDeclarativeVersion(first_stage, repository, mirror=mirror).create()\n" +

   "  File \"/usr/lib/python3.11/site-packages/pulpcore/plugin/stages/declarative_version.py\", line 161, in create\n" +

   "    loop.run_until_complete(pipeline)\n" +

   "  File \"/usr/lib64/python3.11/asyncio/base_events.py\", line 653, in run_until_complete\n" +

   "    return future.result()\n" +

   "           ^^^^^^^^^^^^^^^\n" +

   "  File \"/usr/lib/python3.11/site-packages/pulpcore/plugin/stages/api.py\", line 220, in create_pipeline\n" +

   "    await asyncio.gather(*futures)\n" +

   "  File \"/usr/lib/python3.11/site-packages/pulpcore/plugin/stages/api.py\", line 41, in __call__\n" +

   "    await self.run()\n" +

   "  File \"/usr/lib/python3.11/site-packages/asgiref/sync.py\", line 486, in thread_handler\n" +

   "    raise exc_info[1]\n" +

   "  File \"/usr/lib/python3.11/site-packages/pulpcore/plugin/stages/artifact_stages.py\", line 186, in run\n" +

   "    pb.done += task.result()  # download_count\n" +

   "               ^^^^^^^^^^^^^\n" +

   "  File \"/usr/lib/python3.11/site-packages/pulpcore/plugin/stages/artifact_stages.py\", line 241, in _handle_content_unit\n" +

   "    await asyncio.gather(*downloaders_for_content)\n" +

   "  File \"/usr/lib/python3.11/site-packages/pulpcore/plugin/stages/models.py\", line 119, in download\n" +

   "    raise e\n" +

   "  File \"/usr/lib/python3.11/site-packages/pulpcore/plugin/stages/models.py\", line 111, in download\n" +

   "    download_result = await downloader.run(extra_data=self.extra_data)\n" +

   "                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +

   "  File \"/usr/lib/python3.11/site-packages/pulpcore/download/http.py\", line 269, in run\n" +

   "    return await download_wrapper()\n" +

   "           ^^^^^^^^^^^^^^^^^^^^^^^^\n" +

   "  File \"/usr/lib/python3.11/site-packages/backoff/_async.py\", line 151, in retry\n" +

   "    ret = await target(*args, **kwargs)\n" +

   "          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +

   "  File \"/usr/lib/python3.11/site-packages/pulpcore/download/http.py\", line 254, in download_wrapper\n" +

   "    return await self._run(extra_data=extra_data)\n" +

   "           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +

   "  File \"/usr/lib/python3.11/site-packages/pulpcore/download/http.py\", line 287, in _run\n" +

   "    async with self.session.get(\n" +

   "  File \"/usr/lib64/python3.11/site-packages/aiohttp/client.py\", line 1194, in __aenter__\n" +

   "    self._resp = await self._coro\n" +

   "                 ^^^^^^^^^^^^^^^^\n" +

   "  File \"/usr/lib64/python3.11/site-packages/aiohttp/client.py\", line 605, in _request\n" +

   "    await resp.start(conn)\n" +

   "  File \"/usr/lib64/python3.11/site-packages/aiohttp/client_reqrep.py\", line 966, in start\n" +

   "    raise ClientResponseError(\n",

  "description"=>

   "400, message=\"Data after `Connection: close`:\\n\\n  b'</body\\\\x00\\\\x06nP\\\\xb5A\\\\xd4\\\\xdc'\\n              ^\", url=URL('http://archive.ubuntu.com/ubuntu/pool/main/o/optipng/optipng_0.7.7-2build1_amd64.deb')"},

"worker"=>"/pulp/api/v3/workers/018e84fe-2f16-7e25-ba0d-785e30515ca9/",

"child_tasks"=>[],

"progress_reports"=>

 [{"message"=>"Update ReleaseFile units",

   "code"=>"update.release_file",

   "state"=>"canceled",

   "done"=>1},

  {"message"=>"Update PackageIndex units",

   "code"=>"update.packageindex",

   "state"=>"canceled",

   "done"=>1},

  {"message"=>"Associating Content",

   "code"=>"associating.content",

   "state"=>"canceled",

   "done"=>4501},

  {"message"=>"Downloading Artifacts",

   "code"=>"sync.downloading.artifacts",

   "state"=>"failed",

   "done"=>338}],

"created_resources"=>[],

"reserved_resources_record"=>

 ["/pulp/api/v3/repositories/deb/apt/018e88fd-9ccb-706f-a77b-f29ac3b8c11b/",

  "shared:/pulp/api/v3/remotes/deb/apt/018e88fd-9a9d-7f5f-be57-1f6e40a3f1a1/",

  "shared:/pulp/api/v3/domains/018e846f-b204-78b4-9bd6-540acc3dcf02/"]}],

“create_version”=>true,

“task_groups”=>,

“poll_attempts”=>{“total”=>35, “failed”=>1}}

Exception:

Katello::Errors::Pulp3Error: 400, message=“Data after Connection: close:\n\n b’</body\x00\x06nP\xb5A\xd4\xdc’\n ^”, url=URL(‘http://archive.ubuntu.com/ubuntu/pool/main/o/optipng/optipng_0.7.7-2build1_amd64.deb’)

Backtrace:

/usr/share/gems/gems/katello-4.11.1/app/lib/actions/pulp3/abstract_async_task.rb:108:in `block in check_for_errors’

/usr/share/gems/gems/katello-4.11.1/app/lib/actions/pulp3/abstract_async_task.rb:106:in `each’

/usr/share/gems/gems/katello-4.11.1/app/lib/actions/pulp3/abstract_async_task.rb:106:in `check_for_errors’

/usr/share/gems/gems/katello-4.11.1/app/lib/actions/pulp3/abstract_async_task.rb:162:in `poll_external_task’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action/polling.rb:100:in `poll_external_task_with_rescue’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action/polling.rb:22:in `run’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action/cancellable.rb:14:in `run’

/usr/share/gems/gems/katello-4.11.1/app/lib/actions/pulp3/abstract_async_task.rb:10:in `run’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:589:in `block (3 levels) in execute_run’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:32:in `run’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass’

/usr/share/gems/gems/katello-4.11.1/app/lib/actions/middleware/remote_action.rb:16:in `block in run’

/usr/share/gems/gems/katello-4.11.1/app/lib/actions/middleware/remote_action.rb:40:in `block in as_remote_user’

/usr/share/gems/gems/katello-4.11.1/app/models/katello/concerns/user_extensions.rb:21:in `cp_config’

/usr/share/gems/gems/katello-4.11.1/app/lib/actions/middleware/remote_action.rb:27:in `as_cp_user’

/usr/share/gems/gems/katello-4.11.1/app/lib/actions/middleware/remote_action.rb:39:in `as_remote_user’

/usr/share/gems/gems/katello-4.11.1/app/lib/actions/middleware/remote_action.rb:16:in `run’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass’

/usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/rails_executor_wrap.rb:14:in `block in run’

/usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/execution_wrapper.rb:91:in `wrap’

/usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/rails_executor_wrap.rb:13:in `run’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action/progress.rb:31:in `with_progress_calculation’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action/progress.rb:17:in `run’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass’

/usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/load_setting_values.rb:20:in `run’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass’

/usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_request_id.rb:15:in `block in run’

/usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_request_id.rb:52:in `restore_current_request_id’

/usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_request_id.rb:15:in `run’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass’

/usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_timezone.rb:15:in `block in run’

/usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_timezone.rb:44:in `restore_curent_timezone’

/usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_timezone.rb:15:in `run’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass’

/usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_taxonomies.rb:15:in `block in run’

/usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_taxonomies.rb:45:in `restore_current_taxonomies’

/usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_taxonomies.rb:15:in `run’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:32:in `run’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass’

/usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_user.rb:15:in `block in run’

/usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_user.rb:54:in `restore_curent_user’

/usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_user.rb:15:in `run’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/world.rb:31:in `execute’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:588:in `block (2 levels) in execute_run’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:587:in `catch’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:587:in `block in execute_run’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:490:in `block in with_error_handling’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:490:in `catch’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:490:in `with_error_handling’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:582:in `execute_run’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:303:in `execute’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:18:in `block (2 levels) in execute’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan/steps/abstract.rb:167:in `with_meta_calculation’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:17:in `block in execute’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:32:in `open_action’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:16:in `execute’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/director.rb:94:in `execute’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/executors/sidekiq/worker_jobs.rb:11:in `block (2 levels) in perform’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/executors.rb:18:in `run_user_code’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/executors/sidekiq/worker_jobs.rb:9:in `block in perform’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/executors/sidekiq/worker_jobs.rb:25:in `with_telemetry’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/executors/sidekiq/worker_jobs.rb:8:in `perform’

/usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/executors/sidekiq/serialization.rb:27:in `perform’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:202:in `execute_job’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:170:in `block (2 levels) in process’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/middleware/chain.rb:172:in `invoke’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:169:in `block in process’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:136:in `block (6 levels) in dispatch’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/job_retry.rb:113:in `local’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:135:in `block (5 levels) in dispatch’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq.rb:44:in `block in module:Sidekiq’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:131:in `block (4 levels) in dispatch’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:263:in `stats’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:126:in `block (3 levels) in dispatch’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/job_logger.rb:13:in `call’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:125:in `block (2 levels) in dispatch’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/job_retry.rb:80:in `global’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:124:in `block in dispatch’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/job_logger.rb:39:in `prepare’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:123:in `dispatch’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:168:in `process’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:78:in `process_one’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:68:in `run’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/component.rb:8:in `watchdog’

/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/component.rb:17:in `block in safe_thread’

/usr/share/gems/gems/logging-2.3.1/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context’

RE: Ubuntu repo sync not working - TheForeman