简体   繁体   中英

MongoDb won't start

I went to restart my mongo db because I realized that I did not have auth=true set in my mongo.conf file.

I've never had problems restarting before.

I restarted by sudo /etc/init.d/mongo restart.

It failed to restarted.

When I look in the mongo.log file I see some errors. The folder that it is complaining about is owned by root and not mongod . I actually see about 5 folders that are owned by root in the data folder.

Is this normal? Can I just change the permissions on this folder to mongod?

2015 - 07 - 18 T14: 18: 58.357 + 0000[initandlisten] recover: no journal files present, no recovery needed
2015 - 07 - 18 T14: 18: 58.689 + 0000[initandlisten] couldn 't open /data/product.28 errno:13 Permission denied

2015 - 07 - 18 T14: 18: 58.689 + 0000[initandlisten] Assertion: 16966: 
_extentManager.init failed: InternalError DataFile::openExisting - mmf.open failed
2015 - 07 - 18 T14: 18: 58.700 + 0000[initandlisten] 0x11e9b11 0x118b849 0x11703f6 0x117094c 0x8c2e65 0x8c51ab 0x8d3b1a 0x8f8ee5 0x8f9117 
0x76ad48 0x76c89f 0x76d14b 0x76d6e5 0x76d909 0x7f6e276887d5 0x764589Thanks for any insight or help in advance.

Karen

Yes, you can change the permissions for the data folder safely

sudo chown -R mongod:mongod /var/lib/mongodb 

...or whatever DB path you have set. I also had to do it recently, because my MongoDB server crashed, and I had to repair. But the repaired files were created with wrong permissions

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM