goharbor/harbor · error

current registry is unhealthy, regID

Error message

current registry is unhealthy, regID:%v, Name:%v, Status: %v

What it means

Guard in remoteHelper.init rejecting an upstream registry whose health status is not model.Healthy. NewRemoteHelper fails fast so the proxy does not attempt pulls against an unreachable or degraded registry.

Solutions

  1. Check the registry's health status and network reachability from Harbor
  2. Verify credentials and endpoint URL of the upstream registry
  3. Wait for the registry to recover or fix it, then retry the pull
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/controller/proxy/remote.go:78 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16). Data as JSON: /api/errors/950128f41298e049. Report an issue: GitHub.

Appendix: source

Thrown at src/controller/proxy/remote.go:78

	if err := r.init(ctx); err != nil {
		return nil, err
	}
	return r, nil
}

func (r *remoteHelper) init(ctx context.Context) error {
	if r.registry != nil {
		return nil
	}
	reg, err := r.registryMgr.Get(ctx, r.regID)
	if err != nil {
		return err
	}
	if reg == nil {
		return fmt.Errorf("failed to get registry, registryID: %v", r.regID)
	}
	if reg.Status != model.Healthy {
		return fmt.Errorf("current registry is unhealthy, regID:%v, Name:%v, Status: %v", reg.ID, reg.Name, reg.Status)
	}
	factory, err := adapter.GetFactory(reg.Type)
	if err != nil {
		return err
	}
	adp, err := factory.Create(reg)
	if err != nil {
		return err
	}
	r.registry = adp.(adapter.ArtifactRegistry)
	return nil
}

func (r *remoteHelper) BlobReader(repo, dig string) (int64, io.ReadCloser, error) {
	sz, bReader, err := r.registry.PullBlob(repo, dig)
	if err != nil {
		return 0, nil, err
	}

View on GitHub (pinned to 7b2fd08cc5)