我们一直在尝试在我们的AWS中设置concourse 5.0.0
(我们已经设置了4.2.2
)。我们创建了两个实例,一个用于Web,另一个用于工作者。我们能够看到该网站正常运行,但我们无法运行我们的管道。我们检查了日志,发现工人抛出了以下错误。
Workerr.beacon.forward-conn.failed-to-dial","data":{"addr":"127.0.0.1:7777","error":"dial tcp 127.0.0.1:7777: connect: connection refused","network":"tcp","session":"9.1.4"}}
我们假设工人正在努力连接到web
实例,并想知道这是否可能是由于缺少gdn配置。大堂5.0.0
发布包括大厅和gdn二进制文件。我们想尝试--garden-config
文件,看看是否能解决问题。
有人可以建议我们如何编写花园配置文件?
我遇到了同样的问题并使用@ umamaheswararao-meka的答案解决了这个问题。 (在EC2上使用ubuntu 18.04)
容器无法解析域名(https://github.com/docker/libnetwork/issues/2187)也存在问题。这是错误消息:
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)
我做了什么:
sudo apt-get install resolvconf -y
# These are cloudflare's DNS servers
sudo echo "nameserver 1.1.1.1" >> /etc/resolvconf/resolv.conf.d/tail
sudo echo "nameserver 1.0.0.1" >> /etc/resolvconf/resolv.conf.d/tail
sudo resolvconf -u
cat /etc/resolv.conf # just to make sure changes are in place
# restart concourse service
容器使用resolv.conf,并且在ubuntu 18.04上动态生成文件,这是使容器继承此配置的最简单方法。
还有来自man resolvconf
的相关片段
-u Just run the update scripts (if updating is enabled).
/etc/resolvconf/resolv.conf.d/tail
File to be appended to the dynamically generated resolver configuration file. To append
nothing, make this an empty file. This file is a good place to put a resolver options
line if one is needed, e.g.,
这是gdn
(花园二进制)没有配置的问题。我们必须在CONCOURSE_BIND_IP=xx.xx.x.x
文件中包含gdn
(你的CONCOURSE_BIND_PORT=7777
所在的IP)和gdn's
(wroker.env
端口)。这解决了我们的问题。