新手问题 OpenShift Rails App Error

bruceyue · 2013年11月10日 · 最后由 bruceyue 回复于 2013年11月12日 · 3279 次阅读

remote: Precompiling with 'bundle exec rake assets:precompile'
remote: /opt/rh/ruby193/root/usr/bin/ruby /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
remote: rake aborted!
remote: Disk quota exceeded - /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/tmp/cache/assets/E55/E40
remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/cache/file_store.rb:161:in ensure_cache_path remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/cache/file_store.rb:90:inwrite_entry'
remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/cache/strategy/local_cache.rb:140:in write_entry' remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/cache.rb:364:inblock in write'
remote: /var/lib/openshift/527f89d64382ec06c e000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/cache.rb:520:in instrument' remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/cache.rb:362:inwrite'
remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/caching.rb:90:in cache_set' remote: /var/lib/openshift/527f89d64382ec06ce000287/app- root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/caching.rb:53:incache_set_hash' remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/caching.rb:29:in cache_asset' remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:inbuild_asset' remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:in find_asset' remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:60:infind_asset' remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/static_compiler.rb:19:in block in compile' remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:219:inblock in each_logical_path' remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:206:in block (2 levels) in each_file' remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:ineach' remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in each_entry' remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:204:inblock in each_file' remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in each' remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:ineach_file' remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:217:in each_logical_path' remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/static_compiler.rb:18:incompile' remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:56:in internal_precompile' remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:70:inblock (3 levels) in ' remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:60:in block (3 levels) in <top (required)>' remote: Tasks: TOP => assets:precompile:primary remote: (See full trace by running task with --trace) remote: rake aborted! remote: Command failed with status (1): [/opt/rh/ruby193/root/usr/bin/ruby /var/lib...] remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:12:inruby_rake_task' remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:21:in invoke_or_reboot_rake_task' remote: /var/lib/openshift/527f89d64382ec06ce000287/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:29:inblock (2 levels) in ' remote: Tasks: TOP => assets:precompile remote: (See full trace by running task with --trace) remote: Result: failure remote: Activation status: failure remote: Activation failed for the following gears: remote: 527f89d64382ec06ce000287 (Error activating gear: Failed to execute: 'control deploy' for /var/lib/openshift/527f89d64382ec06ce000287/ruby) remote: Deployment completed with status: failure remote: postreceive failed

Disk quota exceeded,磁盘空间满了。

建议下回贴代码之前,请敲点中文说一下你遇到这个之后你是如何思考解决这个问题的。

Sorry,磁盘空间一个 G,代码只有 8M, 不会满的,我觉得还是 assets:precompile 时候设置的问题。我部署过很多平台,都是到了 assets:precompile 时出错,但是 openshift 刚接触,不知到如何解决。

第一眼还以为有老外朋友在这发帖呢。。。

我在 Google 找了,但是没有找到解决的办法。

@bruceyue 还有一招,报错信息说你的磁盘满了,你提示说你的项目只有 8M。所以提交一个 issue 到 openshift,客服一查就知道原因了。在这里提交:https://www.openshift.com/forums/openshift

谢谢,我刚提交了,等待回复

#7 楼 @bruceyue ssh 上去执行 quota 看看,OpenShift 有文件数量的限制

Disk quotas for user 527f89d64382ec06ce000287 (uid 2057):
Filesystem blocks quota limit grace files quota limit grace
/dev/mapper/EBSStore01-user_home01
500M 0 1024M 39999 0 40000

blocks-> 500M, quota->0, limit->1024M files->39999, quoto->0, limit->40000.

这说明什么呢?

有没有哪位大神知道怎么解决啊?

需要 登录 后方可回复, 如果你还没有账号请 注册新账号