Question

I am currently migrating my cloudfoundry app from the soon deprecated version 1.0 of cloudfoundry to version 2.0.

From the command line output it seems the deployment is working fine. However, I also need to migrate my current mongodb database content. I successfully dumped my current data using vmc tunnel mongodump, however, I'm not able to restore the data to the new database.

When I enter on the commandline

cf tunnel mongolab-xxxMyAmazingApp mongorestore

I got an error message telling me

Opening tunnel on port 10000... FAILED
CFoundry::NotStaged: 170002: App has not finished staging
For more information, see ~/.cf/crash

The crash file contains among others these lines

RESPONSE: [400]
RESPONSE_HEADERS:
  connection : keep-alive
  content-length : 61
  content-type : application/json;charset=utf-8
  date : Fri, 28 Jun 2013 15:27:56 GMT
  server : nginx
  x-content-type-options : nosniff
  x-vcap-request-id : fad06d99-6fe0-4544-b1d1-eff53cea3ddd
RESPONSE_BODY:
{
  "description": "App has not finished staging",
  "code": 170002
}
>>>

cfoundry-2.1.0/lib/cfoundry/baseclient.rb:160:in `handle_error_response'
cfoundry-2.1.0/lib/cfoundry/baseclient.rb:139:in `handle_response'
cfoundry-2.1.0/lib/cfoundry/baseclient.rb:87:in `request'
cfoundry-2.1.0/lib/cfoundry/baseclient.rb:64:in `get'
cfoundry-2.1.0/lib/cfoundry/v2/base.rb:53:in `instances'
cfoundry-2.1.0/lib/cfoundry/v2/app.rb:55:in `instances'
cfoundry-2.1.0/lib/cfoundry/v2/app.rb:201:in `running_instances'
cfoundry-2.1.0/lib/cfoundry/v2/app.rb:176:in `health'
cfoundry-2.1.0/lib/cfoundry/v2/app.rb:212:in `healthy?'
cf-2.1.0/lib/tunnel/tunnel.rb:97:in `helper_healthy?'
cf-2.1.0/lib/tunnel/tunnel.rb:25:in `open!'
cf-2.1.0/lib/tunnel/plugin.rb:41:in `tunnel'
interact-0.5.1/lib/interact/progress.rb:98:in `with_progress'
cf-2.1.0/lib/tunnel/plugin.rb:40:in `tunnel'
mothership-0.5.1/lib/mothership/base.rb:66:in `send'
mothership-0.5.1/lib/mothership/base.rb:66:in `run'
mothership-0.5.1/lib/mothership/command.rb:72: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'
cf-2.1.0/lib/cf/cli.rb:156:in `execute'
cf-2.1.0/lib/cf/cli.rb:167:in `save_token_if_it_changes'
cf-2.1.0/lib/cf/cli.rb:155:in `execute'
cf-2.1.0/lib/cf/cli.rb:101:in `wrap_errors'
cf-2.1.0/lib/cf/cli.rb:151:in `execute'
mothership-0.5.1/lib/mothership.rb:45:in `start'
cf-2.1.0/bin/cf:13
/usr/bin/cf:23:in `load'
/usr/bin/cf:23

So what should I do to solve this problem?

Was it helpful?

Solution

Check this link:

http://support.cloudfoundry.com/entries/24464207-Problem-creating-a-tunnel-to-elephantsql

Hi, as services are now provisioned outside of Cloud Foundry via third party vendors, it is not necessary to use a tunnel to connect to it. To get the connection details for your service, log in to https://console.run.pivotal.io and navigating and find the provisioned in the associated space. Clicking the "manage" button next to the relevant service will take you the providers homepage where you should be able to obtain connection details.

For mongo services is the same. From https://mongolab.com/home you have access to your mongo services.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top