0

I have tried all solutions mentioned in below 2 links Mongodb: Failed to connect to 127.0.0.1:27017, reason: errno:10061 How to start mongo db on windows

But still getting below error

`C:\Program Files (x86)\MongoDB\Server\3.2\bin>mongo MongoDB shell version: 3.2.18-15-g678cb63 connecting to: test 2018-01-26T16:39:23.926+0530 W NETWORK [thread1] Failed to connect to 127.0.0.1 :27017 after 5000ms milliseconds, giving up. 2018-01-26T16:39:23.927+0530 E QUERY [thread1] Error: couldn't connect to ser ver 127.0.0.1:27017, connection attempt failed : connect@src/mongo/shell/mongo.js:229:14 @(connect):1:6

exception: connect failed`

shilovk
  • 11,718
  • 17
  • 75
  • 74
vickey99
  • 177
  • 1
  • 4
  • 15
  • The question should have enough details in the question itself. Please add the config you are using and both commands you are executing to start mongod and to run mongo. – Alex Blex Jan 26 '18 at 11:50
  • Hi Alex for mongod i an getting below log C:\Program Files (x86)\MongoDB\Server\3.2\bin>mongod 2018-01-26T16:39:14.713+0530 I CONTROL [main] 2018-01-26T16:39:14.714+0530 W CONTROL [main] 32-bit servers don't have journal ing enabled by default. Please use --journal if you want durability. 2018-01-26T16:39:14.727+0530 I CONTROL [initandlisten] git version: 678cb635ccb nvironment:e exp licitly, e.g. --storageEngine=mmapv1., terminating 2018-01-26T16:39:14.733+0530 I CONTROL [initandlisten] dbexit: rc: 100 – vickey99 Jan 26 '18 at 11:59
  • doesn't it answer the question? you can't connect because the server didn't start. As a side note, please read https://stackoverflow.com/help/on-topic to increase your chances to get an answer. – Alex Blex Jan 26 '18 at 12:20
  • Hi Alex,what should i do to solve this issue? – vickey99 Jan 26 '18 at 12:24
  • You can start with updating the question. – Alex Blex Jan 26 '18 at 12:26

1 Answers1

0

Open onemore terminal as admin and run mongod. After this you can start your app in main terminal.

Mikita Melnikau
  • 1,655
  • 2
  • 15
  • 30
  • Not close or stop second terminal where you open mongod. When you run mongod you starting mongo server. After this you can start your app in first terminal and it can connect to mongodb server, that you runed by mongod command in second terminal – Mikita Melnikau Jan 26 '18 at 12:41
  • I have mongodb installed in below path C:\Program Files (x86)\MongoDB\Server\3.2\bin Created empty folder here C:\data\db In Admin command promt i am using below command C:\Program Files (x86)\MongoDB\Server\3.2\bin>mongod Then in other command promt window i am giving below command C:\Program Files (x86)\MongoDB\Server\3.2\bin>mongo But still getting connection faliure error – vickey99 Jan 26 '18 at 16:29
  • I this this is issue 28663 Cannot start server. The default storage engine 'wiredTiger' is not av ailable with this build of mongod. Please specify a different storage engine exp licitly, e.g. --storageEngine=mmapv1., terminating 2018-01-26T22:13:42.479+0530 I CONTROL [initandlisten] dbexit: rc: 100 Can someone please suggest what needs to do to solve this issue ? – vickey99 Jan 26 '18 at 16:46
  • 1
    i used mongod.exe --storageEngine=mmapv1 and it worked,thanks Alex and Mikita – vickey99 Jan 26 '18 at 16:57
  • wow i didnt know that changing storage strategy can help. nice job! looks like that was cuz of low RAM. – Mikita Melnikau Jan 26 '18 at 17:33