我见过其他带有启动警告的人,但是我似乎找不到任何警告.一些注意事项,我在Ubuntu 14.04上运行,我的mongo版本是3.0.5(我也尝试过类似问题的3.0.6),我尝试停止/重新启动均无济于事.
I've seen others with startup warnings but I can't seem find anything on this one. A few notes I'm running on Ubuntu 14.04 my mongo version is 3.0.5 (I've also tried 3.0.6 with similar issues) I've tried stoping/ restarting to no avail.
似乎正在寻找一个不存在的文件,因此我不确定是否有人知道该文件的用途.这是我启动时得到的日志($ mongo)
It seems to be looking for a file that does not exist so I'm not sure if anyone is aware of what this file is for. Here is the log I get upon start up ($ mongo)
MongoDB shell version: 3.0.5 connecting to: test Server has startup warnings: 2015-09-04T23:25:54.707-0400 I STORAGE [initandlisten] unable to validate readahead settings due to error: boost::filesystem::status: Permission denied: "/sys/dev/block/8:1/queue/read_ahead_kb" 2015-09-04T23:25:54.707-0400 I STORAGE [initandlisten] for more information, see dochub.mongodb/core/readahead 2015-09-04T23:25:54.793-0400 I CONTROL [initandlisten] 2015-09-04T23:25:54.793-0400 I CONTROL [initandlisten] ** WARNING: Cannot detect if NUMA interleaving is enabled. Failed to probe "/sys/devices/system/node/node1": Permission denied 2015-09-04T23:25:54.793-0400 W CONTROL [initandlisten] 2015-09-04T23:25:54.793-0400 W CONTROL [initandlisten] Failed to probe "/sys/kernel/mm/transparent_hugepage": Permission denied 2015-09-04T23:25:54.793-0400 W CONTROL [initandlisten] 2015-09-04T23:25:54.793-0400 W CONTROL [initandlisten] Failed to probe "/sys/kernel/mm/transparent_hugepage": Permission denied 2015-09-04T23:25:54.793-0400 I CONTROL [initandlisten]我找不到要查找的"/sys/dev/block/8:1/queue/read_ahead_kb",并引用了权限被拒绝,如果有区别,则通过root安装了mongo.
I can't locate "/sys/dev/block/8:1/queue/read_ahead_kb" which it is looking for and citing permission denied, mongo was installed via root if that makes a difference.
有人知道什么可能导致此错误吗?我已经安装了多个mongo,之前从未遇到过.
Does anyone know what might be causing this error? I've done multiple mongo installs and haven't come across this before.
推荐答案由于默认情况下安装了自定义内核,因此OVH/Kimsufi出现了完全相同的问题.
Had the exact same issues with OVH/Kimsufi due to their custom kernel installed by default.
首先,您需要首先拥有常规的ubuntu内核,而不要由托管公司修改.
然后,您需要禁用透明的大页面以消除警告并提高与内存管理相关的内存性能:
Then, you need to disable transparent huge pages to remove the warning and improve memory performance related to memory management:
将此脚本添加为/etc/init.d/disable-transparent-hugepage #!/bin/sh ### BEGIN INIT INFO # Provides: disable-transparent-hugepages # Required-Start: $local_fs # Required-Stop: # X-Start-Before: mongod mongodb-mms-automation-agent # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Disable Linux transparent huge pages # Description: Disable Linux transparent huge pages, to improve # database performance. ### END INIT INFO case $1 in start) if [ -d /sys/kernel/mm/transparent_hugepage ]; then thp_path=/sys/kernel/mm/transparent_hugepage elif [ -d /sys/kernel/mm/redhat_transparent_hugepage ]; then thp_path=/sys/kernel/mm/redhat_transparent_hugepage else return 0 fi echo 'never' > ${thp_path}/enabled echo 'never' > ${thp_path}/defrag unset thp_path ;; esac
使脚本可执行sudo chmod 755 /etc/init.d/disable-transparent-hugepage
在启动sudo update-rc.d disable-transparent-hugepage defaults
参考: docs.mongodb/v3 .0/tutorial/transparent-huge-pages/
更多推荐
Mongo DB Server启动警告
发布评论