本文介绍了启动期间无法设置套接字. dbexit:rc:mongodb中出现48错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我现在将mongo更新到版本3.2,我收到此错误.早些时候我没有出错.仅在更新mongo之后,我才收到此错误.我什至试图停止并再次启动mongod服务,但仍然显示相同的错误.
I updated mongo to version 3.2 now I am getting this error. Earlier I was not getting error. Only after updating mongo I am getting this error. I even tried to stop and start the mongod service again but still it is showing the same error.
rahul ~ $ mongod
2016-01-10T23:39:51.696+0530 I CONTROL [initandlisten] MongoDB starting : pid=6630 port=27017 dbpath=/data/db 64-bit host=rahulcomp24-HP-ENVY-15-Notebook-PC
2016-01-10T23:39:51.696+0530 I CONTROL [initandlisten] db version v3.2.0
2016-01-10T23:39:51.696+0530 I CONTROL [initandlisten] git version: 45d947729a0315accb6d4f15a6b06be6d9c19fe7
2016-01-10T23:39:51.696+0530 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1f 6 Jan 2014
2016-01-10T23:39:51.696+0530 I CONTROL [initandlisten] allocator: tcmalloc
2016-01-10T23:39:51.696+0530 I CONTROL [initandlisten] modules: none
2016-01-10T23:39:51.696+0530 I CONTROL [initandlisten] build environment:
2016-01-10T23:39:51.696+0530 I CONTROL [initandlisten] distmod: ubuntu1404
2016-01-10T23:39:51.696+0530 I CONTROL [initandlisten] distarch: x86_64
2016-01-10T23:39:51.696+0530 I CONTROL [initandlisten] target_arch: x86_64
2016-01-10T23:39:51.696+0530 I CONTROL [initandlisten] options: {}
2016-01-10T23:39:51.717+0530 E NETWORK [initandlisten] listen(): bind() failed errno:98 Address already in use for socket: 0.0.0.0:27017
2016-01-10T23:39:51.717+0530 E NETWORK [initandlisten] addr already in use
2016-01-10T23:39:51.717+0530 E STORAGE [initandlisten] Failed to set up sockets during startup.
2016-01-10T23:39:51.717+0530 I CONTROL [initandlisten] dbexit: rc: 48
`
rahul ~ $ mongo
MongoDB shell version: 3.2.0
connecting to: test
Server has startup warnings:
2016-01-10T23:38:16.095+0530 I CONTROL [initandlisten]
2016-01-10T23:38:16.095+0530 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2016-01-10T23:38:16.095+0530 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-01-10T23:38:16.095+0530 I CONTROL [initandlisten]
2016-01-10T23:38:16.095+0530 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2016-01-10T23:38:16.095+0530 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-01-10T23:38:16.095+0530 I CONTROL [initandlisten]
推荐答案
检查数据库是否正在运行,请运行:
check if db in running, run:
ps aux | grep mongo
找到数据库(例如77071)并杀死它,然后运行:
locate the db (ex. here is 77071) and kill it, run:
kill -9 77071
这篇关于启动期间无法设置套接字. dbexit:rc:mongodb中出现48错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!