6

When I try to connect mongdb service i am getting error: **

Windows could not start the MongoDB service on Local Computer

**

Error1053: the service did not respond to the start or control request in a timely fashion

enter image description here

Mongodb installed path: C:\MongoDB //mongod.cfg file inside the MongodB folder not in bin folder

mongod.cfg file:


systemLog:

    destination: file

    path: c:\data\log\mongod.log

storage:

    dbPath: c:\data\db***

how do I resolve this error and run a mongodb service

Neil Lunn
  • 130,590
  • 33
  • 275
  • 280
N15
  • 265
  • 3
  • 14
  • Probably by looking at the actual error messages in that "sytemLog" you are telling us you know where it is. A lot more useful than "screenshots" with no information at all. Look at the log, and then post the "text" if you don't understand the error listed there. – Neil Lunn Nov 08 '17 at 08:24
  • 1
    log folder is empty – N15 Nov 08 '17 at 09:21
  • 1
    Did you find any solution for this? – Setu Kumar Basak Jul 15 '18 at 17:56

4 Answers4

19

I had a similar problem with MongoDB 4. In auto generated config file, there is an extra configuration, that caused the problem.

#snmp:
mp:

When i deleted "mp:", i can finally start the server.

rale
  • 303
  • 2
  • 7
  • 1
    for me, the line after `#snmp:` was `op:` and commenting that out made it work. – Cory-G Dec 11 '18 at 20:19
  • I recommend **commenting** and not *deleting* it. Use `#` at the beginning of the line. – Zebiano Apr 29 '20 at 12:57
  • in addition to duplicate #snmp entries, mine somehow had an empty line with just a colon ":" deleted that line and the windows service went green – charles ross Jul 28 '20 at 23:02
1

For me , this error was about mongod.cfg file , which I add security; authorization enabled. But it should be colon after security not semicolon.

security:
  authorization: enabled
SayJeyHi
  • 1,018
  • 1
  • 14
  • 26
1

In my case the error was caused by the server running out of space in the hard disk drive.

Clearing some space solved the problem for me.

JulioCT
  • 759
  • 5
  • 7
0

In my case, this failed:

security:
  authorization: 
    enabled

And this worked fine:

security:
  authorization: enabled
Tedi
  • 334
  • 1
  • 3
  • 14