Skip to content
Advertisement

Cannot start mongodb service

I tried to start mongodb service from root user and it fails on the error that it cannot open file j._8, I checked the permissions as well. This was working fine before.

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

This is the journal folder.

root@mongo-0:/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

I cannot open the file j._8 with cat or less as root. Please help to fix this.

Thanks in advance

Advertisement

Answer

chmod -R 777 /data/db

solved the issue for me.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement