Receive ruby error when trying to do a push --no-start #65

Closed
mminella opened this Issue Mar 12, 2013 · 12 comments

8 participants

@mminella

I have a Spring web application that I'm attempting to deploy via vmc (version 0.5.0 with Ruby v1.9.2p290). From the target of my maven build, I'm executing the following command:

$ vmc push --no-start

However, when I do, I receive the following error:

Uploading partition... FAILED
Upload failed. Try again with 'vmc push'.
TypeError: can't convert nil into String
For more information, see ~/.vmc/crash

The contents of the ~/.vmc/crash are:

Time of crash:
  2013-03-12 10:05:32 -0500

TypeError: can't convert nil into String

multipart-post-1.1.5/lib/composite_io.rb:84:in `initialize'
multipart-post-1.1.5/lib/composite_io.rb:84:in `open'
multipart-post-1.1.5/lib/composite_io.rb:84:in `initialize'
cfoundry-0.5.2/lib/cfoundry/v1/base.rb:57:in `new'
cfoundry-0.5.2/lib/cfoundry/v1/base.rb:57:in `upload_app'
cfoundry-0.5.2/lib/cfoundry/upload_helpers.rb:48:in `upload'
vmc-0.5.0/lib/vmc/cli/app/push.rb:86:in `block in upload_app'
interact-0.5.2/lib/interact/progress.rb:98:in `with_progress'
vmc-0.5.0/lib/vmc/cli/app/push.rb:85:in `upload_app'
vmc-0.5.0/lib/vmc/cli/app/push.rb:65:in `setup_new_app'
vmc-0.5.0/lib/vmc/cli/app/push.rb:48:in `push'
mothership-0.5.1/lib/mothership/base.rb:66:in `run'
mothership-0.5.1/lib/mothership/command.rb:72:in `block in invoke'
manifests-vmc-plugin-0.6.2/lib/manifests-vmc-plugin/plugin.rb:142:in `call'
manifests-vmc-plugin-0.6.2/lib/manifests-vmc-plugin/plugin.rb:142:in `block in create_and_save_manifest'
mothership-0.5.1/lib/mothership/callbacks.rb:74:in `with_filters'
manifests-vmc-plugin-0.6.2/lib/manifests-vmc-plugin/plugin.rb:141:in `create_and_save_manifest'
manifests-vmc-plugin-0.6.2/lib/manifests-vmc-plugin/plugin.rb:80:in `wrap_push'
manifests-vmc-plugin-0.6.2/lib/manifests-vmc-plugin/plugin.rb:29:in `block in <class:ManifestsPlugin>'
mothership-0.5.1/lib/mothership/command.rb:82:in `instance_exec'
mothership-0.5.1/lib/mothership/command.rb:82:in `block (2 levels) in invoke'
mothership-0.5.1/lib/mothership/command.rb:86:in `instance_exec'
mothership-0.5.1/lib/mothership/command.rb:86:in `invoke'
mothership-0.5.1/lib/mothership/base.rb:55:in `execute'
vmc-0.5.0/lib/vmc/cli.rb:150:in `block (2 levels) in execute'
vmc-0.5.0/lib/vmc/cli.rb:161:in `save_token_if_it_changes'
vmc-0.5.0/lib/vmc/cli.rb:149:in `block in execute'
vmc-0.5.0/lib/vmc/cli.rb:100:in `wrap_errors'
vmc-0.5.0/lib/vmc/cli.rb:145:in `execute'
mothership-0.5.1/lib/mothership.rb:45:in `start'
vmc-0.5.0/bin/vmc:11:in `<top (required)>'
ruby-1.9.2-p290/bin/vmc:23:in `load'
ruby-1.9.2-p290/bin/vmc:23:in `<main>'
@cf-frontend

Hey, can you tell us what target you were trying to push to? Also, please do a gem install vmc --pre to update the latest version of vmc and try it again. If that does not fix it please get back to us and we'll investigate.

Dennis & Sheel

@mminella

I'm trying to push to https://api.cloudfoundry.com. I'll update and get back to you on if it works. FYI, the app I'm attempting to push is here: https://github.com/mminella/Spring-Batch-Talk-2.0

@mminella

Update. using vmc 0.5.1.rc2, I am still receiving the same error. Here are the steps to reproduce using the application proposed in my previous comment:

  1. Perform a $ mvn clean install from the root of the project
  2. From the target of the project, execute $ vmc push --no-start
  3. Follow the prompts, adding a mysql service and a rabbitmq service.
  4. Once the application is deployed, execute vmc set-env partition JAVA_OPTS "-Dspring.profiles.active=master -DENVIRONMENT=mysql" where partition is the name of the application
  5. Execute vmc start partition where partition is the name of the application.
  6. Perform a second $ vmc push --no-start. This time use a different application name, same other defaults and bind the new application to the mysql and rabbit services created in step 3.
  7. Here you will receive the error mentioned in the original issue.

The goal of the second push is to run two copies of the application with two different set of environment variables (specifically, activating two different Spring profiles).

@cf-frontend

Thanks for the detailed information. We'll try reproducing your problem and will share our findings with you.

Dennis & Sheel

@testobsessed

I was able to reproduce the issue with a simple push. Steps:

  1. gem install vmc --pre. vmc --version shows vmc 0.5.1.rc3
  2. cd into a directory with a simple rack app that has no services
  3. vmc push Result:

FAILED
Upload failed. Try again with 'vmc push'.
TypeError: can't convert nil into String
For more information, see ~/.vmc/crash

|ruby-1.9.3-p374| filbert in ~/workspace/magex
± |master ✓| → cat ~/.vmc/crash
Time of crash:
2013-03-13 10:05:39 -0700

TypeError: can't convert nil into String

multipart-post-1.1.5/lib/composite_io.rb:84:in initialize'
multipart-post-1.1.5/lib/composite_io.rb:84:in
open'
multipart-post-1.1.5/lib/composite_io.rb:84:in initialize'
cfoundry-0.5.3.rc4/lib/cfoundry/v1/base.rb:57:in
new'
cfoundry-0.5.3.rc4/lib/cfoundry/v1/base.rb:57:in upload_app'
cfoundry-0.5.3.rc4/lib/cfoundry/upload_helpers.rb:48:in
upload'
vmc-0.5.1.rc3/lib/vmc/cli/app/push.rb:90:in block in upload_app'
interact-0.5.2/lib/interact/progress.rb:98:in
with_progress'
vmc-0.5.1.rc3/lib/vmc/cli/app/push.rb:89:in upload_app'
vmc-0.5.1.rc3/lib/vmc/cli/app/push.rb:69:in
setup_new_app'
vmc-0.5.1.rc3/lib/vmc/cli/app/push.rb:52:in push'
mothership-0.5.1/lib/mothership/base.rb:66:in
run'
mothership-0.5.1/lib/mothership/command.rb:72:in block in invoke'
manifests-vmc-plugin-0.6.3.rc2/lib/manifests-vmc-plugin/plugin.rb:142:in
call'
manifests-vmc-plugin-0.6.3.rc2/lib/manifests-vmc-plugin/plugin.rb:142:in block in create_and_save_manifest'
mothership-0.5.1/lib/mothership/callbacks.rb:74:in
with_filters'
manifests-vmc-plugin-0.6.3.rc2/lib/manifests-vmc-plugin/plugin.rb:141:in create_and_save_manifest'
manifests-vmc-plugin-0.6.3.rc2/lib/manifests-vmc-plugin/plugin.rb:80:in
wrap_push'
manifests-vmc-plugin-0.6.3.rc2/lib/manifests-vmc-plugin/plugin.rb:29:in block in <class:ManifestsPlugin>'
mothership-0.5.1/lib/mothership/command.rb:82:in
instance_exec'
mothership-0.5.1/lib/mothership/command.rb:82:in block (2 levels) in invoke'
mothership-0.5.1/lib/mothership/command.rb:86:in
instance_exec'
mothership-0.5.1/lib/mothership/command.rb:86:in invoke'
mothership-0.5.1/lib/mothership/base.rb:55:in
execute'
vmc-0.5.1.rc3/lib/vmc/cli.rb:150:in block (2 levels) in execute'
vmc-0.5.1.rc3/lib/vmc/cli.rb:161:in
save_token_if_it_changes'
vmc-0.5.1.rc3/lib/vmc/cli.rb:149:in block in execute'
vmc-0.5.1.rc3/lib/vmc/cli.rb:100:in
wrap_errors'
vmc-0.5.1.rc3/lib/vmc/cli.rb:145:in execute'
mothership-0.5.1/lib/mothership.rb:45:in
start'
vmc-0.5.1.rc3/bin/vmc:11:in <top (required)>'
ruby-1.9.3-p374/bin/vmc:19:in
load'
ruby-1.9.3-p374/bin/vmc:19:in <main>'
ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in
eval'
ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in `

