Zenbot: Docker/mongo issue

Created on 8 Dec 2017  路  5Comments  路  Source: DeviaVir/zenbot

Hi,

Pulling my hair out on this one. Searched the issues here and on discord but still couldnt get to the bottom of it.

I'm trying to use docker compose to run zenbot and can't seem to get past an issue connecting to mongo.

I'm pretty sure I've followed the readme to the letter (of course always a high chance I have missed something obvious!).

The error I get when running docker compose up is Error: must pass a node-mongodb-native db with backend_options.db and warning: mongodb not accessible. some features (such as backfilling/simulation) may be disabled. (there is a bunch more but these lines seem the most relevant).

docker ps shows both the zenbot and mongodb containers running (well the zenbot one is continually restarting).

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                        PORTS               NAMES
86cf115a09a4        zenbot_server       "/usr/local/bin/no..."   46 seconds ago      Restarting (1) 1 second ago                       zenbot_server_1
ca2202f3ae4c        mongo:latest        "docker-entrypoint..."   46 seconds ago      Up 46 seconds                 27017/tcp           zenbot_mongodb_1

When I attach to the mongodb container I can see the mongodb process running in top and mongostat runs, but obviously shows no queries, etc...

insert query update delete getmore command dirty used flushes vsize   res qrw arw net_in net_out conn                time
    *0    *0     *0     *0       0     4|0  0.0% 0.0%       0  965M 71.0M 0|0 1|0   270b   53.1k    1 Dec  8 17:44:28.036
    *0    *0     *0     *0       0     1|0  0.0% 0.0%       0  965M 71.0M 0|0 1|0   157b   52.8k    1 Dec  8 17:44:29.036

Everything is vanilla, no edits to docker-compose.yml and conf.js is simply a copy of conf-sample.js.

Some additional troubleshooting I carried out was running a mongo-express container and linking it to the mongodb container. It also could not connect. Running and linking both manually using docker run however did work.

Any help much appreciated of course, and if any more info would be help, please ask.

Thanks!

Edit: should also add, running Ubuntu 16.04 LTS

bug question

Most helpful comment

I think we should lock mongodb version in docker-compose. what do you think guys?

All 5 comments

OK, I think I fixed my issue. Will try and explain in case someone else runs into it and searches here.

Found this when the mongo container was starting WARNING: This server is bound to localhost..

Fixed for now by changing the following in docker-compose.yml:

from command: mongod --smallfiles to command: mongod --smallfiles --bind_ip_all

I am getting the same issue since I pulled last images and commits. I will have a try

I've got the same issue and solved it with --bind-ip-all, thanks @dalikman . BTW this issue in the mongo Image might be relevant

I think we should lock mongodb version in docker-compose. what do you think guys?

the parameter --bind_ip_all was introduced in c4bb751eca537ca7dacac0d76b994c45f392186b , should we close this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

michaelr524 picture michaelr524  路  3Comments

timstoop picture timstoop  路  4Comments

bbusche picture bbusche  路  5Comments

DeviaVir picture DeviaVir  路  3Comments

joeswann picture joeswann  路  4Comments