大厅无法到达Docker注册表

问题描述 投票:3回答:2

我已经建立了一个Concourse服务器(在裸机上),一切都在游泳,除了我无法开始任何工作,此时我完全失去了。任何帮助或建议将不胜感激!

以教程的hello world为例,我收到以下错误:

$ fly -t tutorial execute -c task_hello_world.yml
executing build 55 at https://{{full hostname}}/builds/55 
initializing
resource script '/opt/resource/check []' failed: exit status 1

stderr:
failed to ping registry: 2 error(s) occurred:

* ping https: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
* ping http: Get http://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

errored

通过日志获取任何提及的docker,我得到以下内容(并且syslog中没有其他错误):

1月11日03:39:11 {{host}}大厅[13704]:{“timestamp”:“1515641951.825016260”,“source”:“worker”,“message”:“worker.garden.extract-resources.extract.already -extracted”, “LOG_LEVEL”:1, “数据”:{ “资源型”: “搬运工图像”, “会议”: “2.1.6”}}

1月11日03:41:55 {{host}}大厅[13613]:{“timestamp”:“1515642115.660775423”,“source”:“atc”,“message”:“atc.create-build.do.task.image .failed-to-get-latest-image-version“,”log_level“:2,”data“:{”container“:”ce9a7c49-210d-4cf7-6786-d27b1046c76b“,”error“:”resource script'/ opt / resource / check []'失败:退出状态1 \ n \ nstderr:\ n无法ping注册表:发生了2个错误:\ n \ n * ping https:获取https://registry-1.docker.io/v2/:net / http:请求在取消时被取消用于连接(在等待标题时超出Client.Timeout)\ n * ping http:获取http://registry-1.docker.io/v2/:net / http:请求在等待连接时被取消(等待标题时超出Client.Timeout)\ n“,”session“:”240.3。 1.2" }}

我已经开始了我的网络目标:

/usr/share/concourse/bin/concourse \
  web \
  --basic-auth-username {{username}} \
  --basic-auth-password {{password}} \
  --session-signing-key /usr/share/concourse/keys/session_signing_key \
  --tsa-host-key /usr/share/concourse/keys/tsa_host_key \
  --tsa-authorized-keys /usr/share/concourse/keys/authorized_keys \
  --bind-port 8080 \
  --tls-bind-port 8443 \
  --tls-key /etc/letsencrypt/live/{{full hostname}}/privkey.pem \
  --tls-cert /etc/letsencrypt/live/{{full hostname}}/fullchain.pem \
  --postgres-data-source postgres://concourse:concourse@localhost/atc \
  --external-url https://{{full hostname}}

......和我的工人:

/usr/share/concourse/bin/concourse \
  worker \
  --garden-dns-server 8.8.8.8 \
  --work-dir /usr/share/concourse/workspace \
  --tsa-host {{full hostname}} \
  --tsa-public-key /usr/share/concourse/keys/tsa_host_key.pub \
  --tsa-worker-private-key /usr/share/concourse/keys/worker_key

Docker似乎工作正常(例如,docker run hello-world),就像使用docker login登录一样。工作节点似乎很高兴,甚至注册他们知道一些容器(!?):

$ fly -t tutorial workers
name    containers platform  tags  team  state    version 
worker  3           linux    none  none  running  1.2

我有iptables路由端口80和443到8080和8443,但如果我关闭它并使用辅助端口似乎没有任何区别。 Curl似乎运行正常,我认为它不是DNS问题:

$ curl https://registry-1.docker.io/v2/
{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":null}]}

再次,任何建议表示赞赏!

docker concourse
2个回答
2
投票

我在Ubuntu VM上遇到了同样的问题,事实证明我的iptables链FORWARD策略设置为DROP。将FORWARD政策改为ACCEPT解决了这个问题。 $ iptables -P FORWARD ACCEPT


0
投票

我一直面临这个问题,并尝试了几乎所有的东西,比如禁用防火墙,更改iptables设置。

最后,在使用docker-compose.yml文件设置大厅时,我更改了文件中的以下2个设置并解决了问题。

CONCOURSE_GARDEN_DNS_PROXY_ENABLE=true
CONCOURSE_WORKER_GARDEN_DNS_PROXY_ENABLE=true

希望这也能解决您的问题。

© www.soinside.com 2019 - 2024. All rights reserved.