3

我正在尝试在 AWS 上使用 Deis 推出一个 Node 应用程序(该应用程序已经为我工作了几个月,但最近才停止工作)。我现在注意到,当我推送我的应用程序时,并没有创建一个新版本。但是,如果我使用 deis config:set 更改环境变量,则会创建一个新版本;但是,它没有与之关联的构建(尝试扩展流程时出现以下错误:“没有与此版本关联的构建”)。

推送应用程序时,一切似乎都很顺利,我看到:

Trigger 0, RUN mkdir -p /app
Step 0 : RUN mkdir -p /app
 ---> Using cache
Trigger 1, WORKDIR /app
Step 0 : WORKDIR /app
 ---> Using cache
Trigger 2, ADD slug.tgz /app
Step 0 : ADD slug.tgz /app
 ---> 27a0d5cb7ff0
Removing intermediate container e4345a7b152a
Step 1 : ENV GIT_SHA f959d84d4496c48e39b045d727527d203d4e17a3
 ---> Running in 32ed021a1456
 ---> 03e742bd6cf4
Removing intermediate container 32ed021a1456
Successfully built 03e742bd6cf4
-----> Pushing image to private registry

查看注册表的日志(这似乎是导致问题的原因)时,我看到:

Nov 25 05:12:43 ip-10-0-10-252.ec2.internal sh[12257]: Traceback (most recent call last):
Nov 25 05:12:43 ip-10-0-10-252.ec2.internal sh[12257]: File "/app/bin/create_bucket", line 23, in <module>
Nov 25 05:12:43 ip-10-0-10-252.ec2.internal sh[12257]: if name not in (bucket.name for bucket in conn.get_all_buckets()):
Nov 25 05:12:43 ip-10-0-10-252.ec2.internal sh[12257]: File "/usr/lib/python2.7/site-packages/boto/s3/connection.py", line 436, in get_all_buckets
Nov 25 05:12:43 ip-10-0-10-252.ec2.internal sh[12257]: response = self.make_request('GET', headers=headers)
Nov 25 05:12:43 ip-10-0-10-252.ec2.internal sh[12257]: File "/usr/lib/python2.7/site-packages/boto/s3/connection.py", line 664, in make_request
Nov 25 05:12:43 ip-10-0-10-252.ec2.internal sh[12257]: retry_handler=retry_handler
Nov 25 05:12:43 ip-10-0-10-252.ec2.internal sh[12257]: File "/usr/lib/python2.7/site-packages/boto/connection.py", line 1068, in make_request
Nov 25 05:12:43 ip-10-0-10-252.ec2.internal sh[12257]: retry_handler=retry_handler)
Nov 25 05:12:43 ip-10-0-10-252.ec2.internal sh[12257]: File "/usr/lib/python2.7/site-packages/boto/connection.py", line 943, in _mexe
Nov 25 05:12:43 ip-10-0-10-252.ec2.internal sh[12257]: response = connection.getresponse()
Nov 25 05:12:43 ip-10-0-10-252.ec2.internal sh[12257]: File "/usr/lib/python2.7/httplib.py", line 1073, in getresponse
Nov 25 05:12:43 ip-10-0-10-252.ec2.internal sh[12257]: response.begin()
Nov 25 05:12:43 ip-10-0-10-252.ec2.internal sh[12257]: File "/usr/lib/python2.7/httplib.py", line 415, in begin
Nov 25 05:12:43 ip-10-0-10-252.ec2.internal sh[12257]: version, status, reason = self._read_status()
Nov 25 05:12:43 ip-10-0-10-252.ec2.internal sh[12257]: File "/usr/lib/python2.7/httplib.py", line 371, in _read_status
Nov 25 05:12:43 ip-10-0-10-252.ec2.internal sh[12257]: line = self.fp.readline(_MAXLINE + 1)
Nov 25 05:12:43 ip-10-0-10-252.ec2.internal sh[12257]: File "/usr/lib/python2.7/socket.py", line 476, in readline
Nov 25 05:12:43 ip-10-0-10-252.ec2.internal sh[12257]: data = self._sock.recv(self._rbufsize)
Nov 25 05:12:43 ip-10-0-10-252.ec2.internal sh[12257]: socket.timeout: timed out
Nov 25 05:12:44 ip-10-0-10-252.ec2.internal systemd[1]: deis-registry@1.service: Main process exited, code=exited, status=1/FAILURE
Nov 25 05:12:44 ip-10-0-10-252.ec2.internal docker[17529]: Error response from daemon: no such id: deis-registry
Nov 25 05:12:44 ip-10-0-10-252.ec2.internal docker[17529]: Error: failed to stop containers: [deis-registry]
Nov 25 05:12:44 ip-10-0-10-252.ec2.internal systemd[1]: deis-registry@1.service: Unit entered failed state.
Nov 25 05:12:44 ip-10-0-10-252.ec2.internal systemd[1]: deis-registry@1.service: Failed with result 'exit-code'.
Nov 25 05:12:49 ip-10-0-10-252.ec2.internal systemd[1]: deis-registry@1.service: Service hold-off time over, scheduling restart.
Nov 25 05:12:49 ip-10-0-10-252.ec2.internal systemd[1]: Starting deis-registry...
Nov 25 05:12:49 ip-10-0-10-252.ec2.internal etcdctl[17601]: Error:  105: Key already exists (/deis/cache) [18268602]
Nov 25 05:12:49 ip-10-0-10-252.ec2.internal systemd[1]: Started deis-registry.
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal sh[17637]: Traceback (most recent call last):
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal sh[17637]: File "/app/bin/create_bucket", line 23, in <module>
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal sh[17637]: if name not in (bucket.name for bucket in conn.get_all_buckets()):
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal sh[17637]: File "/usr/lib/python2.7/site-packages/boto/s3/connection.py", line 436, in get_all_buckets
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal sh[17637]: response = self.make_request('GET', headers=headers)
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal sh[17637]: File "/usr/lib/python2.7/site-packages/boto/s3/connection.py", line 664, in make_request
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal sh[17637]: retry_handler=retry_handler
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal sh[17637]: File "/usr/lib/python2.7/site-packages/boto/connection.py", line 1068, in make_request
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal sh[17637]: retry_handler=retry_handler)
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal sh[17637]: File "/usr/lib/python2.7/site-packages/boto/connection.py", line 943, in _mexe
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal sh[17637]: response = connection.getresponse()
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal sh[17637]: File "/usr/lib/python2.7/httplib.py", line 1073, in getresponse
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal sh[17637]: response.begin()
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal sh[17637]: File "/usr/lib/python2.7/httplib.py", line 415, in begin
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal sh[17637]: version, status, reason = self._read_status()
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal sh[17637]: File "/usr/lib/python2.7/httplib.py", line 371, in _read_status
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal sh[17637]: line = self.fp.readline(_MAXLINE + 1)
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal sh[17637]: File "/usr/lib/python2.7/socket.py", line 476, in readline
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal sh[17637]: data = self._sock.recv(self._rbufsize)
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal sh[17637]: socket.timeout: timed out
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal systemd[1]: deis-registry@1.service: Main process exited, code=exited, status=1/FAILURE
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal docker[22783]: Error response from daemon: no such id: deis-registry
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal docker[22783]: Error: failed to stop containers: [deis-registry]
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal systemd[1]: deis-registry@1.service: Unit entered failed state.
Nov 25 05:21:55 ip-10-0-10-252.ec2.internal systemd[1]: deis-registry@1.service: Failed with result 'exit-code'.
Nov 25 05:22:00 ip-10-0-10-252.ec2.internal systemd[1]: deis-registry@1.service: Service hold-off time over, scheduling restart.
Nov 25 05:22:00 ip-10-0-10-252.ec2.internal systemd[1]: Starting deis-registry...
Nov 25 05:22:00 ip-10-0-10-252.ec2.internal etcdctl[22865]: Error:  105: Key already exists (/deis/cache) [18274121]
Nov 25 05:22:00 ip-10-0-10-252.ec2.internal systemd[1]: Started deis-registry.

在查看构建器时,它似乎也可以工作,因为它说它已部署:

Nov 25 05:39:27 ip-10-0-10-252.ec2.internal sh[3142]: Waiting for git-receive to run.
Nov 25 05:39:27 ip-10-0-10-252.ec2.internal sh[3142]: Waiting for deploy.
Nov 25 05:40:17 ip-10-0-10-252.ec2.internal sh[3142]: [info] Deploy complete.

(注意:时间戳在上面的例子中是不同的,因为我稍后在不同的推送尝试中添加了这个)

最后,当我运行 deisctl list 时,所有内容都显示为活动并正在运行,因此看起来没有任何问题。

似乎很多网上的人都遇到了这个问题,但我还没有看到任何可以解决这个问题的明确回应。

我尝试重新启动注册表以及销毁整个应用程序并重新启动它。

如果它在上下文方面有帮助,那么当我注意到我的 /var/lib/docker 的使用率为 99% 时,这个问题就开始发生了——我按照 Deis 文档的指示清理了图像,所以我现在的使用率为 60%;但是,我仍然遇到完全相同的问题。

谢谢!

4

0 回答 0