2015-06-13 206 views
1

我试图从root用户启动mongodb服务,并且因错误无法打开文件j._8而失败,我也检查了权限。这之前工作正常。无法启动mongodb服务

couldn't open /data/mongodb/mongodb/data/journal/j._8 errno:13 Permission denied 
Assertion: 13544:recover error couldn't open /data/mongodb/mongodb/data/journal/j._8 
0xaf8c41 0xabedb9 0xabef3c 0x7400a2 0x740305 0x740828 0x740a82 0x72c8ef 0x55ca94 0x55d6cd 0x5641ae 0x565789 0x7f1bd649f76d 0x557c59 
/usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xaf8c41] 
/usr/bin/mongod(_ZN5mongo11msgassertedEiPKc+0x99) [0xabedb9] 
/usr/bin/mongod() [0xabef3c] 
/usr/bin/mongod(_ZN5mongo3dur11RecoveryJob11processFileEN5boost11filesystem210basic_pathISsNS3_11path_traitsEEE+0x292) [0x7400a2] 
/usr/bin/mongod(_ZN5mongo3dur11RecoveryJob2goERSt6vectorIN5boost11filesystem210basic_pathISsNS4_11path_traitsEEESaIS7_EE+0xc5) [0x740305] 
/usr/bin/mongod(_ZN5mongo3dur8_recoverEv+0x1a8) [0x740828] 
/usr/bin/mongod(_ZN5mongo3dur7recoverEv+0x22) [0x740a82] 
/usr/bin/mongod(_ZN5mongo3dur7startupEv+0x7f) [0x72c8ef] 
/usr/bin/mongod(_ZN5mongo14_initAndListenEi+0x434) [0x55ca94] 
/usr/bin/mongod(_ZN5mongo13initAndListenEi+0x1d) [0x55d6cd] 
/usr/bin/mongod() [0x5641ae] 
/usr/bin/mongod(main+0x9) [0x565789] 
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f1bd649f76d] 
/usr/bin/mongod(__gxx_personality_v0+0x469) [0x557c59] 
dbexception during recovery: 13544 recover error couldn't open /data/mongodb/mongodb/data/journal/j._8 
exception in initAndListen: 13544 recover error couldn't open /data/mongodb/data/journal/j._8, terminating 
dbexit: 
shutdown: going to close listening sockets... 
shutdown: going to flush diaglog... 
shutdown: going to close sockets... 
shutdown: waiting for fs preallocator... 
shutdown: lock for final commit... 
shutdown: final commit... 
shutdown: closing all files... 
closeAllFiles() finished 
shutdown: removing fs lock... 
dbexit: really exiting now 

这是日记文件夹。

[email protected]:/data/mongodb/mongodb/data/journal# ls -lah 
total 1.7G 
drwxr-xr-x 2 mongodb mongodb 4.0K Jun 9 23:56 . 
drwxrwx--- 3 mongodb mongodb 4.0K Jun 13 00:29 .. 
-rw------- 1 mongodb mongodb 1.1G Jun 9 23:56 j._7 
-rw------- 1 mongodb mongodb 695M Jun 13 00:22 j._8 
-rw------- 1 mongodb mongodb 88 Jun 13 00:22 lsn 

我无法以root身份打开文件j._8以cat或更少。请帮助解决这个问题。

在此先感谢

+0

我会使用lsof并寻找锁。 – Doug

回答

3
chmod -R 777 /data/db 

解决这个问题对我来说。

+1

谢谢@Syc我将有问题的权限更改为777并将其更改为600.其当前正在工作 – user2626445

+1

无法确定为什么权限全部正确时排在第一位 – user2626445