MongoDB: Failed to configure sockets at startup

I have a 64-bit Windows 8.1 Enterprise machine. I installed mongodb msi for Windows with SSL support. I created all the necessary conditions for setting up the environment. Now, using the command line, I went to the bin directory located in the mongodb installation folder and ran the following command:

mongod.exe --dbpath "c: \ data"

And I see the following answer:

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 help me solve this problem.

+5
mongodb
source share
1 answer

run

 netstat -a -n | find "27017" 

and chek if port 27017 is already in use

F: \ data \ bin> netstat -a -n | find "27017"

TCP 0.0.0.0:27017 0.0.0.0:08

or run taskmgr and find and kill all the mongod processes.

+14
source share

All Articles