Comments (9)
@ywk253100 +1
from harbor.
@seanchann,It seems duplicate with #79
from harbor.
same error when I rm mysql and any volume, then rebuild all image from scratch.
In Deploy/docker-compose.yml Not found any link or depends_on with mysql for ui, the hostname ‘mysql’ will be not found, may be that is a reason for this error
from harbor.
mysql container logs, may be helpful
from harbor.
could you please tar all your logs and attach to this issue?
from harbor.
Hi :
docker version:
Docker version 1.11.0, build 4dc5990
docker-compose version:
docker-compose version 1.6.2, build 4d72027
docker network:
NETWORK ID NAME DRIVER
1f513b5253f9 bridge bridge
54afb3da86ee deploy_default bridge
bd5ac05a7fd4 host host
a6d96cec144d none nul
docker inspect deploy_default:
$ docker network inspect deploy_default
[
{
"Name": "deploy_default",
"Id": "54afb3da86ee885edcf96e041272e033b597ee10b8cf853d9606d68110c75cdb",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.21.0.0/16",
"Gateway": "172.21.0.1/16"
}
]
},
"Internal": false,
"Containers": {
"25c08323f63baf7282cab323aa0cea20e168a77357dbb149dd027a766979f915": {
"Name": "deploy_log_1",
"EndpointID": "c0a776d7ac10df0607f56931133784d4919f95be74488d00a625bb1beaeaeef0",
"MacAddress": "02:42:ac:15:00:02",
"IPv4Address": "172.21.0.2/16",
"IPv6Address": ""
},
"66820cd2726daa1ecfdaad41d12b523ea628ffca29b93b78310e8378e5adab17": {
"Name": "deploy_registry_1",
"EndpointID": "f90a79e2dc8920790da85be9df26825188e5be7565ed94e638757d49d867b416",
"MacAddress": "02:42:ac:15:00:05",
"IPv4Address": "172.21.0.5/16",
"IPv6Address": ""
},
"b59d737375019f1c0f1a15b69a4e1b6b379b6713e85b79240a1d814f8c5ee074": {
"Name": "deploy_mysql_1",
"EndpointID": "5cf52f7a7fceff39b1a54c17b599a4a87b425c4989cf5c87eb0704ca2b404350",
"MacAddress": "02:42:ac:15:00:04",
"IPv4Address": "172.21.0.4/16",
"IPv6Address": ""
},
"d31c0d001f63417f67892e5bd696f86bab63cf0e131a3831d45dab56a1ec917e": {
"Name": "deploy_proxy_1",
"EndpointID": "3489487707a18ab0170d78eb1ff69aca8742953b918861c80a190a65ca6f4391",
"MacAddress": "02:42:ac:15:00:06",
"IPv4Address": "172.21.0.6/16",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {}
}
]
all logs about this error:
from harbor.
Can you ping mysql in UI container before it crashes?
from harbor.
Hi:
I delete search dockerregistry.com
line in resolv.conf on host, then ui connected db success.
anyone can tell me what happen.
@ywk253100
I ping mysql
in UI container, this IP addr is right for mysql
but ui program get a wrong ip for mysql, it use mysql.dockerregistry.com
to connection mysql
from harbor.
The error caused by the way how the Go DNS resolver resolves names.
There are two types of resolvers in golang, one is the pure Go resolver that sends DNS requests directly to the servers listed in /etc/resolv.conf, and other one uses a cgo-based resolver that calls C library routines such as getaddrinfo and getnameinfo. And by default the pure Go resolver is used.
The /etc/resolv.conf in your UI container should be like this:
search dockerregistry.com
nameserver 127.0.0.11
options ndots:0
Because the configuration "ndots" is set to 0, when you want to resolve "mysql", the resolver should try resolve "mysql." first, and then "mysql.dockerregistry.com.". But in the implements of the pure Go resolver, it will set "ndots" to 1 when "ndots" less than 1. So the pure Go resolver will try resolve "mysql.dockerregistry.com." first. As it happened, in your DNS, this domain name was valid, so you got a weird IP address. This also explains why ping works will in container, because ping handles "ndots" correctly.
There are two workarounds to solve this problem:
- Add "GODEBUG=netdns=cgo" to harbor/Deploy/templates/ui/env. This will make Go to use cgo-based resolver.
- Modify "mysql" in harbor/Deploy/docker-compose.yml to "mysql.harbor".
from harbor.
Related Issues (20)
- Discrepancy Between Expected and Observed Behavior in GC Scheduling: Cron Parameter Requirement in Development UI HOT 3
- image not synced to AWS ECR docker registry from harbor
- Error occurred in UserLogin: Failed to authenticate user, due to error 'Invalid credentials' HOT 1
- The artifact sha256 shown in proxy cache project does not match digest sha256 shown in 'docker inspect' HOT 5
- Feature request: healthz endpoint
- 【Urgent】Does Harbor not support pushing images like "xxx.com/my_project:my_tag"? HOT 1
- Some labels are not displayed in the label tooltip box in Artifacts list page
- How can I install Trivy after the installation of Harbor? HOT 3
- Migrate robot accounts to new harbor instance HOT 2
- Failed to push a singularity image to the harbor registry HOT 1
- Link on Config Harbor YML file page HOT 2
- Scheduled replication suddenly stops working HOT 3
- failed to verify certificate when pod is pulling image HOT 2
- [BUG]Different images - same tag - old images are not untagged HOT 10
- Cloud Postgres and Redis resource sizing recommendation HOT 1
- replication rule filter with label not been updated via UI
- Add Korean tlansration HOT 3
- Limit/Filter repositories accessible thru a proxied registry
- Task with job id not found for harbor v2.8.4
- Display unknown arch and OS artifact when replicate from dockerhub
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from harbor.