安装/配置whatever-elasticbeanstalk gem后,我在我的EC2实例上的/var/log/cfn-init.log中看到以下错误,从我的本地仓库运行git aws.push后。 我使用aws弹性benastalk与rails 4。
2014-10-21 08:08:37,602 [DEBUG] Running test for command cron_01_set_leader
2014-10-21 08:08:37,744 [DEBUG] Test command output:
2014-10-21 08:08:37,745 [DEBUG] Test for command cron_01_set_leader passed
2014-10-21 08:08:38,085 [ERROR] Command cron_01_set_leader (su -c "/usr/local/bin/bundle exec create_cron_leader --no-update" $EB_CONFIG_APP_USER) failed
2014-10-21 08:08:38,086 [DEBUG] Command cron_01_set_leader output: bash: /usr/local/bin/bundle: No such file or directory
追踪(最近一次呼叫最后一次):
我添加了when-elasticbeanstalk 下面是我的cron.config文件内容.. 任何想法......我做错了什么?
files:
# Reload the on deployment
/opt/elasticbeanstalk/hooks/appdeploy/post/10_reload_cron.sh:
mode: "00700"
owner: root
group: root
content: |
#!/usr/bin/env bash
. /opt/elasticbeanstalk/containerfiles/envvars
cd $EB_CONFIG_APP_CURRENT
su -c "/usr/local/bin/bundle exec setup_cron" $EB_CONFIG_APP_USER
# Add Bundle to the PATH
"/etc/profile.d/bundle.sh":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
export PATH=$PATH:/usr/local/bin
encoding: plain
container_commands:
cron_01_set_leader:
test: test ! -f /opt/elasticbeanstalk/containerfiles/.cron-setup-complete
leader_only: true
cwd: /var/app/ondeck
command: su -c "/usr/local/bin/bundle exec create_cron_leader --no-update" $EB_CONFIG_APP_USER
cron_02_write_cron_setup_complete_file:
cwd: /opt/elasticbeanstalk/containerfiles
command: touch .cron-setup-complete
答案 0 :(得分:1)
您使用的是哪个解决方案堆栈?你能给出确切的名字吗,比如“运行Ruby 2.1(Puma)的64bit Amazon Linux 2014.03 v1.0.9”。
我认为你需要将“/ usr / local / bin / bundle”替换为用于解决方案堆栈的实际bundle版本。
你能尝试使用“/ usr / local / bin / bundle”的“bundle”instaed吗?