Unlock Stuck Tasks

JFrog REST APIs

Content Type
REST API

Description: Unlocks all stuck distribution tasks. Requires an execution token.

Since: 2.23.0

Security: Admin only

Usage: POST /distribution/api/v1/maintenance/execute/unlock_stuck

Request headers: N/A

Consumes: Content-Type: text/plain

Produces: application/json

Request Example:

$ curl -XPOST -H "Content-Type: text/plain" -u admin:password "http://localhost:8080/distribution/api/v1/maintenance/execute/unlock_stuck?dryRun=false" --data-raw "token..."

Query Parameter (optional):

Field

Type

Required

Default Value

Since

Description

dryRun

Query Param

yes

true

2.23.0

If set to true, parses, validates, and returns the list of tasks that would be unlocked, but does not execute the operation.

Sample Response:

{
    "unlocked": // true/false - corresponds to the dryRun param.
    "stuck_distributions" : [
        {
            "bundle_name" : "rb",
            "bundle_version" : "1.0.0",
            "release_bundles_schema" : "rbv1",
            "distribution_friendly_id" : "2",
            "status" : "CREATED",
            "distribution_tracker_id" : "111100000"
        },
        {
            "bundle_name" : "rb2",
            "bundle_version" : "2.0.0",
            "release_bundles_schema" : "rbv2",
            "distribution_friendly_id" : "1",
            "status" : "IN_PROGRESS",
            "distribution_tracker_id" : "211100000"
        }
    ]
}

Response status codes:

202 - Successfully aborted all distribution tasks

Response headers: N/A

Tip

JFrog Distribution 2.32.0 and later contains an auto-recovery mechanism that detects and frees stuck distribution tasks. To activate it, open the Distribution application config YAML file, and in the internal.monitoring section, change the value of the stuck-tasks-auto-recovery-enabled property to true.Distribution Application Config YAML File