mardi 2 décembre 2014

mongodb configration issue



Hi, Am editing configuration of running mongodb in 'amazon ubuntu instance'(have more than 30 GB data), and I attached some volumes I for data, log, and joural



I followed mongodb-ec2



  • formated the volumes

  • mount /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 it try to look for the path /data/db? how can I resolve it?





Aucun commentaire:

Enregistrer un commentaire