Docker MongoDB error : Can't call something

I have Dockerized MongoDB and trying to access it from another container running on the same host. But i am getting the following error on the container:

com.mongodb.MongoException$Network: can't call something : /
        at com.mongodb.DBApiLayer$MyCollection.__find(
        at com.mongodb.DB.command(
        at com.mongodb.DB.command(
        at com.mongodb.DB.command(
        at com.mongodb.DB.command(
        at com.mmi.epg.utils.MongoDB.getDbVersion(
        at com.mmi.epg.utils.MongoDB.<init>(
        at com.mmi.epg.utils.MongoDB.getInstance(
Caused by:
        at com.mongodb.Response.<init>(
        at com.mongodb.DBPort.go(
        ... 13 more

Where fcdfd39baedb is the service container which access the mongoDB. I have this line in mongod.conf.

  • Dockerfile for tomcat
  • Push access during gitlab ci process
  • Managing multiple GPUs with multiple users
  • dockerfile - Unable to connect error
  • Docker compose file memory, cpu limits
  • what is a best way to store data in docker?
  • #bind_ip=

    Why did the service use an Internal IP address and had container ID before that to call MongoDB instance ? Am i doing something wrong here ?

    Update: Please find my Dockerfile below

    FROM tveuser/tve-repository:tve-centos
    MAINTAINER karthik.jayaraman ""
    VOLUME ["/data/db"]
    # Expose port #27017 from the container to the host
    EXPOSE 27017
    ADD /scripts/mongodb.repo /etc/yum.repos.d/
    ADD /conf/mongod.conf /etc/
    ADD supervisord.conf /etc/
    RUN yum install -y mongo-10gen mongo-10gen-server &&\
        mkdir -p /data/db
    CMD supervisord -c /etc/supervisord.conf


    I have updated my question. I could telnet the IP and Port number from my service but unable to connect to MongoDB. Would appreciate some help.

  • how to change MTU inside docker container on ubuntu 14.4
  • Unable to ping docker container
  • Docker on EC2, RUN command in dockerfile not reading environment variable
  • Link docker-compose to local docker daemon
  • How to install docker-engine 1.13 on debian Jessie
  • No /var/run/docker.sock on OS X
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.