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.

  • Cannot link to a running container started by docker-compose
  • Docker - Prometheus container dies immediatly
  • Container cannot be started from
  • Sorl4 failing to index when using EBS volume in ECS
  • How to place files on shared volume from within Dockerfile?
  • Troubleshoot docker connectivity to external network
  • #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.

  • Not able to switch my Docker's automatic build repository to a private repository for an Organisation
  • Can not connect nodes to docker swarm master (using zookeeper)
  • How to Install Hadoop slaves in docker make a master node on local computer to handle these slave nodes?
  • Docker unable to ping container from host
  • Is Docker for Mac Open Source? [closed]
  • Docker and HttpCallback
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.