当前位置:  开发笔记 > 编程语言 > 正文

启动时无法设置套接字.dbexit:rc:mongodb中有48个错误

如何解决《启动时无法设置套接字.dbexit:rc:mongodb中有48个错误》经验,为你挑选了1个好方法。

我将mongo更新到版本3.2现在我收到此错误.早些时候我没有收到错误.只有在更新mongo后我才会收到此错误.我甚至试图再次停止并启动mongod服务,但它仍然显示相同的错误.

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] 

hughes.. 5

找到在端口27017上运行的进程:

C:\Users\hughes> netstat -aon | findstr 27017
  TCP    0.0.0.0:27017          0.0.0.0:0              LISTENING       3344

最后一列显示PID(3344).找到该PID的进程名称:

C:\Users\hughes> tasklist /fi "pid eq 3344"
Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
VirtualBox.exe                3344 Console                    1    101,908 K

对我来说,事实证明VirtualBox的端口转发是个问题.



1> hughes..:

找到在端口27017上运行的进程:

C:\Users\hughes> netstat -aon | findstr 27017
  TCP    0.0.0.0:27017          0.0.0.0:0              LISTENING       3344

最后一列显示PID(3344).找到该PID的进程名称:

C:\Users\hughes> tasklist /fi "pid eq 3344"
Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
VirtualBox.exe                3344 Console                    1    101,908 K

对我来说,事实证明VirtualBox的端口转发是个问题.

推荐阅读
赛亚兔备_393
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有