问题描述
我部署到beantalk实例上的docker容器似乎无法成功启动。没有太多信息显示为什么失败...
这是我的Dockerrun.aws.json:
{
"AWSEBDockerrunVersion": 2,"containerDeFinitions": [
{
"essential": true,"name": "api","image": "<user>/<repo>:latest","memory": 256,"portMappings": [
{
"containerPort": 8000,"hostPort": 8000
}
]
},{
"essential": true,"image": "postgres:latest","mountPoints": [
{
"containerPath": "/var/lib/postgresql/data/","sourceVolume": "Postgres_Data"
}
],"name": "db"
},"image": "Nginx:latest","mountPoints": [
{
"containerPath": "/etc/Nginx/conf.d","sourceVolume": "_Nginx"
}
],"name": "Nginx","portMappings": [
{
"containerPort": 443,"hostPort": 443
},{
"containerPort": 80,"hostPort": 80
}
]
}
],"family": "","volumes": [
{
"host": {
"sourcePath": "postgres_data"
},"name": "Postgres_Data"
},{
"host": {
"sourcePath": "Nginx"
},"name": "_Nginx"
}
]
}
部分错误日志(eb logs
)。日志中甚至都没有任何level = warn或level = error部分,这会使情况更加混乱。
[2020-08-16T08:51:08.224Z] INFO [4078] - [Application deployment app-200816_014520@1/StartupStage1/AppDeployEnactHook/02update-credentials.sh] : Starting activity...
[2020-08-16T08:51:08.426Z] INFO [4078] - [Application deployment app-200816_014520@1/StartupStage1/AppDeployEnactHook/02update-credentials.sh] : Completed activity.
[2020-08-16T08:51:08.426Z] INFO [4078] - [Application deployment app-200816_014520@1/StartupStage1/AppDeployEnactHook/03start-task.sh] : Starting activity...
[2020-08-16T08:52:11.081Z] INFO [4078] - [Application deployment app-200816_014520@1/StartupStage1/AppDeployEnactHook/03start-task.sh] : Activity execution Failed,because: + . /opt/elasticbeanstalk/hooks/common.sh
+ RETRY=0
+ initctl start eb-ecs EB_EVENT_FILE=/tmp/eventsfile20200816-4078-1yuoqug
initctl: Job Failed to start
+ '[' -f /etc/elasticbeanstalk/.eb-ecs-start-no-retry ']'
+ warn 'Failed to start ECS task,retrying...'
+ echo 'Failed to start ECS task,retrying...'
Failed to start ECS task,retrying...
+ eventHelper.py --msg 'Failed to start ECS task,retrying...' --severity WARN
+ RETRY=1
+ sleep 3
+ '[' 1 -gt 1 ']'
+ initctl start eb-ecs EB_EVENT_FILE=/tmp/eventsfile20200816-4078-1yuoqug
initctl: Job Failed to start
+ '[' -f /etc/elasticbeanstalk/.eb-ecs-start-no-retry ']'
+ warn 'Failed to start ECS task,retrying...' --severity WARN
+ RETRY=2
+ sleep 3
+ '[' 2 -gt 1 ']'
+ error_exit 'Failed to start ECS task after retrying 2 times.' 1
+ error 'Failed to start ECS task after retrying 2 times.'
+ echo 'Failed to start ECS task after retrying 2 times.'
Failed to start ECS task after retrying 2 times.
+ eventHelper.py --msg 'Failed to start ECS task after retrying 2 times.' --severity ERROR
+ exit 1 (ElasticBeanstalk::ExternalInvocationError)
caused by: + . /opt/elasticbeanstalk/hooks/common.sh
+ RETRY=0
+ initctl start eb-ecs EB_EVENT_FILE=/tmp/eventsfile20200816-4078-1yuoqug
initctl: Job Failed to start
+ '[' -f /etc/elasticbeanstalk/.eb-ecs-start-no-retry ']'
+ warn 'Failed to start ECS task,retrying...' --severity WARN
+ RETRY=2
+ sleep 3
+ '[' 2 -gt 1 ']'
+ error_exit 'Failed to start ECS task after retrying 2 times.' 1
+ error 'Failed to start ECS task after retrying 2 times.'
+ echo 'Failed to start ECS task after retrying 2 times.'
Failed to start ECS task after retrying 2 times.
+ eventHelper.py --msg 'Failed to start ECS task after retrying 2 times.' --severity ERROR
+ exit 1 (Executor::NonZeroExitStatus)
如何解决此问题?谢谢!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)