Unable to connect Mongo

296 views
Skip to first unread message

Ramesh T

unread,
Apr 3, 2015, 11:12:43 AM4/3/15
to mongod...@googlegroups.com
When try to mongodb server
using 
$mongo

its return connection refused..
$mongod --dbpath /home/username/data/db

it's return attached error

So,My Question is How to use "small files" in mongodb for insufficient data problem.

if you look at the attached got my point.

I'm using OS Uninx 14.0 and mongodb version is V3

I need it

error.png

Ramesh T

unread,
Apr 3, 2015, 12:11:03 PM4/3/15
to mongod...@googlegroups.com
I'm running unix on Vbox

Will Berkeley

unread,
Apr 3, 2015, 2:17:58 PM4/3/15
to mongod...@googlegroups.com
Have you tried running mongod --smallfiles plus your other options? I can't see how you are running mongod because your screenshot clips off pretty much everything. Can you please post the lines from the log and the command you used to start mongod, instead of a cropped screenshot? 

The underlying problem is that you do not have enough disk space to run without --smallfiles. Is this just a personal / development environment? If not, you shouldn't run with --smallfiles and you'll need to seek other solutions, like using a different volume or freeing up space on the current one.

-Will
Message has been deleted
Message has been deleted
Message has been deleted

Ramesh T

unread,
Apr 4, 2015, 2:26:28 AM4/4/15
to mongod...@googlegroups.com


On Saturday, April 4, 2015 at 11:47:48 AM UTC+5:30, Ramesh T wrote:


On Friday, April 3, 2015 at 11:47:58 PM UTC+5:30, Will Berkeley wrote:
Have you tried running mongod --smallfiles plus your other options?

**************
I Ran Follwing commands
ramesh@ramesh-VirtualBox:~$ mongo --smallfiles /home/ramesh/data/db

Error parsing command line: unknown option smallfiles
try 'mongo --help' for more information



ramesh@ramesh-VirtualBox:~$ mongo --config /etc/mongodb.conf --smallfiles=true

Error parsing command line: unknown option config
try 'mongo --help' for more information

For this Insufficient I deleted logs 
Using following Command
--sudo find /var/log/ -delete

The underlying problem is that you do not have enough disk space to run without --smallfiles.
 
it deleted all logs
when I had  deleted logs also return  Insufficient free space for journals and 
I googled but No Luck..One thing I got it

Storage: 
          smallfile:true
But,I am using Mongodb V3..
On Unix In Config file there is no smallfile we need to add it to mongodb.config......?


*****************************************************************************************************************************************



 
I can't see how you are running mongod because your screenshot clips off pretty much everything. Can you please post the lines from the log and the command you used to start mongod, instead of a cropped screenshot? 



ramesh@ramesh-VirtualBox:~$ mongo

MongoDB shell version: 3.0.1
connecting to: test
2015-04-04T07:21:19.584+0530 W NETWORK  Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2015-04-04T07:21:19.587+0530 E QUERY    Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed
    at connect (src/mongo/shell/mongo.js:179:14)
    at (connect):1:6 at src/mongo/shell/mongo.js:179
exception: connect failed

I tried With Mongod

ramesh@ramesh-VirtualBox:~$ mongod


2015-04-04T07:21:23.607+0530 I STORAGE  [initandlisten] exception in initAndListen: 29 Data directory /data/db not found., terminating
2015-04-04T07:21:23.607+0530 I CONTROL  [initandlisten] dbexit:  rc: 100

For DATA/DB
I Created Following way..
ramesh@ramesh-VirtualBox:~$ mkdir /home/ramesh/data


ramesh@ramesh-VirtualBox:~$ mkdir /home/ramesh/data/db


ramesh@ramesh-VirtualBox:~$  mongod -dbpath /home/ramesh/data/db

2015-04-04T07:23:35.385+0530 I JOURNAL  [initandlisten] journal dir=/home/ramesh/data/db/journal
2015-04-04T07:23:35.387+0530 I JOURNAL  [initandlisten] recover : no journal files present, no recovery needed
2015-04-04T07:23:35.387+0530 I JOURNAL  [initandlisten] 
2015-04-04T07:23:35.387+0530 E JOURNAL  [initandlisten] Insufficient free space for journal files
2015-04-04T07:23:35.387+0530 I JOURNAL  [initandlisten] Please make at least 3379MB available in /home/ramesh/data/db/journal or use --smallfiles
2015-04-04T07:23:35.387+0530 I JOURNAL  [initandlisten] 
2015-04-04T07:23:35.387+0530 I STORAGE  [initandlisten] exception in initAndListen: 15926 Insufficient free space for journals, terminating
2015-04-04T07:23:35.387+0530 I CONTROL  [initandlisten] now exiting
2015-04-04T07:23:35.387+0530 I NETWORK  [initandlisten] shutdown: going to close listening sockets...
2015-04-04T07:23:35.387+0530 I NETWORK  [initandlisten] shutdown: going to flush diaglog...
2015-04-04T07:23:35.387+0530 I NETWORK  [initandlisten] shutdown: going to close sockets...
2015-04-04T07:23:35.387+0530 I STORAGE  [initandlisten] shutdown: waiting for fs preallocator...
2015-04-04T07:23:35.387+0530 I STORAGE  [initandlisten] shutdown: final commit...
2015-04-04T07:23:35.387+0530 I STORAGE  [initandlisten] shutdown: closing all files...
2015-04-04T07:23:35.387+0530 I STORAGE  [initandlisten] closeAllFiles() finished
2015-04-04T07:23:35.387+0530 I CONTROL  [initandlisten] dbexit:  rc: 100


When I ran 
$sudo mongod  --dbpath /var/lib/mongodb/data/db
same error insuf....


***************************************************************************************** 
Is this just a personal / development environment? If not, you shouldn't run with --smallfiles and you'll need to seek other solutions, like using a different volume or freeing up space on the current one.

Yes its personal,I installed ubuntu 14. on Vbox and On this Ubuntu I had installed Mongodb from command prompt.


FYI-I am new to Mongodb and Ubuntu..

Any Help  How to solve this On my personal environment........?
-Will
Reply all
Reply to author
Forward
0 new messages