I'm not able to start mongo because of no space left on disk to create lock file, but I have lots of space on disk - linux

I have instalation of mongo on my PC with arch linux (64 bit machine).
Before start I had move mongo database files on new location with plenty (11 Gb) space. But if i run mongod, it fails because of no space left on device. If I run this as root, ti works. Where is my potential problem? Im totaly newbie in mongo.
mongo version
$ mongod --version
db version v3.0.7
git version: nogitversion
mongo conf
$ cat /etc/mongodb.conf
# See http://www.mongodb.org/display/DOCS/File+Based+Configuration for format details
# Run mongod --help to see a list of options
bind_ip = 127.0.0.1
quiet = true
#dbpath = /var/lib/mongodb
dbpath = /home/data/mongodb
logpath = /var/log/mongodb/mongod.log
logappend = true
$
check free space
$ sudo -u mongodb df -h /home/data/mongodb/
Souborový systém Velikost Užito Volno Uži% Připojeno do
/dev/sda3 208G 187G 11G 95% /home
$
check privileges
$ sudo -u mongodb ls -lisa /home/data/mongodb
celkem 12
3547175 4 drwx------ 2 mongodb daemon 4096 28. lis 21.38 .
3538945 4 drwxr-xr-x 5 postgres root 4096 28. lis 21.14 ..
3544083 4 -rw-r--r-- 1 mongodb root 69 28. lis 21.17 storage.bson
$ sudo -u mongodb ls /home/data/mongodb/
storage.bson
problem
$ sudo -u mongodb mongod --repair
2015-11-29T16:24:08.722+0100 I STORAGE [initandlisten] exception in initAndListen: 39 Unable to write process id 4565 to file: /data/db/mongod.lock errno:28 No space left on device, terminating
2015-11-29T16:24:08.722+0100 I CONTROL [initandlisten] now exiting
2015-11-29T16:24:08.722+0100 I NETWORK [initandlisten] shutdown: going to close listening sockets...
2015-11-29T16:24:08.722+0100 I NETWORK [initandlisten] removing socket file: /tmp/mongodb-27017.sock
2015-11-29T16:24:08.722+0100 I NETWORK [initandlisten] shutdown: going to flush diaglog...
2015-11-29T16:24:08.722+0100 I NETWORK [initandlisten] shutdown: going to close sockets...
2015-11-29T16:24:08.722+0100 I STORAGE [initandlisten] shutdown: waiting for fs preallocator...
2015-11-29T16:24:08.722+0100 I STORAGE [initandlisten] shutdown: closing all files...
2015-11-29T16:24:08.722+0100 I STORAGE [initandlisten] closeAllFiles() finished
2015-11-29T16:24:08.722+0100 I CONTROL [initandlisten] dbexit: rc: 100
$
as root
$sudo mongod --repair
2015-11-29T16:25:56.792+0100 I CONTROL [initandlisten] MongoDB starting : pid=4610 port=27017 dbpath=/data/db 64-bit host=optiplex
2015-11-29T16:25:56.792+0100 I CONTROL [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2015-11-29T16:25:56.792+0100 I CONTROL [initandlisten]
2015-11-29T16:25:56.792+0100 I CONTROL [initandlisten]
2015-11-29T16:25:56.792+0100 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2015-11-29T16:25:56.792+0100 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2015-11-29T16:25:56.792+0100 I CONTROL [initandlisten]
2015-11-29T16:25:56.792+0100 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2015-11-29T16:25:56.792+0100 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2015-11-29T16:25:56.792+0100 I CONTROL [initandlisten]
2015-11-29T16:25:56.792+0100 I CONTROL [initandlisten] db version v3.0.7
2015-11-29T16:25:56.792+0100 I CONTROL [initandlisten] git version: nogitversion
2015-11-29T16:25:56.792+0100 I CONTROL [initandlisten] build info: Linux flo 4.2.3-1-ARCH #1 SMP PREEMPT Sat Oct 3 18:52:50 CEST 2015 x86_64 BOOST_LIB_VERSION=1_59
2015-11-29T16:25:56.792+0100 I CONTROL [initandlisten] allocator: tcmalloc
2015-11-29T16:25:56.792+0100 I CONTROL [initandlisten] options: { repair: true }
2015-11-29T16:25:56.793+0100 I STORAGE [initandlisten] finished checking dbs
2015-11-29T16:25:56.793+0100 I CONTROL [initandlisten] now exiting
2015-11-29T16:25:56.793+0100 I NETWORK [initandlisten] shutdown: going to close listening sockets...
2015-11-29T16:25:56.793+0100 I NETWORK [initandlisten] removing socket file: /tmp/mongodb-27017.sock
2015-11-29T16:25:56.793+0100 I NETWORK [initandlisten] shutdown: going to flush diaglog...
2015-11-29T16:25:56.793+0100 I NETWORK [initandlisten] shutdown: going to close sockets...
2015-11-29T16:25:56.793+0100 I STORAGE [initandlisten] shutdown: waiting for fs preallocator...
2015-11-29T16:25:56.793+0100 I STORAGE [initandlisten] shutdown: closing all files...
2015-11-29T16:25:56.793+0100 I STORAGE [initandlisten] closeAllFiles() finished
2015-11-29T16:25:56.793+0100 I STORAGE [initandlisten] shutdown: removing fs lock...
2015-11-29T16:25:56.793+0100 I CONTROL [initandlisten] dbexit: rc: 0
in log i have no new records...
Thanks for your help.

Related

Problem with MongoDB connection of server

I've a problem with my configuration on mongodb.
My configuration is:
Linux Ubunut 18.04LTS
I've follow documentation MongoDB.org. Every going well.
But I meetting problem when I run mongod command.
He return me that:
2020-07-07T12:59:43.510+0200 E NETWORK [initandlisten] Failed to unlink socket file /tmp/mongodb-27017.sock Operation not permitted
2020-07-07T12:59:43.510+0200 F - [initandlisten] Fatal Assertion 40486 at src/mongo/transport/transport_layer_asio.cpp 684
2020-07-07T12:59:43.510+0200 F - [initandlisten]
***aborting after fassert() failure
I tested of remove /tmp/mongodb-27017.sock and of change administratif law:
# rm /tmp/mongodb-27017.sock
# sudo systemctl start mongod
# sudo mongod
# ls -la /tmp/
Return :
srwx------ 1 usr usr 0 juil. 7 13:14 mongodb-27017.sock
# sudo chown mongodb:mongodb /tmp/mongodb-27017.sock
# ls -la /tmp/
# srwx------ 1 mongodb mongodb 0 juil. 7 13:14 mongodb-27017.sock
If I raise mongod command:
2020-07-07T13:19:43.641+0200 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2020-07-07T13:19:43.644+0200 W ASIO [main] No TransportLayer configured during NetworkInterface startup
2020-07-07T13:19:43.644+0200 I CONTROL [initandlisten] MongoDB starting : pid=23119 port=27017 dbpath=/data/db 64-bit host=dasco-UX32VD
2020-07-07T13:19:43.645+0200 I CONTROL [initandlisten] db version v4.2.8
2020-07-07T13:19:43.645+0200 I CONTROL [initandlisten] git version: 43d25964249164d76d5e04dd6cf38f6111e21f5f
2020-07-07T13:19:43.645+0200 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.1.1 11 Sep 2018
2020-07-07T13:19:43.645+0200 I CONTROL [initandlisten] allocator: tcmalloc
2020-07-07T13:19:43.645+0200 I CONTROL [initandlisten] modules: none
2020-07-07T13:19:43.645+0200 I CONTROL [initandlisten] build environment:
2020-07-07T13:19:43.645+0200 I CONTROL [initandlisten] distmod: ubuntu1804
2020-07-07T13:19:43.645+0200 I CONTROL [initandlisten] distarch: x86_64
2020-07-07T13:19:43.645+0200 I CONTROL [initandlisten] target_arch: x86_64
2020-07-07T13:19:43.645+0200 I CONTROL [initandlisten] options: {}
2020-07-07T13:19:43.645+0200 E NETWORK [initandlisten] Failed to unlink socket file /tmp/mongodb-27017.sock Operation not permitted
2020-07-07T13:19:43.645+0200 F - [initandlisten] Fatal Assertion 40486 at src/mongo/transport/transport_layer_asio.cpp 684
2020-07-07T13:19:43.645+0200 F - [initandlisten]
***aborting after fassert() failure
Finally, if I do:
# mongod --port 27018
Return
2020-07-07T13:24:57.906+0200 I STORAGE [initandlisten] exception in initAndListen: IllegalOperation: Attempted to create a lock file on a read-only directory: /data/db, terminating
2020-07-07T13:24:57.906+0200 I NETWORK [initandlisten] shutdown: going to close listening sockets...
2020-07-07T13:24:57.906+0200 I - [initandlisten] Stopping further Flow Control ticket acquisitions.
2020-07-07T13:24:57.906+0200 I CONTROL [initandlisten] now exiting
2020-07-07T13:24:57.906+0200 I CONTROL [initandlisten] shutting down with code:100
But /data/ it's ok
drwxr-xr-x 3 mongodb mongodb 4096 juil. 6 20:23 /data/db
And if I run sudo mongod , it doesn't work:
# sudo mongod
....
2020-07-07T13:27:51.499+0200 E STORAGE [initandlisten] Failed to set up listener: SocketException: Address already in use
2020-07-07T13:27:51.499+0200 I CONTROL [initandlisten] now exiting
2020-07-07T13:27:51.499+0200 I CONTROL [initandlisten] shutting down with code:48
# ls -la /tmp/
srwx------ 1 root root 0 juil. 7 13:27 mongodb-27017.sock
That change law
For finish if I do:
# sudo mongod --port 27018
I don't have a problem...
You have solution please?

Weird MongoDB login error after backend shut down

Yesterday, OVH services went down, so a backend of an app of my own stopped working completely. Today, I tried starting up my app to see if everything was ok, and I was glad to see that the backend is already working, but... my app didn't show any data.
So I connected via PuTTy to my VPS to see my Node app was correctly working. I saw in pm2 (process manager for Node) that my app's instance was perfectly online. But in the Parse logs, I could see this error:
{"message":"error getting auth for sessionToken","name":"MongoError" // more redundant error messages saying pretty much the same}
I could perfectly check that the current problem, is that my Node app can't connect the Mongo server, though the credentials are the same...
Some aclarations:
The app backend and the MongoDB are stored in the same VPS.
The Mongo credentials are the same; they didn't change at all.
Tried restarting the node instance, but it won't change anything.
So, what's going on? How can I restart the mongo services and try again? And in case I need it... how can I change my mongo credentials?
Thank you!
EDIT: When I write "mongod" (it's a mongo service, right?) I get the following unexpected error:
mongod --help for help and startup options
2017-11-10T12:21:56.933+0100 [initandlisten] MongoDB starting : pid=7255 port=27017 dbpath=/data/db 64-bit host=vps332549
2017-11-10T12:21:56.934+0100 [initandlisten] db version v2.6.10
2017-11-10T12:21:56.935+0100 [initandlisten] git version: nogitversion
2017-11-10T12:21:56.935+0100 [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016
2017-11-10T12:21:56.935+0100 [initandlisten] build info: Linux lgw01-12 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 BOOST_LIB_VERSION=1_58
2017-11-10T12:21:56.935+0100 [initandlisten] allocator: tcmalloc
2017-11-10T12:21:56.935+0100 [initandlisten] options: {}
2017-11-10T12:21:56.936+0100 [initandlisten] exception in initAndListen: 10296
*********************************************************************
ERROR: dbpath (/data/db) does not exist.
Create this directory or give existing directory in --dbpath.
See http://dochub.mongodb.org/core/startingandstoppingmongo
*********************************************************************
, terminating
2017-11-10T12:21:56.936+0100 [initandlisten] dbexit:
2017-11-10T12:21:56.936+0100 [initandlisten] shutdown: going to close listening sockets...
2017-11-10T12:21:56.936+0100 [initandlisten] shutdown: going to flush diaglog...
2017-11-10T12:21:56.936+0100 [initandlisten] shutdown: going to close sockets...
2017-11-10T12:21:56.936+0100 [initandlisten] shutdown: waiting for fs preallocator...
2017-11-10T12:21:56.936+0100 [initandlisten] shutdown: lock for final commit...
2017-11-10T12:21:56.936+0100 [initandlisten] shutdown: final commit...
2017-11-10T12:21:56.936+0100 [initandlisten] shutdown: closing all files...
2017-11-10T12:21:56.937+0100 [initandlisten] closeAllFiles() finished
2017-11-10T12:21:56.937+0100 [initandlisten] dbexit: really exiting now
EDIT:
Tried to do what the first answer said, though you can see here the result is not anywhere near good; the service just won't start, I don't know why. Also, how can I know where is my db root?
root#vps332549:~# service mongod status
● mongod.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
root#vps332549:~# service mongod restart
Failed to restart mongod.service: Unit mongod.service not found.
root#vps332549:~# mongod --dbpath=data/db/
2017-11-11T16:46:56.568+0100 [initandlisten] MongoDB starting : pid=6980 port=27017 dbpath=data/db/ 64-bit host=vps332549
2017-11-11T16:46:56.573+0100 [initandlisten] db version v2.6.10
2017-11-11T16:46:56.573+0100 [initandlisten] git version: nogitversion
2017-11-11T16:46:56.573+0100 [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016
2017-11-11T16:46:56.573+0100 [initandlisten] build info: Linux lgw01-12 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 BOOST_LIB_VERSION=1_58
2017-11-11T16:46:56.573+0100 [initandlisten] allocator: tcmalloc
2017-11-11T16:46:56.573+0100 [initandlisten] options: { storage: { dbPath: "data/db/" } }
2017-11-11T16:46:56.573+0100 [initandlisten] exception in initAndListen: 10296
*********************************************************************
ERROR: dbpath (data/db/) does not exist.
Create this directory or give existing directory in --dbpath.
See http://dochub.mongodb.org/core/startingandstoppingmongo
*********************************************************************
, terminating
2017-11-11T16:46:56.573+0100 [initandlisten] dbexit:
2017-11-11T16:46:56.573+0100 [initandlisten] shutdown: going to close listening sockets...
2017-11-11T16:46:56.573+0100 [initandlisten] shutdown: going to flush diaglog...
2017-11-11T16:46:56.573+0100 [initandlisten] shutdown: going to close sockets...
2017-11-11T16:46:56.573+0100 [initandlisten] shutdown: waiting for fs preallocator...
2017-11-11T16:46:56.573+0100 [initandlisten] shutdown: lock for final commit...
2017-11-11T16:46:56.574+0100 [initandlisten] shutdown: final commit...
2017-11-11T16:46:56.574+0100 [initandlisten] shutdown: closing all files...
2017-11-11T16:46:56.574+0100 [initandlisten] closeAllFiles() finished
2017-11-11T16:46:56.574+0100 [initandlisten] dbexit: really exiting now
root#vps332549:~# service mongod restart
Failed to restart mongod.service: Unit mongod.service not found.
root#vps332549:~# service mongod start
Failed to start mongod.service: Unit mongod.service not found.
root#vps332549:~#
If you have already set up mongod as a service, then you should be able to check if it is running or not:
$ service mongod status
If it is simply inactive, just restart your service:
# service mongod restart
If it is not registered as a service, then the mongod command expects a dbpath parameter:
$ mongod --dbpath=data/db/
where data/db/ is the path to the data directory of your database.

Cannot start mongo db

I have did the mongodb installation process mentioned in the following link https://docs.mongodb.com/manual/installation/ but i can't start the mongodb this is my log kindly tell me the possible way to start mongo db
C:\>"C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe"
2017-03-12T12:42:55.378+0530 I CONTROL [initandlisten] MongoDB starting : pid=5
400 port=27017 dbpath=C:\data\db\ 64-bit host=vimals
2017-03-12T12:42:55.379+0530 I CONTROL [initandlisten] targetMinOS: Windows 7/W
indows Server 2008 R2
2017-03-12T12:42:55.380+0530 I CONTROL [initandlisten] db version v3.4.2
2017-03-12T12:42:55.381+0530 I CONTROL [initandlisten] git version: 3f76e40c105
fc223b3e5aac3e20dcd026b83b38b
2017-03-12T12:42:55.382+0530 I CONTROL [initandlisten] OpenSSL version: OpenSSL
1.0.1u-fips 22 Sep 2016
2017-03-12T12:42:55.382+0530 I CONTROL [initandlisten] allocator: tcmalloc
2017-03-12T12:42:55.383+0530 I CONTROL [initandlisten] modules: enterprise
2017-03-12T12:42:55.384+0530 I CONTROL [initandlisten] build environment:
2017-03-12T12:42:55.385+0530 I CONTROL [initandlisten] distmod: windows-64
2017-03-12T12:42:55.385+0530 I CONTROL [initandlisten] distarch: x86_64
2017-03-12T12:42:55.386+0530 I CONTROL [initandlisten] target_arch: x86_64
2017-03-12T12:42:55.387+0530 I CONTROL [initandlisten] options: {}
2017-03-12T12:42:55.389+0530 I STORAGE [initandlisten] exception in initAndList
en: 98 Unable to create/open lock file: C:\data\db\mongod.lock The process canno
t access the file because it is being used by another process.. Is a mongod inst
ance already running?, terminating
2017-03-12T12:42:55.390+0530 I NETWORK [initandlisten] shutdown: going to close
listening sockets...
2017-03-12T12:42:55.390+0530 I NETWORK [initandlisten] shutdown: going to flush
diaglog...
2017-03-12T12:42:55.391+0530 I CONTROL [initandlisten] now exiting
2017-03-12T12:42:55.392+0530 I CONTROL [initandlisten] shutting down with code:
100
Looks as if your database file is locked by another process, did you try restarting the machine?
Just for notes.
In my case, after I create db with:
sudo mkdir -p /data/db
I also have to do this:
sudo chmod 777 /data/db
Then the environment is up for running by entering:
mongod
to enter the mongoldb shell.

Mongodb Upgrade issue

I have upgraded my MONGODB version from 2.6.7 to 3.0.3.
When I run following command
./mongod --dbpath database --storageEngine wiredTiger
getting output,
2015-10-19T14:47:04.936+0530 I CONTROL [initandlisten] MongoDB starting : pid=22642 port=27017 dbpath=database 64-bit host=inkilab-Vostro-2520
2015-10-19T14:47:04.937+0530 I CONTROL [initandlisten]
2015-10-19T14:47:04.937+0530 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2015-10-19T14:47:04.937+0530 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2015-10-19T14:47:04.937+0530 I CONTROL [initandlisten]
2015-10-19T14:47:04.937+0530 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2015-10-19T14:47:04.937+0530 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2015-10-19T14:47:04.937+0530 I CONTROL [initandlisten]
2015-10-19T14:47:04.937+0530 I CONTROL [initandlisten] db version v3.0.0
2015-10-19T14:47:04.937+0530 I CONTROL [initandlisten] git version: a841fd6394365954886924a35076691b4d149168
2015-10-19T14:47:04.937+0530 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1f 6 Jan 2014
2015-10-19T14:47:04.937+0530 I CONTROL [initandlisten] build info: Linux ip-10-179-177-12 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
2015-10-19T14:47:04.937+0530 I CONTROL [initandlisten] allocator: tcmalloc
2015-10-19T14:47:04.937+0530 I CONTROL [initandlisten] options: { storage: { dbPath: "database", engine: "wiredTiger" } }
2015-10-19T14:47:04.963+0530 E NETWORK [initandlisten] listen(): bind() failed errno:98 Address already in use for socket: 0.0.0.0:27017
2015-10-19T14:47:04.963+0530 E NETWORK [initandlisten] addr already in use
2015-10-19T14:47:05.203+0530 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=1G,session_max=20000,eviction=(threads_max=4),statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2015-10-19T14:47:27.542+0530 I CONTROL [initandlisten] now exiting
2015-10-19T14:47:27.543+0530 I NETWORK [initandlisten] shutdown: going to close listening sockets...
2015-10-19T14:47:27.543+0530 I NETWORK [initandlisten] shutdown: going to flush diaglog...
2015-10-19T14:47:27.543+0530 I NETWORK [initandlisten] shutdown: going to close sockets...
2015-10-19T14:47:27.600+0530 I STORAGE [initandlisten] WiredTigerKVEngine shutting down
2015-10-19T14:47:49.491+0530 I STORAGE [initandlisten] shutdown: removing fs lock...
2015-10-19T14:47:49.518+0530 I CONTROL [initandlisten] dbexit: rc: 48
Please help me.
The bindIp error indicates you already have a service running on the default port. In order to override, you must first stop or delete the service and start the mongod again.
In order to kill the services on the default port, you can try the following commands:
ps -eAf | grep mongo
This will give you current instances, if any of any service by name like "mongo", or interpret as service like 'mongo%'. Now you will have to kill the traces you have on the default port and this can be done using the kill command in shell. For help type:
man kill
Alternatively, you can start mongod on a new assigned port by using the -p or --port switch

Can't start mongodb on AWS instance

I have worked on mongodb database. I have installed this in my server & worked on this. But currently I am facing a problem. My mongodb database is not responding. When I am giving this command : mongo
MongoDB shell version: 2.6.10
connecting to: test
2015-07-02T06:22:11.363+0000 warning: Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2015-07-02T06:22:11.364+0000 Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146
exception: connect failed
I have already delete the lock file, then repair mongodb then restart mongodb. But cant solve my problem.
Here is my mongodb.log file:
2015-07-02T06:30:48.789+0000 [initandlisten] MongoDB starting : pid=5551 port=27017 dbpath=/var/lib/mongodb 64-bit host=ip-172-31-5-213
2015-07-02T06:30:48.789+0000 [initandlisten] db version v2.6.10
2015-07-02T06:30:48.789+0000 [initandlisten] git version: 5901dbfb49d16eaef6f2c2c50fba534d23ac7f6c
2015-07-02T06:30:48.789+0000 [initandlisten] build info: Linux build18.nj1.10gen.cc 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
2015-07-02T06:30:48.789+0000 [initandlisten] allocator: tcmalloc
2015-07-02T06:30:48.789+0000 [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "127.0.0.1" }, storage: { dbPath: "/var/lib/mongodb" }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log" } }
2015-07-02T06:30:48.800+0000 [initandlisten] journal dir=/var/lib/mongodb/journal
2015-07-02T06:30:48.800+0000 [initandlisten] recover : no journal files present, no recovery needed
2015-07-02T06:30:48.800+0000 [initandlisten]
2015-07-02T06:30:48.800+0000 [initandlisten] ERROR: Insufficient free space for journal files
2015-07-02T06:30:48.800+0000 [initandlisten] Please make at least 3379MB available in /var/lib/mongodb/journal or use --smallfiles
2015-07-02T06:30:48.800+0000 [initandlisten]
2015-07-02T06:30:48.800+0000 [initandlisten] exception in initAndListen: 15926 Insufficient free space for journals, terminating
2015-07-02T06:30:48.800+0000 [initandlisten] dbexit:
2015-07-02T06:30:48.800+0000 [initandlisten] shutdown: going to close listening sockets...
2015-07-02T06:30:48.800+0000 [initandlisten] shutdown: going to flush diaglog...
2015-07-02T06:30:48.800+0000 [initandlisten] shutdown: going to close sockets...
2015-07-02T06:30:48.800+0000 [initandlisten] shutdown: waiting for fs preallocator...
2015-07-02T06:30:48.800+0000 [initandlisten] shutdown: lock for final commit...
2015-07-02T06:30:48.801+0000 [initandlisten] shutdown: final commit...
2015-07-02T06:30:48.801+0000 [initandlisten] shutdown: closing all files...
2015-07-02T06:30:48.801+0000 [initandlisten] closeAllFiles() finished
2015-07-02T06:30:48.801+0000 [initandlisten] journalCleanup...
2015-07-02T06:30:48.801+0000 [initandlisten] removeJournalFiles
2015-07-02T06:30:48.802+0000 [initandlisten] shutdown: removing fs lock...
2015-07-02T06:30:48.803+0000 [initandlisten] dbexit: really exiting now
According to your mongodb.log file:
ERROR: Insufficient free space for journal files
Please make at least 3379MB available in /var/lib/mongodb/journal or use --smallfiles
You don't have enough disk space to start your MongoDB service. MongoDB fails to allocate disk space for its Journal Files.
I can see four possible solutions for your problem:
Add more disk space (cleanup something, or use larger storage). If you're using AWS, you could expand your EBS Storage Space keeping all existing data.
Reduce journal size using --smallfiles key or by setting storage.mmapv1.smallFiles to true.
Disable Journaling using --nojournal key or by setting storage.journal.enabled to false (not recommended).
Upgrade your MongoDB to 3.x and change your storage engine to WiredTiger, it'll reduce your overall database size and free some disk space. But you'll need additional disk space for data migration.
Error has been rised typically it was mongodb crash.
Solution :
sudo rm /var/lib/mongodb/mongod.lock
sudo service mongod restart
sudo service mongod stop
sudo service mongod start

Resources