-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:[email protected]/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 Answers1

1

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

You can use mongo mongodb://user:[email protected]/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