簡體   English   中英

AWS Elasticbeanstalk 部署 flask 應用程序中的錯誤

[英]Error in AWS Elasticbeanstalk deployment flask app

我正在使用具有 requirements.txt 文件的 EB CLI 部署 Flask 應用程序。

eb init
eb open flask-env

應用程序已正確上傳到服務器上,但它的健康狀態顯示為嚴重。
我收到以下錯誤。

  • 在儀表板中
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.

  • 在日志中
[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

我還部署了多個應用程序,但它們也給出了相同的錯誤

刪除您的 requirements.txt 文件並重新生成,但這次將您的 requirements.txt 文件保存為 UTF-8 文件。

以下是一些有用的鏈接:

要求.txt 文件格式

將 flask 應用程序部署到彈性 beanstalk

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM