MongoDB:启动期间无法设置套接字 [英] MongoDB: Failed to set up sockets during startup
问题描述
我有Windows 8.1 Enterprise 64位计算机.我已经为具有SSL支持的Windows安装了mongodb msi.我创建了环境设置所需的所有条件.现在,使用命令提示符导航到mongodb安装文件夹中的bin目录,并执行以下命令:
I have Windows 8.1 Enterprise 64 bit machine. I have installed mongodb msi for windows with SSL support. I created all the perquisites required for environment setup. Now using command prompt I navigated to the bin directory present into the mongodb installation folder and executed the following command:
mongod.exe --dbpath"c:\ data"
mongod.exe --dbpath "c:\data"
我看到以下答复:
C:\mongodb\bin>mongod.exe --dbpath "c:\data"
2016-05-27T17:09:43.362+0530 I CONTROL [initandlisten] MongoDB starting : pid=2
108 port=27017 dbpath=C:\data\db\ 64-bit host=TestServer
2016-05-27T17:09:43.363+0530 I CONTROL [initandlisten] targetMinOS: Windows 7/W
indows Server 2008 R2
2016-05-27T17:09:43.364+0530 I CONTROL [initandlisten] db version v3.2.6
2016-05-27T17:09:43.364+0530 I CONTROL [initandlisten] git version: 05552b562c7
a0b3143a729aaa0838e558dc49b25
2016-05-27T17:09:43.364+0530 I CONTROL [initandlisten] OpenSSL version: OpenSSL
1.0.1p-fips 9 Jul 2015
2016-05-27T17:09:43.364+0530 I CONTROL [initandlisten] allocator: tcmalloc
2016-05-27T17:09:43.364+0530 I CONTROL [initandlisten] modules: none
2016-05-27T17:09:43.364+0530 I CONTROL [initandlisten] build environment:
2016-05-27T17:09:43.364+0530 I CONTROL [initandlisten] distmod: 2008plus-ss
l
2016-05-27T17:09:43.364+0530 I CONTROL [initandlisten] distarch: x86_64
2016-05-27T17:09:43.365+0530 I CONTROL [initandlisten] target_arch: x86_64
2016-05-27T17:09:43.365+0530 I CONTROL [initandlisten] options: {}
2016-05-27T17:09:43.365+0530 E NETWORK [initandlisten] listen(): bind() failed
errno:10048 Only one usage of each socket address (protocol/network address/port
) is normally permitted. for socket: 0.0.0.0:27017
2016-05-27T17:09:43.366+0530 E STORAGE [initandlisten] Failed to set up sockets
during startup.
2016-05-27T17:09:43.366+0530 I CONTROL [initandlisten] dbexit: rc: 48
任何人都可以帮助我解决此问题.
Can anyone please help me to how to fix this issue.
推荐答案
运行
netstat -a -n | find "27017"
检查是否已使用端口27017
and chek if port 27017 is already used
F:\ data \ bin> netstat -a -n |找到"27017"
F:\data\bin> netstat -a -n | find "27017"
TCP 0.0.0.0:27017 0.0.0.0:0侦听
TCP 0.0.0.0:27017 0.0.0.0:0 LISTENING
或运行taskmgr并找到并杀死所有mongod进程
or run taskmgr and find and kill all mongod processes
这篇关于MongoDB:启动期间无法设置套接字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!