Repo sync stuck in running and result pending

Problem:
trying to sync CentOS 7 repos and task is stuck at 4% and and result is pending for long time.

Foreman and Proxy versions:

> rpm -q katello foreman
katello-4.0.1-1.el7.noarch
foreman-2.4.1-1.el7.noarch

> hammer repository info --id 3
Id:                 3
Name:               CentOS-7-updates
Label:              CentOS-7-updates
Description:
Organization:       example
Red Hat Repository: no
Content Type:       yum
Mirror on Sync:     no
Url:                https://mirrors.edge.kernel.org/centos/7/updates/x86_64/
Publish Via HTTP:   yes
Published At:       https://localhost/pulp/content/example/Library/custom/CentOS-7/CentOS-7-updates/
Relative Path:      example/Library/custom/CentOS-7/CentOS-7-updates
Download Policy:    immediate
HTTP Proxy:
    HTTP Proxy Policy: global_default_http_proxy
Product:
    Id:   1
    Name: CentOS-7
GPG Key:

Sync:
    Status:
    Last Sync Date: 23 days
Created:            2020/12/08 01:49:10
Updated:            2021/06/15 18:10:12
Content Counts:
    Packages:       2458
    Source RPMS:    0
    Package Groups: 0
    Errata:         0
    Module Streams: 0

Distribution and version:
CentOS 7.9

how do I check what’s the reason for the task got stuck?

all the repositories sync having this issue , anyone can help with this? thanks.

You can go to Monitor → Tasks and search for the sync-task for that repository (could be running or paused or pending if stuck).
In the task details you have the tabs for running steps and errors, which might give you some more information (if there is an error).
If this does not help you on the “task”-tab there is a button to the “dynflow console” where you can see each step which is performed, has errors or is pending. In case of a stuck task you could skip steps to finish the task (however, this will not result in a correct repository sync).

Maybe you can find some information that help you or you could post here, to help you.

1 Like