更新:原来是磁盘空间不足
我的ECS容器在发布后大约1小时内一直被杀死。它发生在55到65分钟左右。然后创建一个新的容器,然后在大约一个小时后被杀死。我查看了ec2主机的日志以及容器内的日志,没有显示正在发生的事情。
知道我能做什么吗?
# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
90d9xyze57fb xyz123.dkr.ecr.us-east-2.amazonaws.com/geth:latest "/usr/bin/rungeth" 21 minutes ago Up 21 minutes 0.0.0.0:8545->8545/tcp, 0.0.0.0:30303->30303/tcp, 0.0.0.0:30303->30303/udp ecs-geth-task-1-geth-container-f29d85fxyze7c9a5d201
4603xyz723d3 xyz123.dkr.ecr.us-east-2.amazonaws.com/geth:latest "/usr/bin/rungeth" About an hour ago Exited (1) 22 minutes ago ecs-geth-task-1-geth-container-cec7cd8xyze3f88fe901
9f38xyzc032a xyz123.dkr.ecr.us-east-2.amazonaws.com/geth:latest "/usr/bin/rungeth" 2 hours ago Exited (1) About an hour ago ecs-geth-task-1-geth-container-eecfe8cxyz88f8b0ff01
3c33xyza6054 xyz123.dkr.ecr.us-east-2.amazonaws.com/geth:latest "/usr/bin/rungeth" 2 hours ago Exited (1) 2 hours ago ecs-geth-task-1-geth-container-ccc08ddxyzb495d9e001
7a20xyzff29e xyz123.dkr.ecr.us-east-2.amazonaws.com/geth:latest "/usr/bin/rungeth" 3 hours ago Exited (1) 2 hours ago ecs-geth-task-1-geth-container-8c96e1exyz8aff821d00
75bdxyzc00e7 xyz123.dkr.ecr.us-east-2.amazonaws.com/geth:latest "/usr/bin/rungeth" 4 hours ago Exited (1) 3 hours ago ecs-geth-task-1-geth-container-e0aec48xyzf58bfcf101
1b3bxyz1961f amazon/amazon-ecs-agent:latest "/agent" 4 hours ago Up 4 hours ecs-agent
# docker logs 4603xyz723d3
#
答案 0 :(得分:1)
原来它耗尽了磁盘空间。
附加更大的音量&将启动配置的用户数据设置为:
#cloud-boothook
cloud-init-per once ecs_config echo 'ECS_CLUSTER=my-cluster' >> /etc/ecs/ecs.config
cloud-init-per once docker_options echo 'OPTIONS="${OPTIONS} --storage-opt dm.basesize=200G"' >> /etc/sysconfig/docker
修正了问题。