当前位置:   article > 正文

mogod启动时出现故障_server has startup warnings: 2023-05-31t17:58:51.1

server has startup warnings: 2023-05-31t17:58:51.153-0700 i control [initand
mogod启动时出现了故障:
 
MongoDB shell version: 3.2.17
connecting to: test
Server has startup warnings:  
2017-11-03T20:10:18.010+0800 I CONTROL  [initandlisten]  
2017-11-03T20:10:18.010+0800 I CONTROL  [initandlisten] ** WARNING: This 32-bit MongoDB binary is deprecated
2017-11-03T20:10:18.010+0800 I CONTROL  [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2017-11-03T20:10:18.010+0800 I CONTROL  [initandlisten]  
2017-11-03T20:10:18.010+0800 I CONTROL  [initandlisten]  
2017-11-03T20:10:18.010+0800 I CONTROL  [initandlisten] ** NOTE: This is a 32 bit MongoDB binary.
2017-11-03T20:10:18.010+0800 I CONTROL  [initandlisten] **       32 bit builds are limited to less than 2GB of data (or less with --journal).
2017-11-03T20:10:18.010+0800 I CONTROL  [initandlisten] **       See http://dochub.mongodb.org/core/32bit
2017-11-03T20:10:18.011+0800 I CONTROL  [initandlisten]  
2017-11-03T20:10:18.011+0800 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2017-11-03T20:10:18.011+0800 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2017-11-03T20:10:18.011+0800 I CONTROL  [initandlisten]  
2017-11-03T20:10:18.011+0800 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2017-11-03T20:10:18.011+0800 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
/sys/kernel/mm/transparent_hugepage$ cat defrag  
[always] madvise never
/sys/kernel/mm/transparent_hugepage$ cat enabled
[always] madvise never
 

32位系统需要添加--journal参数 ,--storageEngine="mmapv1“添加引擎


在Linux中有时需要root权限执行

可切换到root用户或执行 sudo mongod --dbpath /data/db/ --storageEngine="mmapv1“

即可成功启动


Windows也同样 mongod --dbpath /data/db/ --storageEngine="mmapv1“ 可解决


至于后面的警告部分,根据文件提示路径,修改对应的/sys/kernel/mm/transparent_hugepage/enabled defrag文件即可


声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/正经夜光杯/article/detail/953390
推荐阅读
相关标签
  

闽ICP备14008679号