Question

MEAN One click installation problem with Mongodb

I have just deployed my first droplet using MEAN one click installation. Droplet started off fine and connected with SSH. Now when I try to start the example app as given in the tutorial, it fails to start because it is unable to connect to mongodb. Here is the error log:

+ Important warning: config.domain is empty. It should be set to the fully qualified domain of the app.
Could not connect to MongoDB!
{ MongoError: failed to connect to server [localhost:27017] on first connect
    at Pool.<anonymous> (/opt/mean/node_modules/mongoose/node_modules/mongodb-core/lib/topologies/server.js:313:35)
    at emitOne (events.js:96:13)
    at Pool.emit (events.js:188:7)
    at Connection.<anonymous> (/opt/mean/node_modules/mongoose/node_modules/mongodb-core/lib/connection/pool.js:271:12)
    at Connection.g (events.js:291:16)
    at emitTwo (events.js:106:13)
    at Connection.emit (events.js:191:7)
    at Socket.<anonymous> (/opt/mean/node_modules/mongoose/node_modules/mongodb-core/lib/connection/connection.js:165:49)
    at Socket.g (events.js:291:16)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at emitErrorNT (net.js:1278:8)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
  name: 'MongoError',
  message: 'failed to connect to server [localhost:27017] on first connect' }
/usr/bin/nodejs[3525]: ../src/debug-agent.cc:149:void node::debugger::Agent::Stop(): Assertion `(err) == (0)' failed.
 1: node::Abort() [node]
 2: node::Assert(char const* const (*) [4]) [node]
 3: 0x10c1bc2 [node]
 4: node::debugger::Agent::~Agent() [node]
 5: node::Start(int, char**) [node]
 6: __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 7: _start [node]
Aborted (core dumped)
[16:12:37] [nodemon] app crashed - waiting for file changes before starting...code

Isn’t MongoDB supposed to be installed out of the box? What am I missing here?

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Seems this is not fixed yet

Hi @KodeBlox

I just tried spinning up a MEAN 16.04 droplet and I’m getting the same error. Actually it seems like MongoDB is not installed, which means the initialization script also fails (/var/lib/cloud/scripts/per-once/002-mongodb)

Can you create a ticket under Support in the control panel? You can link to this thread.