dgrandes
dgrandes

Reputation: 1207

Unable to update Play! Scala app to CloudFoundry

Im having the same problem as this user: Cloud Foundry Playframework : Error 310: Staging failed:

I added a mysql service to my app. I updated the app with the command:

vmc update app-name --path=dist/my-dist.zip

It responds saying the update is ok. When I go to my apps view, it says the app is stopped. When i try executing

vmc start app-name

it crashes with the same error:

vmc start app-name
Staging Application 'app-name': ...Error 310: Staging failed: 'Staging task failed:
Staging plugin failed: /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/d20120924-9953-1jfgi5c/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.63/lib/vcap/staging/plugin/play/plugin.rb:10:in `block in stage_application'
from /var/vcap/packages/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.63/lib/vcap/staging/plugin/play/plugin.rb:7:in `chdir'
from /var/vcap/packages/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.63/lib/vcap/staging/plugin/play/plugin.rb:7:in `stage_application'
from /var/vcap/packages/stager/bin/run_plugin:19:in `<main>'

Upvotes: 0

Views: 293

Answers (1)

eightyoctane
eightyoctane

Reputation: 639

Update on the previous post (addressing scala specifically):

  1. please avoid using a manifest at this time
  2. vmc push
  3. after you do an app change:

play clean dist && vmc update <app> --path <app dist path>

Here is my example:

play clean dist && vmc update ghelloworld --path "/Users/ggross/Dropbox/play-work/helloworld-scala/dist"

Original answer (addresses java deployment):

Ok, I don't have your app specifically, so here is what I did. Using the example at Start Cloudfoundry

I created the example Play! app, and deployed to Cloudfoundry. I was careful to select "2 - Create a simple Java application".

I then made a simple change to "Application.java".

Next I did the following:

$vmc dist
$vmc update garyhelloplay --path=dist/garyhello-java-1.0-SNAPSHOT.zip

This completed successfully, and I was able to view the result from my browser. NOTE: the first deployment took a long time (minutes), so that required some patience. If you would like us to review your app specifically, please open a ticket at Cloudfoundry Support, we will take a look, and post the results here.

Upvotes: 2

Related Questions