-1

I have a Meteor App running on Modulus.net server. The App is using by many people, So I want to use the same Database Locally. I'm using Ubuntu 12.

I read other SO Posts, but none of them found useful.

I tried this code

$ export MONGO_URL=mongodb://user:pass@mongo.onmodulus.net/dbId?autoReconnect=true&connectTimeoutMS=60000
$ meteor run 

It throws an Error

Unexpected mongo exit code 45. Restarting.
Can't start mongod
MongoDB cannot open or obtain a lock on a file

I have also tried sudo mrt as I have installed meteorite, now the app is running but the database not changed.

I'm a newbie to Terminal, Is there any way to do that?

Surjith S M
  • 6,642
  • 2
  • 31
  • 50
  • 1
    What happens if you explicitly set a port for mongo in the url For example: `mongodb://user:pass@mongo.onmodulus.net:27017/...`. On that server, is that port open to the outside world? – David Weldon Dec 27 '13 at 21:04
  • They have given this URL to connect, I have to confirm they support Port or not. – Surjith S M Dec 29 '13 at 17:13

1 Answers1

1

Did you replace user:pass and dbId to your username, password, and dbID?

You can use mongo mongodb://user:pass@mongo.onmodulus.net/dbId to check whether you can access it or not first.

Update

Sorry for the misleading answer, mongo shell has a bug to log in while you enter the url like so. You can see here

Your code runs successfully on my computer. You can try to delete .meteor/local and then execute meteor run again.

If you want to use sudo to execute it, add the argument -E so that the environment variables will not be reset:

sudo -E meteor run
Community
  • 1
  • 1
waitingkuo
  • 89,478
  • 28
  • 112
  • 118