'While using Harbor create 'New Registry Endpoint' unhealthy issue

While using harbor create 'New Registry Endpoint' unhealthy issue as below:

I followed the https cert generation instruction as link: https://goharbor.io/docs/1.10/install-config/configure-https/

Harbor installed successfully, and logged in to create the 'New Registry Endpoint', and showed the issue 'registry https://hub.csp.cn is unhealthy: unhealthy'

the issue image as below

I checked the harbor logs warning

'Jun 25 09:40:26 172.18.0.1 core[1034]: 2020-06-25T01:40:26Z [ERROR] [/replication/adapter/native/adapter.go:154]: failed to ping registry https://hub.csp.cn: Head https://hub.csp.cn/v2/: Get https://hub.csp.cn/v2/: dial tcp: lookup hub.csp.cn on 127.0.0.11:53: no such host'

The vmware IP is '192.168.111.100' and domain mapping is 'hub.csp.cn'

I followed the issue log to check the source as below: code screenshot

I'm not familiar with the Go source code.

Does anyone have any idea about the issue?

Thanks.



Solution 1:[1]

I know this is old but thought I might be able to help someone else.

I had this happen using Terraform to add a dockerhub registry to Harbor. It was actually dockerhub telling me it didn't like my credentials. I hard-coded them to test and it worked.

Pretty sure I just needed to add double quotes around my token (which was an environment variable) instead of single quotes... That seems to be what fixed it.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 FlockOfTanks