New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

Comments

Projects
None yet
8 participants
@mminella

mminella commented Mar 12, 2013

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

This comment has been minimized.

Show comment
Hide comment
@cf-frontend

cf-frontend Mar 12, 2013

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

cf-frontend commented Mar 12, 2013

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

This comment has been minimized.

Show comment
Hide comment
@mminella

mminella Mar 12, 2013

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 commented Mar 12, 2013

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

This comment has been minimized.

Show comment
Hide comment
@mminella

mminella Mar 12, 2013

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).

mminella commented Mar 12, 2013

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

This comment has been minimized.

Show comment
Hide comment
@cf-frontend

cf-frontend Mar 13, 2013

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

Dennis & Sheel

cf-frontend commented Mar 13, 2013

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

Dennis & Sheel

@testobsessed

This comment has been minimized.

Show comment
Hide comment
@testobsessed

testobsessed Mar 13, 2013

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:inopen'
multipart-post-1.1.5/lib/composite_io.rb:84:in initialize' cfoundry-0.5.3.rc4/lib/cfoundry/v1/base.rb:57:innew'
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:inupload'
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:inwith_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:insetup_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:inrun'
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:incall'
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:inwith_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:inwrap_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:ininstance_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:ininstance_exec'
mothership-0.5.1/lib/mothership/command.rb:86:in invoke' mothership-0.5.1/lib/mothership/base.rb:55:inexecute'
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:insave_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:inwrap_errors'
vmc-0.5.1.rc3/lib/vmc/cli.rb:145:in execute' mothership-0.5.1/lib/mothership.rb:45:instart'
vmc-0.5.1.rc3/bin/vmc:11:in <top (required)>' ruby-1.9.3-p374/bin/vmc:19:inload'
ruby-1.9.3-p374/bin/vmc:19:in <main>' ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:ineval'
ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in `

'

testobsessed commented Mar 13, 2013

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:inopen'
multipart-post-1.1.5/lib/composite_io.rb:84:in initialize' cfoundry-0.5.3.rc4/lib/cfoundry/v1/base.rb:57:innew'
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:inupload'
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:inwith_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:insetup_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:inrun'
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:incall'
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:inwith_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:inwrap_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:ininstance_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:ininstance_exec'
mothership-0.5.1/lib/mothership/command.rb:86:in invoke' mothership-0.5.1/lib/mothership/base.rb:55:inexecute'
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:insave_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:inwrap_errors'
vmc-0.5.1.rc3/lib/vmc/cli.rb:145:in execute' mothership-0.5.1/lib/mothership.rb:45:instart'
vmc-0.5.1.rc3/bin/vmc:11:in <top (required)>' ruby-1.9.3-p374/bin/vmc:19:inload'
ruby-1.9.3-p374/bin/vmc:19:in <main>' ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:ineval'
ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in `

'

@andypiper

This comment has been minimized.

Show comment
Hide comment
@andypiper

andypiper Mar 13, 2013

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.

andypiper commented Mar 13, 2013

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

This comment has been minimized.

Show comment
Hide comment
@cf-frontend

cf-frontend Mar 14, 2013

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 commented Mar 14, 2013

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

This comment has been minimized.

Show comment
Hide comment
@cf-frontend

cf-frontend Mar 14, 2013

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

cf-frontend commented Mar 14, 2013

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

This comment has been minimized.

Show comment
Hide comment
@andypiper

andypiper Mar 16, 2013

works for me with my previous test case.

andypiper commented Mar 16, 2013

works for me with my previous test case.

@gonzalezcalleja

This comment has been minimized.

Show comment
Hide comment
@gonzalezcalleja

gonzalezcalleja Mar 30, 2013

Worked for me too with 0.5.1.rc5

gonzalezcalleja commented Mar 30, 2013

Worked for me too with 0.5.1.rc5

@lsiu

This comment has been minimized.

Show comment
Hide comment
@lsiu

lsiu Apr 7, 2013

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.

lsiu commented Apr 7, 2013

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

This comment has been minimized.

Show comment
Hide comment
@ethroo

ethroo Apr 16, 2013

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

ethroo commented Apr 16, 2013

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

@nand2

This comment has been minimized.

Show comment
Hide comment
@nand2

nand2 Apr 19, 2013

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

nand2 commented Apr 19, 2013

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