我已经设置了一个Concourse服务器(在裸机上),并且一切都进行得很顺畅,除了我无法开始任何工作,这时我完全处于亏损状态。任何帮助或建议,将不胜感激!
以本教程的hello世界为例,出现以下错误:
$ 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
Run Code Online (Sandbox Code Playgroud)
仔细查看日志中关于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,” data“:{” resource-type“:” docker-image“,” session“:” 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“:”资源脚本'/ 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:等待连接时请求被取消(客户端。等待标头时超出超时)\ n“,”会话“:” 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}}
Run Code Online (Sandbox Code Playgroud)
...和我的工人:
/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
Run Code Online (Sandbox Code Playgroud)
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
Run Code Online (Sandbox Code Playgroud)
我iptables将端口80和443路由到8080和8443,但是如果我关闭此端口并使用辅助端口,则似乎没有任何区别。Curl似乎工作正常,我认为这不是DNS问题:
$ curl https://registry-1.docker.io/v2/
{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":null}]}
Run Code Online (Sandbox Code Playgroud)
再次感谢您的任何建议!
小智 6
我已经面临这个问题有一段时间了,并尝试了几乎所有方法,例如禁用防火墙、更改 iptables 设置。
最后,在使用 docker-compose.yml 文件设置大厅时,我更改了文件中的以下 2 个设置并解决了问题。
CONCOURSE_GARDEN_DNS_PROXY_ENABLE=true
CONCOURSE_WORKER_GARDEN_DNS_PROXY_ENABLE=true
Run Code Online (Sandbox Code Playgroud)
希望这也能解决您的问题。
我在 Ubuntu VM 上遇到了同样的问题,结果发现我的 iptables 链FORWARD策略设置为DROP. 改变FORWARD政策来ACCEPT解决问题。
$ iptables -P FORWARD ACCEPT
| 归档时间: |
|
| 查看次数: |
1331 次 |
| 最近记录: |