Elastic Beanstalk上的RoR Gemfile问题

时间:2016-08-28 09:34:12

标签: amazon-web-services rubygems elastic-beanstalk

我一直在努力解决AWS-Elastic Beanstalk问题。 前几天,我将一些宝石添加到Gemfile中,然后使用eb deploy。 (也许宝石是什么时候?或者是bcrypt?抱歉不确定)

它在我的部署中无法正常运行。结果如下。

ERROR: [Instance: i-452520da] Command failed on instance. Return code: 10 Output: /opt/elasticbeanstalk/hooks/appdeploy/post/10_reload_cron.sh: line 3: cd: HOME not set
Could not locate Gemfile or .bundle/ directory. 
Hook /opt/elasticbeanstalk/hooks/appdeploy/post/10_reload_cron.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
ERROR: Unsuccessful command execution on instance id(s) 'i-452520da'. Aborting the operation.
ERROR: Failed to deploy application. 

这是eb-activity.log。

[2016-08-28T01:51:16.844Z] INFO  [20749] - [Application update app-ed0b6-160828_104745@147/AppDeployStage1/AppDeployEnactHook] : Completed activity. Result:
  Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/enact.
[2016-08-28T01:51:16.844Z] INFO  [20749] - [Application update app-ed0b6-160828_104745@147/AppDeployStage1/AppDeployPostHook] : Starting activity...
[2016-08-28T01:51:16.844Z] INFO  [20749] - [Application update app-ed0b6-160828_104745@147/AppDeployStage1/AppDeployPostHook/01_create_pids.sh] : Starting activity...
[2016-08-28T01:51:17.044Z] INFO  [20749] - [Application update app-ed0b6-160828_104745@147/AppDeployStage1/AppDeployPostHook/01_create_pids.sh] : Completed activity.
[2016-08-28T01:51:17.044Z] INFO  [20749] - [Application update app-ed0b6-160828_104745@147/AppDeployStage1/AppDeployPostHook/10_reload_cron.sh] : Starting activity...
[2016-08-28T01:51:17.242Z] INFO  [20749] - [Application update app-ed0b6-160828_104745@147/AppDeployStage1/AppDeployPostHook/10_reload_cron.sh] : Activity execution failed, because: /opt/elasticbeanstalk/hooks/appdeploy/post/10_reload_cron.sh: line 3: cd: HOME not set
  Could not locate Gemfile or .bundle/ directory (ElasticBeanstalk::ExternalInvocationError)
caused by: /opt/elasticbeanstalk/hooks/appdeploy/post/10_reload_cron.sh: line 3: cd: HOME not set
  Could not locate Gemfile or .bundle/ directory (Executor::NonZeroExitStatus)


[2016-08-28T01:51:17.242Z] INFO  [20749] - [Application update app-ed0b6-160828_104745@147/AppDeployStage1/AppDeployPostHook/10_reload_cron.sh] : Activity failed.
[2016-08-28T01:51:17.243Z] INFO  [20749] - [Application update app-ed0b6-160828_104745@147/AppDeployStage1/AppDeployPostHook] : Activity failed.
[2016-08-28T01:51:17.243Z] INFO  [20749] - [Application update app-ed0b6-160828_104745@147/AppDeployStage1] : Activity failed.
[2016-08-28T01:51:17.243Z] INFO  [20749] - [Application update app-ed0b6-160828_104745@147] : Completed activity. Result:
  Application update - Command CMD-AppDeploy failed
[2016-08-28T01:52:38.630Z] INFO  [2486]  - [CMD-TailLogs] : Starting activity...
[2016-08-28T01:52:38.630Z] INFO  [2486]  - [CMD-TailLogs/AddonsBefore] : Starting activity...

我怎样才能消除这个问题?提前谢谢。

1 个答案:

答案 0 :(得分:0)

我可以解决这个问题。 问题是“/opt/elasticbeanstalk/hooks/appdeploy/post/10_reload_cron.sh”。 所以我使用.ebextensions / some.sh

删除了这个文件