Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insecure-registries参数没有生效 #138

Open
likakuli opened this issue Sep 12, 2018 · 7 comments

Comments

Projects
None yet
6 participants
@likakuli
Copy link

commented Sep 12, 2018

docker的daemon.config文件中配置了"insecure-registries":["10.0.13.19"],用harbor搭的本地私有仓储,通过http-proxy的方式使用的蜻蜓,dfdaemon --registry http://10.0.13.19

docker版本: 17.09.0
蜻蜓版本:
supernode: 0.2.0
dfdaemon: 0.2.0

结果:
docker login 10.0.13.19失败
提示:Error response from daemon: Login: Account is not active. Please see the documentation of the registry http://10.0.13.19/v1/ for instructions how to activate it.

查看docker日志,一直在访问https的api
:09.596326606+08:00" level=info msg="Error logging in to v2 endpoint, trying next endpoint: Get https://10.0.13.19/v2/: Not Found"
:09.598108333+08:00" level=info msg="Error logging in to v2 endpoint, trying next endpoint: login attempt to http://10.0.13.19/v2/ failed with statu
:09.598645528+08:00" level=info msg="Error logging in to v1 endpoint, trying next endpoint: Get https://10.0.13.19/v1/users/: Not Found"

看起来很像是insecure-registries参数没有生效,但是把dfdaemon降为0.0.1版本就没问题了,0.0.1版本的时候叫df-daemon

@likakuli

This comment has been minimized.

Copy link
Author

commented Sep 12, 2018

而且耗时比直接docker pull耗时高,默认的同时拉三层,但看起来同时只拉一层,没有并发,而且在一层拉完再拉下一层的时候有明显的卡顿

@xunchangguo

This comment has been minimized.

Copy link

commented Sep 17, 2018

我用的0.2.0版本,现象和你的一样,我还试过http_proxy方式,都没成功

@seamounts

This comment has been minimized.

Copy link

commented Apr 10, 2019

dfdaemon 0.3.0 无法使用 harbor。换成 0.0.1 版本可以,这个怎么解决

@seamounts

This comment has been minimized.

Copy link

commented Apr 11, 2019

对接harbor发现的问题:

  1. 使用 registry-mirrors 配置后,拉取 harbor 镜像没有经过 Dragonfly.
  2. 配置 通过http-proxy 模式使用,发现 insecure-registries参数不生效,登陆拉取均报 403
@allencloud

This comment has been minimized.

Copy link
Contributor

commented Apr 11, 2019

@seamounts 详细的报错信息,可以贴上来吗?

@seamounts

This comment has been minimized.

Copy link

commented Apr 11, 2019

@seamounts 详细的报错信息,可以贴上来吗?

  1. 对接harbor 时, 配置 registry-mirrors 后,拉取镜像没有经过 Dragonfly,看日志没有错误信息
    dockerd log报:
    level=error msg="Handler for POST /v1.39/images/create returned error: error parsing HTTP 403
    response body: invalid character 'o' in literal null (expecting 'u'): "no matched registry for
    10.21.66.18""

  2. 使用 http-proxy 后, 登陆 harbor 报错如下:
    Error response from daemon: login attempt to http://10.21.66.18/v2/ failed with status: 403 Forbidden

  3. 报504 那个错误是配置问题,已经解决了。
    目前使用 http-proxy 模式 加 0.0.1 版本 dfdaemon 可以正常拉取。0.0.1以上的版本都不行

@khchan123

This comment has been minimized.

Copy link

commented May 14, 2019

Yes. I am seeing the same problem too. I use dfclient 0.3.0 + Harbor (HTTP only). I configured Dragonfly as HTTP_PROXY, but it's not working and always getting HTTP403 error. Any help is appreciated?


[kchan@kchan04 ~]$ dfdaemon --registry=192.168.0.104 &
[kchan@kchan04 ~]$ cat /etc/docker/daemon.json 
{
  "insecure-registries": [
    "127.0.0.1:65001",
    "192.168.0.104"
  ]
}
[kchan@kchan04 ~]$ docker pull 192.168.0.104/library/hello-world
Using default tag: latest
Error response from daemon: error parsing HTTP 403 response body: invalid character 'o' in literal null (expecting 'u'): "no matched registry for 192.168.0.104"

I have capture the HTTP traffic and appears like the dfdaemon does not try to obtain an Bearer Auth token upon HTTP401 error.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.