mongod 进程频繁重启,如下所示:
E STORAGE [thread2] WiredTiger (13) [1484274727:920198][12108:0x7f9e77225700], file:WiredTiger.wt, WT_SESSION.checkpoint: /data/mongodb/data/WiredTiger.turtle: file-exist: stat: Permission denied
E STORAGE [thread2] WiredTiger (13) [1484274727:920463][12108:0x7f9e77225700], checkpoint-server: checkpoint server error: Permission denied
E STORAGE [thread2] WiredTiger (-31804) [1484274727:920485][12108:0x7f9e77225700], checkpoint-server: the process must exit and restart: WT_PANIC: WiredTiger library panic
[thread2] Fatal Assertion 28558
[thread2]
[WTJournalFlusher] Fatal Assertion 28559
[WTJournalFlusher]
[thread2] Got signal: 6 (Aborted).
文件的权限:
/data/mongodb/data# ll WiredTiger.turtle
-rw-r--r-- 1 mongodb nogroup 945 Jan 13 05:56 WiredTiger.turtle
当前版本是 3.2.9。这是从 2.X 升级的版本。我们通过 chef 管理 mongodb 服务。
我需要使用service mongodb
或来启动服务吗service mongod
?我看到服务是由用户mongodb
和组启动的nogroup
。
/data/mongodb/data# ll /proc/8241
total 0
dr-xr-xr-x 9 mongodb nogroup 0 Jan 13 02:34 ./
dr-xr-xr-x 111 root root 0 Sep 1 04:38 ../
dr-xr-xr-x 2 mongodb nogroup 0 Jan 13 04:07 attr/
-rw-r--r-- 1 mongodb nogroup 0 Jan 13 04:07 autogroup
-r-------- 1 mongodb nogroup 0 Jan 13 02:34 auxv
-r--r--r-- 1 mongodb nogroup 0 Jan 13 04:07 cgroup
--w------- 1 mongodb nogroup 0 Jan 13 04:07 clear_refs
-r--r--r-- 1 mongodb nogroup 0 Jan 13 02:37 cmdline
-rw-r--r-- 1 mongodb nogroup 0 Jan 13 04:07 comm
-rw-r--r-- 1 mongodb nogroup 0 Jan 13 04:07 coredump_filter
-r--r--r-- 1 mongodb nogroup 0 Jan 13 04:07 cpuset
lrwxrwxrwx 1 mongodb nogroup 0 Jan 13 04:07 cwd -> //
-r-------- 1 mongodb nogroup 0 Jan 13 04:07 environ
答案1
用于sudo service mongodb start
启动服务。它将从相关用户启动 MongoDB 服务。执行此操作后不会发生任何错误。