'

@andypiper

I've had the same issue reported by people attempting to deploy my simple sinatra/rack webserver app https://github.com/andypiper/sinatra-static-web using vmc 0.5.x but the reproducibility varies, it seems to depend on what is in the web public folder.

@cf-frontend

We could reproduce the problem too and we're currently still working on a fix. If it works for you, you can try using vmc 0.4.6 to push an application until we release a fixed version for the most recent vmc.

Dennis & Sheel

@cf-frontend

We have just pushed a fix under vmc 0.5.1.rc4. Can you try this version and let us know if the issue still persists? We'll close the issue for now, but please reopen it if necessary.

Thanks for reporting this issue. We've strengthened the integration tests around pushing an app in hopes of catching it earlier next time.

Chris & Sheel

@andypiper

works for me with my previous test case.

@gonzalezcalleja

Worked for me too with 0.5.1.rc5

@lsiu

Looks like this issue is back again.
I tried installing with "gem install vmc --pre" but I get the following error:

ERROR: Error installing vmc:
tunnel-vmc-plugin requires cfoundry (~> 0.5.2, runtime)

BTW, the gem install is trying to install vmc 0.5.1.rc6.

@ethroo

sometime you need to "gem uninstall tunnel-vmc-plugin" first...

@nand2

Confirming bug on vmc 0.5.0 and fix on vmc 0.5.1rc6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment