On Harbor UI, it failed with error "Failed to ping endpoint"
search cancel

On Harbor UI, it failed with error "Failed to ping endpoint"

book

Article ID: 436146

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service

Issue/Introduction

  • When configuring a Proxy Cache or Registry Endpoint in the Harbor UI, the operation fails with the error: "Failed to ping endpoint."

  • If Harbor is deployed as Supervisor Services, check the harbor-core pod logs to find the failure reason from Supervisor Context

kubectl logs harbor-core-####-## -n svc-harbor-domain-c# | grep -iE "ping|endpoint|error|connect|retry"
YYYY-MM-DDTHH:MM:SS [ERROR] [/lib/cache/cache.go:122]: failed to ping redis://harbor-redis:6379/0?idle_timeout_seconds=30, retry after 500ms : dial tcp x.x.x.x:6379: connect: no route to host
YYYY-MM-DDTHH:MM:SS [ERROR] [/lib/cache/cache.go:122]: failed to ping redis://harbor-redis:6379/0?idle_timeout_seconds=30, retry after 865.896461ms : dial tcp x.x.x.x:6379: connect: no route to host
YYYY-MM-DDTHH:MM:SS [ERROR] [/common/utils/utils.go:108]: failed to connect to tcp://harbor-database:5432, retry after 2 seconds :dial tcp x.x.x.x:5432: connect: no route to host
YYYY-MM-DDTHH:MM:SS [ERROR] [/common/utils/utils.go:108]: failed to connect to tcp://harbor-database:5432, retry after 2 seconds :dial tcp x.x.x.x:5432: connect: no route to host
YYYY-MM-DDTHH:MM:SS [ERROR] [/common/utils/utils.go:108]: failed to connect to tcp://harbor-database:5432, retry after 2 seconds :dial tcp x.x.x.x:5432: connect: no route to host
YYYY-MM-DDTHH:MM:SS [ERROR] [/common/utils/utils.go:108]: failed to connect to tcp://harbor-database:5432, retry after 2 seconds :dial tcp x.x.x.x:5432: connect: no route to host
YYYY-MM-DDTHH:MM:SS [ERROR] [/common/utils/utils.go:108]: failed to connect to tcp://harbor-database:5432, retry after 2 seconds :dial tcp x.x.x.x:5432: connect: no route to host
YYYY-MM-DDTHH:MM:SS [ERROR] [/lib/http/error.go:57]: {"errors":[{"code":"UNKNOWN","message":"unknown: Get \"https://<externalregistryurl>/api/version\": dial tcp x.x.x.x:443: i/o timeout"}]}
YYYY-MM-DDTHH:MM:SS [ERROR] [/lib/http/error.go:57]: {"errors":[{"code":"UNKNOWN","message":"unknown: Get \"https://<externalregistryurl>/api/version\": dial tcp x.x.x.x:443: i/o timeout"}]}
YYYY-MM-DDTHH:MM:SS [ERROR] [/pkg/reg/adapter/native/adapter.go:126]: failed to ping registry <registry url>: Get "https://<externalregistryurl>/v2/": dial tcp x.x.x.x:443: i/o timeout
YYYY-MM-DDTHH:MM:SS [ERROR] [/pkg/reg/adapter/native/adapter.go:126]: failed to ping registry <registry url>: Get "https://<externalregistryurl>/v2/": dial tcp x.x.x.x:443: i/o timeout

Cause

Supervisor Workload Network did not have the outbound traffic to the configured external registry over 443 port.

Resolution

To resolve the "Failed to ping endpoint" error when configuring a Proxy Cache or Registry Endpoint, ensure that the Supervisor Workload network has outbound access to the external registry over 443 port.

 

Supported external registry details can be found in the below Harbor Docs:-