简体   繁体   English

登录人工docker注册表时出现Tunnel Connection Failed错误

[英]Tunnel Connection Failed error when logging into artifactory docker registry

We have created a private docker registry in artifactory. 我们已经在工件中创建了一个私有Docker注册表。 Our artifactory is a standalone installation and have Nginx as a webserver. 我们的工件是独立安装,并具有Nginx作为Web服务器。 SSL certificates are trusted and works fine. SSL证书是受信任的并且可以正常工作。

on docker client, I have copied the ca.crt to /etc/docker/certs.d/:5001/ while am trying to login or push images from my docker client i see below error. 在Docker客户端上,我将ca.crt复制到/etc/docker/certs.d/:5001/上,同时尝试从Docker客户端登录或推送图像,我看到以下错误。

[root@cds-dev-test ~]# docker login artifactory.host:5001 Username: raj Password: Email: raj@gmail.com Error response from daemon: invalid registry endpoint [root @ cds-dev-test〜]#docker login artifactory.host:5001用户名:raj密码:电子邮件:raj@gmail.com守护程序的错误响应:无效的注册表端点

https://artifactory.host:5001/v0/ : unable to ping registry endpoint v2 ping attempt failed with error: Get https://artifactory.host:5001/v2/ : Tunnel Connection Failed v1 ping attempt failed with error: Get artifactory.host:5001/v1/_ping: Tunnel Connection Failed. https://artifactory.host:5001/v0/ :无法ping注册表端点v2 ping尝试失败,并出现错误:Get https://artifactory.host:5001/v2/ :隧道连接失败v1 ping尝试失败,并出现错误:Get artifactory.host:5001/v1/_ping:隧道连接失败。 If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add --insecure-registry artifactory.host:5001 to the daemon's arguments. 如果此专用注册表仅支持带有未知CA证书的HTTP或HTTPS,请在守护程序的参数中添加--insecure-registry artifactory.host:5001 In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; 对于HTTPS,如果您有权访问注册表的CA证书,则不需要该标志; simply place the CA certificate at /etc/docker/certs.d/artifactory.host:5001/ca.crt 只需将CA证书放在/etc/docker/certs.d/artifactory.host:5001/ca.crt

my docker version is 1.9.1 and artifactory versioin 4.4.3. 我的Docker版本是1.9.1,而工件版本是4.4.3。

It works when i use --insecure-registry option but not the secure way. 当我使用--insecure-registry选项而不是安全方式时,它可以工作。 We have all trusted certs in place, still see the error. 我们已经安装了所有受信任的证书,仍然看到错误。

I have tried using proxy settings on docker client and also without proxy... always the same error. 我尝试在Docker客户端上使用代理设置,并且也没有代理...总是相同的错误。

Any help guys? 有帮助吗?

I figured it out. 我想到了。

I have proxy settings under my docker deamon. 我在docker守护进程下有代理设置。 I have added No_Proxy and it works fine. 我添加了No_Proxy,它工作正常。

FYI.... so people if you are using trusted CA cert, and your network is behind proxy, make sure your docker services file doesnt have proxy settings, if it does add No-proxy=artifactory.host. 仅供参考....因此,如果您使用的是受信任的CA证书,并且您的网络位于代理之后,请确保您的docker服务文件没有代理设置(如果确实添加了No-proxy = artifactory.host)。

/etc/systemd/system/docker.service.d/http-proxy.conf /etc/systemd/system/docker.service.d/http-proxy.conf

Thanks 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM