2017-06-12T13:06:18.407+0300 I STORAGE [initandlisten] exception in initAndListen: 98 Unable to lock file: /data/db/mongod.lock Resource temporarily unavailable. Is a mongod instance already running?, terminating
2017-06-12T13:06:18.407+0300 I NETWORK [initandlisten] shutdown: going to close listening sockets...
2017-06-12T13:06:18.407+0300 I NETWORK [initandlisten] shutdown: going to flush diaglog...
2017-06-12T13:06:18.407+0300 I CONTROL [initandlisten] now exiting
2017-06-12T13:06:18.407+0300 I CONTROL [initandlisten] shutting down with code:100
4
				votes
			1 Answers
23  
				votes
			The error clearly says
exception in initAndListen: 98 Unable to lock file: /data/db/mongod.lock Resource temporarily unavailable. Is a mongod instance already running?, terminating
An instance of mongod is already running and it held a lock on mongod.lock file. Run ps -eaf | grep mongod to find the running instance. If running, kill the process sudo kill <pID> obtained from above grep command.
Then delete the mongod.lock file as mongod wasn't shutdown gracefully. Post deleting the lock file start the mongod process sudo mongod.
Hope this helps!
ps -eaf | grep mongodto find out the process id of running mongod. Also, check whether the/data/dbdirectory is already created. If created, check the permissions whether you can write/read data. - harshavmb