AWS Elastic Beanstalk甚至不会部署我的Rails应用程序 [英] AWS Elastic Beanstalk won't deploy my Rails app even once
问题描述
我当前正在使用在64位Amazon Linux 2/3.0.2上运行的Ruby 2.6"镜像,并通过在EC2实例内部/var/logs/eb-engine.log(eb日志"命令不会向我显示此信息),则经常发生错误:
I'm currently using the "Ruby 2.6 running on 64bit Amazon Linux 2/3.0.2" image, and by looking, inside the EC2 instance at the /var/logs/eb-engine.log ("eb logs" command won't show me this), there is a recurring error:
[错误]无法解析JSON文件 /opt/elasticbeanstalk/deployment/app_version_manifest.json,错误: json:无法将字符串解组到Go struct字段中 uint64类型的AppVersionManifest.Serial
[ERROR] failed to parse JSON file /opt/elasticbeanstalk/deployment/app_version_manifest.json with error: json: cannot unmarshal string into Go struct field AppVersionManifest.Serial of type uint64
当我检查该文件时,我不知道它是什么问题,或者是什么阻止了该文件的解析,如果这确实是问题所在:
When I check that file, I do not know what is wrong with it, or what is preventing that file from being parsed, if that is actually the problem:
{ "RuntimeSources":{"my_api":{"my_api-source_alfa0.2":"s3url":""}}},"DeploymentId":9,"Serial":"23","VersionLabel":"my_api-source_alfa0.2"}
对我来说,序列号"23"似乎很可解析.请帮忙!
The serial "23" seems pretty parsable to me. Please help!
推荐答案
是什么原因造成的
我相信这是一个错误.
What causes this
I believe this is a bug.
在某些情况下,如果您尝试重建您的Elastic Beanstalk环境,并且该操作无法删除您的AWSEBSecurityGroup
.
In some cases, this can occur if you try to terminate or rebuild your Elastic Beanstalk environment and the operation fails to delete your AWSEBSecurityGroup
.
除此之外,还有其他原因的报告(请参阅评论).
There are reports (see comments) of other causes besides this.
AWS文档 如何终止还是在AWSEBSecurityGroup
无法删除时重建我的AWS Elastic Beanstalk环境? 描述了如何解决此问题,但是如果链接断开,我摘录了以下主要步骤:
The AWS document How do I terminate or rebuild my AWS Elastic Beanstalk environment when the AWSEBSecurityGroup
fails to delete? describes how to resolve this, but I excerpted the main steps below, in case that link ever breaks:
- 打开 AWS CloudFormation控制台.
- 从堆栈名称列中,选择未能删除的堆栈.
- Open the AWS CloudFormation console.
- From the Stack Name column, choose the stack that failed to delete.
注意:堆栈的状态列显示 DELETE_FAILED .
如果您更喜欢CLI或进行更复杂的设置,则链接的文档还有其他步骤.
The linked docs have other steps if you prefer the CLI or have a more complex setup.
删除组并重建环境后,将不会再出现app_version_manifest.json
错误.部署您的应用.
After you've deleted the group and rebuilt your environment, you won't get the app_version_manifest.json
error any more. Deploy your app.
完成后,如果您使用SSH并运行…
Once it's done, if you SSH in and run…
cat /opt/elasticbeanstalk/deployment/app_version_manifest.json
...您会注意到,Serial
现在已正确表示为JSON数字.
…you'll notice that Serial
is now correctly represented as a JSON number.
这篇关于AWS Elastic Beanstalk甚至不会部署我的Rails应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!