Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Docker/mongo issue #822

Closed
dalikman opened this issue Dec 8, 2017 · 5 comments
Closed

Docker/mongo issue #822

dalikman opened this issue Dec 8, 2017 · 5 comments

Comments

@dalikman
Copy link

dalikman commented Dec 8, 2017

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

@dalikman
Copy link
Author

dalikman commented Dec 8, 2017

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

@dextervip
Copy link

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

@fasouto
Copy link

fasouto commented Dec 9, 2017

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

@dextervip
Copy link

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

@fasouto
Copy link

fasouto commented Dec 12, 2017

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants