gpt4 book ai didi

dial tcp: lookup xxx.xxx.xxx.xxx: no such host(拨号TCP:查找xxx.xxx:没有这样的主机)

转载 作者:bug小助手 更新时间:2023-10-26 20:07:01 27 4
gpt4 key购买 nike



Trying to push an docker image to private docker repository. but getting error like: "dial tcp: lookup xxx.xxx.xxx.xxx: no such host".
I have logged in correctly to the repository and build succeeded.

正在尝试将坞站映像推送到私有坞站存储库。但收到如下错误:“拨号tcp:lookup xxx.xxx:没有这样的主机”。我已正确登录到存储库,并且构建成功。



The following command using to push the image to private repo:
sud docker push x.x.x.x:446/dns/graphs

以下命令用于将映像推送到私有repo:sud docker推送x.x:446/dns/graph


更多回答
优秀答案推荐

Editing the DNS nameserver in /etc/resolv.conf file helped me.

编辑/etc/Resolv.conf文件中的域名服务器对我很有帮助。



Change your existing nameserver to google nameserver i.e., x.x.x.x to 8.8.8.8

将您现有的名称服务器更改为Google名称服务器,即,x.x.x.x到8.8.8.8



Comment your nameserver IP and add something like this :

注释您的域名服务器IP并添加如下内容:



#nameserver x.x.x.x
nameserver 8.8.8.8


should work.

应该行得通。



If you are behind a proxy, this could be your issue. In this case, you need to configure the Docker daemon (not the client) proxy settings. You can do that by:

如果你是代理人的幕后黑手,这可能是你的问题。在这种情况下,您需要配置Docker守护进程(而不是客户端)代理设置。您可以通过以下方式做到这一点:




  1. Create a systemd drop-in directory for the docker service:


    • sudo mkdir -p /etc/systemd/system/docker.service.d


  2. Create a file called /etc/systemd/system/docker.service.d/http-proxy.conf that adds the HTTP_PROXY environment variable:


    • [Service]
      Environment="HTTP_PROXY=http://proxy.example.com:80/"


  3. Flush changes


    • sudo systemctl daemon-reload


  4. Restart docker daemon


    • sudo systemctl restart docker




Reference: Docker documentation.

参考:Docker文档。



In my case, it was because of a typo mistake.

在我的案例中,这是因为一个打字错误。


I wrote for example:

例如,我写道:


my-registryhob.mydomain.com

My-registryhob.mydomain.com


instead of:

不是:


my-registryhub.mydomain.com

My-registryhub.mydomain.com


Check for typo mistake..

检查打字错误..



I was running into this issue because we had a private module and I didn't configure private module environment variables.
Adding these fixed my issue:

我遇到这个问题是因为我们有一个私有模块,而我没有配置私有模块环境变量。添加这些解决了我的问题:


export GOPRIVATE="*.company.com"            
export GOPROXY=athens.company.com
export GONOSUMDB="*.company.com"

More details at: https://go.dev/ref/mod#private-modules

更多详情请访问:https://go.dev/ref/mod#private-modules



Seems like the domain name which you are using for your private repo is expired, that is why it is not resolving through global DNS 8.8.8.8 . Check with your Domain name provider.

您用于私人回购的域名似乎已过期,这就是为什么它不能通过全局DNS 8.8.8.8进行解析的原因。请咨询您的域名提供商。



Had the same error, and my problem was that I mistyped the registry url puting '.co' instead of '.com' at the end of host:

我也犯了同样的错误,我的问题是我错误地输入了注册表URL,在主机的末尾输入了‘.co’而不是‘.com’:


What I wrongly typed: *********.dkr.ecr.us-east-2.amazonaws.co

我输入错误的内容:*.dkr.ecr.us-East-2.amazonaws.co


What shold be: *********.dkr.ecr.us-east-2.amazonaws.com

应该是:*.dkr.ecr.us-East-2.amazonaws.com


Causing to be a host that really doesn't exist. Always check it twice.

导致成为一个实际上并不存在的宿主。一定要检查两次。



Facing the same issue dial tcp: lookup abc.com on 127.0.0.11:53: no such host.

面对同样的问题,请在127.0.0.11:53拨打tcp:lookup abc.com:没有这样的主机。


Issue resolved when

问题解决,



Turn off the VPN



更多回答

That did indeed work...thank you. Any idea why Google Cloud Shell is configured with a different nameserver than 8.8.8.8? The nameserver that is configured in resolve.conf by default is unreachable.

这确实奏效了……谢谢。知道为什么Google Cloud Shell配置了与8.8.8.8不同的名称服务器吗?默认情况下,在解决方案.conf中配置的名称服务器是无法访问的。

Introduction to Google Public DNS: developers.google.com/speed/public-dns/docs/intro

谷歌公共域名简介:developers.google.com/speed/public-dns/docs/intro

I had this issue when creating a cluster on kubernetes and know it's resolved with this answer.

当我在Kubernetes上创建集群时,我遇到了这个问题,我知道这个问题已经通过这个答案解决了。

I had this issue using Doppler. it works like a charm

我在用多普勒的时候遇到了这个问题。它的作用就像一种护身符

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com