0

I am editing the configuration of running mongodb in an 'amazon ubuntu instance' (with more than 30 GB data), and I attached some volumes for data, log, and journal

I followed mongodb-ec2:

  • formatted the volumes
  • mounted /data , /log and /journal
  • stop mongodb
  • edit /etc/mongodb.conf

mongodb.conf:

dbpath=/data

  • copy all files from old dir to new mount volumes.
  • start mongodb For testing I run a python script,

    from pymongo import MongoClient db = MongoClient().my_testdb

I got the error message,

ymongo.errors.ConnectionFailure: could not connect to localhost:27017: [Errno 111] Connection refused.

So remove the lock from the /data/mongod.lock.

and run sudo mongod --repair
The following error I got. ..........

ERROR: dbpath (/data/db/) does not exist

........

My question is, even though I configured dbpath=/data, why does it try to look for the path /data/db? How can I resolve it?

  • Can you share the full contents of mongodb.conf? Are you sure that mongo started? – Antonios Dec 2 '14 at 15:17
  • mongo is not starting.... – Jisson Dec 2 '14 at 15:48
  • full contents of mongodb.conf? – Antonios Dec 2 '14 at 16:26
  • its fixed. due to permission issue – Jisson Dec 3 '14 at 5:27
  • Likely a dupe of: stackoverflow.com/a/12232668/1148648 – Adam C Dec 4 '14 at 6:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.