AWS Elastic Beanstalk won't deploy my Rails app even once

佐手、 提交于 2020-07-09 05:26:23

问题


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:

[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"}

The serial "23" seems pretty parsable to me. Please help!


回答1:


What causes this

This can occur if you try to terminate or rebuild your Elastic Beanstalk environment and the operation fails to delete your AWSEBSecurityGroup.

How to fix it

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:

  1. Open the AWS CloudFormation console.
  2. From the Stack Name column, choose the stack that failed to delete. > Note: The Status column of your stack shows DELETE_FAILED.
  3. From the Actions menu, choose Delete Stack.
  4. In the Delete Stack pop-up window, choose AWSEBSecurityGroup, and then choose Yes, Delete.
  5. Terminate or rebuild the Elastic Beanstalk environment.

The linked docs have other steps if you prefer the CLI or have a more complex setup.

Then what?

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.

Once it's done, if you SSH in and run…

cat /opt/elasticbeanstalk/deployment/app_version_manifest.json

…you'll notice that Serial is now correctly represented as a JSON number.



来源:https://stackoverflow.com/questions/62184145/aws-elastic-beanstalk-wont-deploy-my-rails-app-even-once

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!