【问题标题】:Elastic Beanstalk /ondeck not updating /current and still showing 404?Elastic Beanstalk /ondeck 没有更新 /current 并且仍然显示 404?
【发布时间】:2014-05-12 20:12:13
【问题描述】:

我目前有一个带有 Ruby 2.1.1 的 Rails 4.0.3 存储库。我正在尝试在我的 EB 环境中部署它。一切似乎都运行良好,运行时没有抛出错误:

eb start
git aws.push

但是,如果我通过 SSH 连接到我的服务器,我发现我的 /var/app/ondeck 没有更新到我的 git 存储库,即使我运行了 git aws.push --environment myenv

当我 aws.push 时,我在仪表板上看到了当前的 git 修订哈希,但是 repo 代码永远不会到达服务器...

另一个问题是我的 /var/app/current 仍然是空的。有什么想法吗?

运行git aws.push 后,唯一记录的内容是:

2014-04-02 05:45:02,567 [INFO] (5874 MainThread) [clearStaleLogPublishingRecords.py-38] [root clearStaleLogPublishingRecords main] Clearing stale log publish records publish log task with batch id ef7dd76a-ba29-11e3-bf20-12313913dae2
2014-04-02 05:45:02,568 [INFO] (5874 MainThread) [clearStaleLogPublishingRecords.py-48] [root clearStaleLogPublishingRecords main] Successfully cleared stale log publishing records
2014-04-02 05:50:01,874 [INFO] (5887 MainThread) [publishLogs.py-61] [root publishLogs main] Starting publish log task with batch id a1e453b6-ba2a-11e3-86ba-12313913dae2
2014-04-02 05:50:01,991 [INFO] (5887 MainThread) [publishLogs.py-86] [root publishLogs main] Log publication is disabled

运行eb update 后,没有任何内容被写入日志。

这些也有助于描述问题:

https://forums.aws.amazon.com/thread.jspa?messageID=336101 https://forums.aws.amazon.com/thread.jspa?messageID=357003

但是,我有最新的命令行 eb,并尝试从 git repo 中分离 HEAD,然后检查 master 并再次推送,仍然没有运气:(

还尝试从控制面板“上传和部署”一个 zip 版本,但没有任何更新。

2014-04-02 08:12:22,185 [ERROR] (1895 MainThread) [directoryHooksExecutor.py-34] [root directoryHooksExecutor error] Script failed with returncode 1
2014-04-02 08:12:22,246 [INFO] (1872 MainThread) [command.py-130] [root command execute] Command returned: (code: 1, stdout: Error occurred during build: Command hooks failed
, stderr: None)
2014-04-02 08:12:22,248 [DEBUG] (1872 MainThread) [commandWrapper.py-60] [root commandWrapper main] Command result: {'status': 'FAILURE', 'results': [{'status': 'FAILURE', 'config_sets': ['Infra-EmbeddedPreBuild', 'Hook-PreAppDeploy', 'Infra-EmbeddedPostBuild'], 'returncode': 1, 'events': [], 'msg': 'Error occurred during build: Command hooks failed\n'}], 'api_version': '1.0'}

【问题讨论】:

  • 值得检查 /var/log/eb-tools.log(或通过快照日志)寻找线索。
  • 感谢@Shadwell,我运行了这些命令,这就是我得到的...更新了我的问题。

标签: ruby-on-rails amazon-ec2 amazon-cloudfront


【解决方案1】:

我切换到在俄勒冈数据中心 (west-2) 上运行 Rails 4.0.3 的 Ruby 2.0,它似乎运行良好。我确实认为这与钩子失败有关。例如,如果你有额外的钩子或命令需要 GIT,而 git 没有安装在服务器上,它会默默地失败或尖叫......这似乎就是这里发生的事情。

【讨论】:

    猜你喜欢
    • 2014-01-21
    • 2017-08-16
    • 1970-01-01
    • 1970-01-01
    • 2022-11-29
    • 2019-02-28
    • 1970-01-01
    • 2013-12-18
    • 2017-11-24
    相关资源
    最近更新 更多