2

I installed a VMWare Ubuntu 64-bit virtual machine and grunt with mongoDB.

Everything worked fine and one day when I typed "grunt serve" as always, I got:

Debugger listening on port 5858
Express server listening on 9000, in development mode

Running "wait" task
Waiting for server reload...
MongoDB connection error: MongoError: connect ECONNREFUSED 127.0.0.1:27017
Stopping Express server

After I typed mongod I got:

ERROR: Insufficient free space for journal files

I tried everything written in previous topics including reinstalling mongo and the whole VM. Adding --smallfiles in mongod.conf doesn't work as well. Also, when I type the df command the output suggests that I don't have any partition which is full.

df command output:

enter image description here

Hizqeel
  • 1,887
  • 28
  • 22
  • 24
sdd
  • 121
  • 3

2 Answers2

0

I suppose the MongoDB data directory is full. Please check the configuration file of MongoDB and find the data directory and see whether there is enough space in it.

Bidyut
  • 759
  • 7
  • 14
  • You're probably right. I checked the free space in my /data/db directory (as was written in the mongo.conf file) with du -sh and it says I have 81M available. After typing mongod the error message says I have to ensure at least 3000+ MB, so I guess this is indeed the problem. I see two files in this folder that are quite big, but I don't know whether it's safe to delete them: local.0 and local.ns – sdd Jul 15 '16 at 09:23
  • I deleted some old kernels and the 'Insufficient free space' message dissapered after i typed mongod, but grunt serve is still not working. The output of mongod now is: connections:0 – sdd Jul 15 '16 at 15:41
  • OK, so i can start mongo service and apparantely no one is waiting to connect. However, when I type sudo status mongodb I get: status: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused – sdd Jul 15 '16 at 16:07
  • Connection refused means it was not running. Try to perform ps -ef | grep mongod – Bidyut Jul 16 '16 at 04:47
0

Do you have apropriate rights to write to mongodb data directory - user which starts mongod has rights to write to mongodb data directory ?

iuuuuan
  • 224
  • 1
  • 5