Cloud Foundry Playframework:错误310:登台失败: [英] Cloud Foundry Playframework : Error 310: Staging failed:

查看:152
本文介绍了Cloud Foundry Playframework:错误310:登台失败:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Cloud Foundry中托管一个示例(HelloWorld)Play应用,但是在Staging上总是会出现此错误,

I am trying to host a sample (HelloWorld) Play app in Cloud Foundry but am always getting this error at Staging,

Error 310: Staging failed: 'Staging task failed:
 Staging plugin failed: cp: cannot stat `/var/vcap/data/stager/tmp/d20120828-24156-128z05h/unstaged/logs/*': No such file or directory
/var/vcap/data/packages/ruby/6.1/lib/ruby/1.9.1/fileutils.rb:1231:in `chmod': No such file or directory - /var/vcap/data/stager/tmp/d20120828-24156-128z05h/staged/app/start (Errno::ENOENT)
    from /var/vcap/data/packages/ruby/6.1/lib/ruby/1.9.1/fileutils.rb:1231:in `chmod'
    from /var/vcap/data/packages/ruby/6.1/lib/ruby/1.9.1/fileutils.rb:879:in `block in chmod'
    from /var/vcap/data/packages/ruby/6.1/lib/ruby/1.9.1/fileutils.rb:878:in `each'
    from /var/vcap/data/packages/ruby/6.1/lib/ruby/1.9.1/fileutils.rb:878:in `chmod'
    from /var/vcap/packages/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.62/lib/vcap/staging/plugin/play/plugin.rb:14:in `block in stage_application'
    from /var/vcap/packages/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.62/lib/vcap/staging/plugin/play/plugin.rb:11:in `chdir'
    from /var/vcap/packages/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.62/lib/vcap/staging/plugin/play/plugin.rb:11:in `stage_application'
    from /var/vcap/packages/stager/bin/run_plugin:19:in `<main>' 

我对此很陌生,所以对它的含义一无所知.我还尝试了谷歌搜索,但无济于事.

I am quite new to this so have no idea on what it means. I also tried googling but to no avail.

我也尝试过此操作,但没有成功 SO问题与此类似

I tried this one too but it didn't work SO Question similar to this one


以上指向的链接有效,只需确保在vmc push命令中提供了应用名称 如答案所示.


The above link pointed works, just make sure you provide the app name in vmc push command as denoted by answer.

非常感谢任何帮助.

谢谢.

开发环境:

Dev Environment:

  • Play 2.0-基于Scala

  • Play 2.0 - Scala based

Ubuntu 12.04

Ubuntu 12.04

vmc来部署应用程序.

vmc to deploy the app.

其他信息:

我遵循了本教程播放scala Cloud Foundry

Would you like to deploy from the current directory? [Yn]: 
Application Name: HelloSample
Detected a Standalone Application, is this correct? [Yn]: n
1: Play
2: Lift
3: JavaWeb
4: Node
5: Standalone
6: Rails
7: Spring
8: Rack
9: Grails
10: Sinatra
Select Application Type: 1
Selected Play Framework Application
Application Deployed URL [HelloSample.cloudfoundry.com]: hellosample.cloudfoundry.com
Memory reservation (128M, 256M, 512M, 1G, 2G) [256M]: 
How many instances? [1]: 
1
Create services to bind to 'HelloSample'? [yN]: 1
Would you like to save this configuration? [yN]: y
Manifest written to manifest.yml.
Creating Application: OK
Uploading Application:
  Checking for available resources: OK
  Processing resources: OK
  Packing application: OK
  Uploading (106K): OK   
Push Status: OK
Staging Application 'HelloSample': ..Error 310: Staging failed: 'Staging task failed:
 Staging plugin failed: cp: cannot stat `/var/vcap/data/stager/tmp/d20120828-24156-128z05h/unstaged/logs/*': No such file or directory
/var/vcap/data/packages/ruby/6.1/lib/ruby/1.9.1/fileutils.rb:1231:in `chmod': No such file or directory - /var/vcap/data/stager/tmp/d20120828-24156-128z05h/staged/app/start (Errno::ENOENT)
    from /var/vcap/data/packages/ruby/6.1/lib/ruby/1.9.1/fileutils.rb:1231:in `chmod'
    from /var/vcap/data/packages/ruby/6.1/lib/ruby/1.9.1/fileutils.rb:879:in `block in chmod'
    from /var/vcap/data/packages/ruby/6.1/lib/ruby/1.9.1/fileutils.rb:878:in `each'
    from /var/vcap/data/packages/ruby/6.1/lib/ruby/1.9.1/fileutils.rb:878:in `chmod'
    from /var/vcap/packages/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.62/lib/vcap/staging/plugin/play/plugin.rb:14:in `block in stage_application'
    from /var/vcap/packages/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.62/lib/vcap/staging/plugin/play/plugin.rb:11:in `chdir'
    from /var/vcap/packages/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.62/lib/vcap/staging/plugin/play/plugin.rb:11:in `stage_application'
    from /var/vcap/packages/stager/bin/run_plugin:19:in `<main>'
'

推荐答案

您需要在Play中运行"dist"命令.这样会在./dist文件夹中生成一个zip文件,您可以像这样通过路径"开关推送应用程序;

you need to run the "dist" command in Play. This produces a zip file in the ./dist folder, you can the push the app with the 'path' switch like so;

vmc push <app-name-goes-here> --path=dist/<generated-zip-file>.zip

VMC应该将其识别为Play应用程序并正确部署.

VMC should recognise this as a Play application and deploy it correctly.

这篇关于Cloud Foundry Playframework:错误310:登台失败:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