AWS Elastic Beanstalk部署Docker容器健康转严重及ELB异常求助
AWS Elastic Beanstalk Docker环境健康状态转为严重,ELB健康检查失败
问题概述
将Docker容器部署至AWS Elastic Beanstalk后,环境初始化完成后健康状态从正常转为严重,所有实例的ELB健康检查失败或不可用。本地Docker镜像运行正常,仅在AWS环境中出现问题。已删除本地所有镜像和容器并重新创建环境,问题仍未解决。
.elasticbeanstalk配置
branch-defaults: default: environment: Sentiment-App-env group_suffix: null global: application_name: Sentiment-App branch: null default_ec2_keyname: null default_platform: Docker default_region: eu-west-3 include_git_submodules: true instance_profile: null platform_name: null platform_version: null profile: eb-cli repository: null sc: null workspace_type: Application
访问测试结果
通过环境访问链接调用接口时,执行以下代码出现异常:
text = {"text" : "Hello how are you"} response = requests.post(url, json=text) response.json
移除.json后得到输出:
<Response [503]>
使用的Elastic Beanstalk CLI命令
eb init -p docker Sentiment-Appeb local run --port 5000eb create Sentiment-App-env
相关日志片段
曾怀疑本地Docker镜像导致问题,清理镜像时日志显示:
2022/11/17 09:07:00.176214 [INFO] Running command /bin/sh -c docker rmi `docker images -aq` 2022/11/17 09:07:00.309532 [INFO] Error response from daemon: conflict: unable to delete f0cfeb300221 (cannot be forced) - image is being used by running container 592def234eec Error response from daemon: conflict: unable to delete e86cc458ba3e (cannot be forced) - image has dependent child images Error response from daemon: conflict: unable to delete c84b9f0e15ae (cannot be forced) - image has dependent child images Error response from daemon: conflict: unable to delete 14d1c8d785fb (cannot be forced) - image has dependent child images Error response from daemon: conflict: unable to delete 85ddbde6e40b (cannot be forced) - image has dependent child images Error response from daemon: conflict: unable to delete a47d88688a61 (cannot be forced) - image has dependent child images Error response from daemon: conflict: unable to delete 465483cdaa4e (cannot be forced) - image has dependent child images
内容的提问来源于stack exchange,提问作者M Bilal Ayaz
相关产品推荐
相关产品推荐

