Mongo DB Server启动警告

编程入门 行业动态 更新时间:2024-10-26 08:28:21
本文介绍了Mongo DB Server启动警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我见过其他带有启动警告的人,但是我似乎找不到任何警告.一些注意事项,我在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启动警告

    本文发布于:2023-11-22 21:03:21,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1619014.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:Mongo   DB   Server

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!