简体   繁体   English

AWS Elasticbeanstalk 部署 flask 应用程序中的错误

[英]Error in AWS Elasticbeanstalk deployment flask app

I am deploying a Flask app using EB CLI having requirements.txt file.我正在使用具有 requirements.txt 文件的 EB CLI 部署 Flask 应用程序。

eb init
eb open flask-env

Application is properly uploaded on the server, but it's health status says Severe.应用程序已正确上传到服务器上,但它的健康状态显示为严重。
I am getting the following errors.我收到以下错误。

  • In the dashboard在仪表板中
Command failed on all instances.
ELB health is failing or not available for all instances

Application deployment failed at 2020-07-01T03:49:21Z with exit status 1 and error: Engine execution has encountered an error.
Instance ELB health state has been "OutOfService" for 14 minutes: Instance has failed at least the UnhealthyThreshold number of health checks consecutively.

  • In the logs在日志中
[ERROR] Creating a Pipfile for this project…
Requirements file provided! Importing into Pipfile…
'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

[ERROR] An error occurred during execution of command [app-deploy] - [InstallDependency]. Stop running the command. Error: fail to install dependencies with requirements.txt file with error Command /bin/sh -c python3 -m pipenv install -r requirements.txt --skip-lock failed with error exit status 1. Stderr:Creating a Pipfile for this project…
Requirements file provided! Importing into Pipfile…
'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

I also deployed multiple applications but they are also giving the same error我还部署了多个应用程序,但它们也给出了相同的错误

Delete your requirement.txt file and regenerate but this time save your requirement.txt file as a UTF-8 file.删除您的 requirements.txt 文件并重新生成,但这次将您的 requirements.txt 文件保存为 UTF-8 文件。

Here are some helpful links:以下是一些有用的链接:

requirement.txt file format 要求.txt 文件格式

Deploy flask application to elastic beanstalk 将 flask 应用程序部署到弹性 beanstalk

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM