Problems with starting Mongodb Server

Hello All.

I keep having problems starting my MongoDB server for the second lesson connect. For whatever I’m doing, it is able to pass through the “connect” challenge.

Here is my console output:

2017-04-13T11:49:23.115+0000 ** WARNING: --rest is specified without --httpinterface,
2017-04-13T11:49:23.115+0000 ** enabling http interface
warning: bind_ip of is unnecessary; listens on all ips by default
2017-04-13T11:49:23.118+0000 [initandlisten] MongoDB starting : pid=3497 port=27017 dbpath=data 64-bit host=njanne19-mongodb-4720625
2017-04-13T11:49:23.118+0000 [initandlisten] db version v2.6.12
2017-04-13T11:49:23.118+0000 [initandlisten] git version: d73c92b1c85703828b55c2916a5dd4ad46535f6a
2017-04-13T11:49:23.118+0000 [initandlisten] build info: Linux 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
2017-04-13T11:49:23.118+0000 [initandlisten] allocator: tcmalloc
2017-04-13T11:49:23.118+0000 [initandlisten] options: { net: { bindIp: “”, http: { RESTInterfaceEnabled: true, enabled: true } }, storage: { dbPath: “data”, journal: { enabled: false } } }
2017-04-13T11:49:23.123+0000 [initandlisten] allocating new ns file data/local.ns, filling with zeroes…
2017-04-13T11:49:23.189+0000 [FileAllocator] allocating new datafile data/local.0, filling with zeroes…
2017-04-13T11:49:23.189+0000 [FileAllocator] creating directory data/_tmp
2017-04-13T11:49:23.194+0000 [FileAllocator] done allocating datafile data/local.0, size: 64MB, took 0.001 secs
2017-04-13T11:49:23.194+0000 [initandlisten] build index on: local.startup_log properties: { v: 1, key: { _id: 1 }, name: “id”, ns: “local.startup_log” }
2017-04-13T11:49:23.194+0000 [initandlisten] added index to empty collection
2017-04-13T11:49:23.194+0000 [initandlisten] waiting for connections on port 27017
2017-04-13T11:49:23.195+0000 [websvr] admin web console waiting for connections on port 28017
2017-04-13T11:50:23.124+0000 [clientcursormon] mem (MB) res:47 virt:232
2017-04-13T11:50:23.124+0000 [clientcursormon] mapped:80
2017-04-13T11:50:23.124+0000 [clientcursormon] connections:0

I don’t see any errors or closed connections in your log. The problem might be in your environment file, you are possibly specifying an IP that doesn’t match the mongodb installation. For a thorough explanation about c9 you can check out this link

Thanks for the quick response, the error I’m getting back now in the “Find” challenge is that when it reads the code that says: var mongo = require('mongodb').MongoClient it throws the error “Cannot find module ‘mongodb’”. Do you know how I could fix this problem?

Have you installed the mongodb module with npm?

npm install --save mongodb

The fact that you have mongodb installed on your system does not mean you have the client installed on your app, so that could potentially be the problem.

I feel like such a moron. Thank you. (it worked)

1 Like

Not a moron, just a code lover XD