I followed a blog(link) to install and configure MongoDB in my system[Windows 7 32 bit].
As per blogger said, I have download mongodb-win32-i386-2.6.5 and extract to D:/mongodb/ and followed the blog
Upto installation everything alright, but when I try to start service using following command,
D:\mongodb\bin>net start MongoDB
I got error response as,
System error 2 has occurred.
The system cannot find the file specified.
How to solve this ?
Update : Log File
2014-11-19T16:43:25.356+0530 [DataFileSync] flushing diag log
2014-11-19T16:43:25.403+0530 [initandlisten] MongoDB starting : pid=5128 port=27017 dbpath=D:\mongodb\data 32-bit host=AVVENIRE-JAVA
2014-11-19T16:43:25.403+0530 [initandlisten]
2014-11-19T16:43:25.403+0530 [initandlisten] ** NOTE: This is a 32 bit MongoDB binary.
2014-11-19T16:43:25.403+0530 [initandlisten] ** 32 bit builds are limited to less than 2GB of data (or less with --journal).
2014-11-19T16:43:25.403+0530 [initandlisten] ** See http://dochub.mongodb.org/core/32bit
2014-11-19T16:43:25.404+0530 [initandlisten]
2014-11-19T16:43:25.404+0530 [initandlisten] targetMinOS: Windows XP SP3
2014-11-19T16:43:25.404+0530 [initandlisten] db version v2.6.1
2014-11-19T16:43:25.404+0530 [initandlisten] git version: 4b95b086d2374bdcfcdf2249272fb552c9c726e8
2014-11-19T16:43:25.404+0530 [initandlisten] build info: windows sys.getwindowsversion(major=6, minor=0, build=6002, platform=2, service_pack='Service Pack 2') BOOST_LIB_VERSION=1_49
2014-11-19T16:43:25.404+0530 [initandlisten] allocator: system 2014-11-19T16:43:25.404+0530 [initandlisten] options: { config: "d:\mongodb\mongo.config", diaglog: 3, net: { bindIp: "127.0.0.1", port: 27017 }, storage: { dbPath: "D:\mongodb\data", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "D:\mongodb\log\mongo.log", quiet: true } }
2014-11-19T16:43:25.483+0530 [initandlisten] journal dir=D:\mongodb\data\journal
2014-11-19T16:43:25.484+0530 [initandlisten] recover : no journal files present, no recovery needed
2014-11-19T16:43:25.770+0530 [initandlisten] waiting for connections on port 27017
2014-11-19T16:44:25.439+0530 [DataFileSync] flushing diag log
2014-11-19T16:45:25.361+0530 [DataFileSync] flushing diag log
2014-11-19T16:46:25.360+0530 [DataFileSync] flushing diag log
2014-11-19T16:46:31.869+0530 [conn1] terminating, shutdown command received
2014-11-19T16:46:31.869+0530 [conn1] dbexit: shutdown called
2014-11-19T16:46:31.869+0530 [conn1] shutdown: going to close listening sockets...
2014-11-19T16:46:31.869+0530 [conn1] closing listening socket: 540
2014-11-19T16:46:31.869+0530 [conn1] shutdown: going to flush diaglog...
2014-11-19T16:46:31.869+0530 [conn1] flushing diag log
2014-11-19T16:46:31.869+0530 [conn1] shutdown: going to close sockets...
2014-11-19T16:46:31.870+0530 [conn1] shutdown: waiting for fs preallocator...
2014-11-19T16:46:31.870+0530 [conn1] shutdown: lock for final commit...
2014-11-19T16:46:31.870+0530 [conn1] shutdown: final commit...
2014-11-19T16:46:31.873+0530 [conn1] shutdown: closing all files...
2014-11-19T16:46:31.873+0530 [conn1] closeAllFiles() finished
2014-11-19T16:46:31.873+0530 [conn1] journalCleanup...
2014-11-19T16:46:31.889+0530 [conn1] removeJournalFiles
2014-11-19T16:46:31.891+0530 [conn1] shutdown: removing fs lock...
2014-11-19T16:46:31.891+0530 [conn1] dbexit: really exiting now
2014-11-19T16:47:08.985+0530 ***** SERVER RESTARTED *****
2014-11-19T16:47:08.985+0530 Trying to install Windows service 'MongoDB'
2014-11-19T16:47:08.985+0530 There is already a service named 'MongoDB', aborting
Run Command window as administrator and run
net delete MongoDB
For running mongo as a service use this:
then run Command window as administrator and run
net start MongoDB