Zenbot: Error: must pass a node-mongodb-native db with backend_options.db

Created on 9 Dec 2017  路  6Comments  路  Source: DeviaVir/zenbot

Full Error:

Peter@Peters-MacBook-Pro:10:42 AM zenbot $ zenbot trade --paper
warning: mongodb not accessible. some features (such as backfilling/simulation) may be disabled.
/Users/Peter/repos/zenbot/node_modules/sosa_mongo/mongo_backend.js:6
  if (!backend_options.db) throw new Error('must pass a node-mongodb-native db with backend_options.db');
                           ^

Error: must pass a node-mongodb-native db with backend_options.db
    at module.exports (/Users/Peter/repos/zenbot/node_modules/sosa_mongo/mongo_backend.js:6:34)
    at /Users/Peter/repos/zenbot/node_modules/sosa/index.js:7:17
    at createCollection (/Users/Peter/repos/zenbot/db/createCollection.js:5:7)
    at Object.container (/Users/Peter/repos/zenbot/db/sessions.js:2:36)
    at Object.getValue (/Users/Peter/repos/zenbot/node_modules/codemap/index.js:298:22)
    at /Users/Peter/repos/zenbot/node_modules/codemap/index.js:238:23
    at Array.forEach (<anonymous>)
    at Object.get (/Users/Peter/repos/zenbot/node_modules/codemap/index.js:237:13)
    at get (/Users/Peter/repos/zenbot/node_modules/codemap/index.js:60:22)
    at Command.<anonymous> (/Users/Peter/repos/zenbot/commands/trade.js:319:24)
    at Command.listener (/Users/Peter/repos/zenbot/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:159:13)
    at Command.parseArgs (/Users/Peter/repos/zenbot/node_modules/commander/index.js:653:12)
    at Command.parse (/Users/Peter/repos/zenbot/node_modules/commander/index.js:475:21)
    at /Users/Peter/repos/zenbot/zenbot.js:39:11
    at /Users/Peter/repos/zenbot/boot.js:28:7
    at f (/Users/Peter/repos/zenbot/node_modules/once/once.js:25:25)
    at Glob.<anonymous> (/Users/Peter/repos/zenbot/node_modules/glob/glob.js:151:7)
    at Glob.emit (events.js:159:13)
    at Glob._finish (/Users/Peter/repos/zenbot/node_modules/glob/glob.js:197:8)
    at done (/Users/Peter/repos/zenbot/node_modules/glob/glob.js:182:14)
    at Glob._processGlobStar2 (/Users/Peter/repos/zenbot/node_modules/glob/glob.js:637:12)

My docker-compose.yml mongodb: command: is mongod --smallfiles --bind_ip_all

question

All 6 comments

Try image: mongo:3.4

it did nothing. If I run the command mongo, it gives me an error though.

MongoDB shell version v3.4.10
connecting to: mongodb://127.0.0.1:27017
2017-12-09T11:53:03.699-0500 W NETWORK  [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2017-12-09T11:53:03.701-0500 E QUERY    [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:237:13
@(connect):1:6
exception: connect failed

I modified docker-compose and set mongodb to mongod --blind_ip_all that worked.

i believe you mean --bind_ip_all, but yes, that fixes the issue.

Why was this closed? A solution was proposed that I already tried, which didn't fix my issue.

@reteps you have no mongo server running. Start a mongo server, try to connect to it using the mongo client, when that works, try zenbot again.

Or use docker-compose, whichever suits your needs better.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

asafyish picture asafyish  路  3Comments

michaelr524 picture michaelr524  路  3Comments

linuxu678 picture linuxu678  路  4Comments

MCrypto picture MCrypto  路  5Comments

KryptoNova picture KryptoNova  路  3Comments