{"record":{"id":"8afa5cbc22c6f755","repo":"goharbor/harbor","slug":"preheating-is-failed","errorCode":null,"errorMessage":"preheating is failed","messagePattern":"preheating is failed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/p2p/preheat/job.go","lineNumber":155,"sourceCode":"\t\treturn nil\n\t}\n\n\t// Then send the preheat requests to the target provider.\n\tst, err := d.Preheat(pi)\n\tif err != nil {\n\t\treturn preheatJobRunningError(err)\n\t}\n\n\tmyLogger.Info(\"Sending preheat request is successfully done\")\n\n\t// For some of the drivers, e.g: Kraken, the returned status of preheating request contains the\n\t// final status info. No need to loop check the status.\n\tswitch st.Status {\n\tcase provider.PreheatingStatusSuccess:\n\t\tmyLogger.Info(\"Preheating is completed\")\n\t\treturn nil\n\tcase provider.PreheatingStatusFail:\n\t\terr = errors.New(\"preheating is failed\")\n\t\treturn preheatJobRunningError(err)\n\tcase provider.PreheatingStatusPending,\n\t\tprovider.PreheatingStatusRunning:\n\t// do nothing\n\tdefault:\n\t\t// in case\n\t\terr = errors.Errorf(\"unknown status '%s' returned by the preheat provider %s-%s:%s\", st.Status, p.Vendor, p.Name, p.Endpoint)\n\t\treturn preheatJobRunningError(err)\n\t}\n\n\tif shouldStop() {\n\t\treturn nil\n\t}\n\n\tmyLogger.Info(\"Start to loop check the preheating status until it's success or timeout(30m)\")\n\t// If process is not completed, loop check the status until it's ready.\n\ttk := time.NewTicker(checkInterval)\n\tdefer tk.Stop()","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/p2p/preheat/job.go#L137-L173","documentation":"The P2P preheat job's status check found that the provider (Dragonfly, Kraken, etc.) already reported the preheat request as failed in the initial response — for these drivers the first status is final, so the job is immediately marked failed via preheatJobRunningError. It indicates the provider-side distribution task failed, not that Harbor could not talk to the provider (that produces a different send error).","triggerScenarios":"Executing a preheat policy (manual trigger POST .../preheat/policies/{id}/executions, scheduled trigger, or event-based) against an instance whose API accepts the request but returns status=fail — e.g. Dragonfly scheduler cannot pull the image, seed peers unavailable, or the provider rejects the task.","commonSituations":"Dragonfly/Kraken cluster partially down (seed peers offline); image not pullable by the provider (private repo + missing/incorrect instance auth, image not yet pushed/PUSH missing); version incompatibility between Harbor and the distribution plugin; resource exhaustion on the provider returning fail fast.","solutions":["Check the provider's own logs/scheduler for the failed task correlated with the execution ID.","Verify instance connectivity and health from Harbor core (GET /api/v2.0/p2p/preheat/instances, then ping the provider endpoint) and that the provider cluster is healthy.","Confirm the artifact is pullable: correct repo/tag in the policy filters, image exists, and instance auth (auth_info) is valid for pulling.","Fix the root cause then re-run: POST /api/v2.0/projects/{project}/preheat/policies/{policy_id}/executions to create a new execution."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Before triggering preheat, confirm the provider side is up\n// GET /api/v2.0/p2p/preheat/instances -> check the instance; then from core:\nresp, err := http.Get(instance.Endpoint + \"/health\") // provider-appropriate health route\nif err != nil || resp.StatusCode >= 500 { fail(\"provider unhealthy — fix before preheating\") }","typeGuard":null,"tryCatchPattern":"In job/execution monitoring, treat this as a terminal-fail status: inspect provider logs, fix the root cause (cluster health, image pullability, auth), then create a NEW execution (POST .../preheat/policies/{id}/executions) rather than restarting the failed one unchanged.","preventionTips":["Health-check the Dragonfly/Kraken cluster before scheduled preheat windows.","Verify policy filters match pushed, pullable images and that instance auth works.","Keep provider and Harbor plugin versions compatible; read provider task logs on first failure."],"tags":["p2p-preheat","dragonfly","kraken","jobs","distribution"],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}