Mongo running in linux container, stop taking connection.

I am running MongoDB inside the Docker, a linux container. Based on this Dockerfile.

I am using the latest mongo release, 2.6.4 installed on Ubuntu 14.04 64bits. I am able to start the mongod, I do have a /data/db folder in the container and the host machine ( even used as mounted folder, it is there in host machine. ). Do have enough memory, but I was getting errors.

  • Which device Docker Container writing to?
  • Unable to run Docker within another Docker container
  • How to config the marathon-lb when the container run in HOST network?
  • How to build and run a java instance in Docker
  • How to Increase number of cpus on Docker
  • Trying to send messages between Docker containers using rabbitmq
  • From the logs below, you could clear tell that I am trying to connect the db twice, the connection won’t be open for some reasons. Someone could help me?

    Note: the machine only have git and mongo installed. Do mongo need anything else as dependencies?

    2014-09-04T05:14:50.645+0000 [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=f00d8205ca65
    2014-09-04T05:14:50.645+0000 [initandlisten] db version v2.6.4
    2014-09-04T05:14:50.645+0000 [initandlisten] git version: 3a830be0eb92d772aa855ebb711ac91d658ee910
    2014-09-04T05:14:50.645+0000 [initandlisten] build info: Linux 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
    2014-09-04T05:14:50.645+0000 [initandlisten] allocator: tcmalloc
    2014-09-04T05:14:50.646+0000 [initandlisten] options: {}
    2014-09-04T05:14:50.648+0000 [initandlisten] journal dir=/data/db/journal
    2014-09-04T05:14:50.648+0000 [initandlisten] recover : no journal files present, no recovery needed
    2014-09-04T05:14:50.703+0000 [FileAllocator] allocating new datafile /data/db/local.ns, filling with zeroes...
    2014-09-04T05:14:50.703+0000 [FileAllocator] creating directory /data/db/_tmp
    2014-09-04T05:14:50.705+0000 [FileAllocator] done allocating datafile /data/db/local.ns, size: 16MB,  took 0 secs
    2014-09-04T05:14:50.708+0000 [FileAllocator] allocating new datafile /data/db/local.0, filling with zeroes...
    2014-09-04T05:14:50.709+0000 [FileAllocator] done allocating datafile /data/db/local.0, size: 64MB,  took 0.001 secs
    2014-09-04T05:14:50.711+0000 [initandlisten] build index on: local.startup_log properties: { v: 1, key: { _id: 1 }, name: "_id_", ns: "local.startup_log" }
    2014-09-04T05:14:50.711+0000 [initandlisten]     added index to empty collection
    2014-09-04T05:14:50.712+0000 [initandlisten] waiting for connections on port 27017
    2014-09-04T05:15:50.721+0000 [clientcursormon] mem (MB) res:36 virt:341
    2014-09-04T05:15:50.721+0000 [clientcursormon]  mapped (incl journal view):160
    2014-09-04T05:15:50.721+0000 [clientcursormon]  connections:0
    2014-09-04T05:15:57.976+0000 [initandlisten] connection accepted from #1 (1 connection now open)
    2014-09-04T05:15:57.976+0000 [conn1] end connection (0 connections now open)

    Someone said it could be less memory to run mongo. after running the momery check, I do still have a good amount of memory to run Mongo.

    [ root@512ea0e1096b:/data ]$ free -m
                 total       used       free     shared    buffers     cached
    Mem:          2001        436       1564          0         24        276
    -/+ buffers/cache:        136       1865
    Swap:         2991          0       2991

  • AWS ECS volumes do not share any files
  • docker: how to do/setup networking container-to-host for udp / snmp
  • Docker local registry : push fails
  • Unable to connect the client to the server using Docker COntainers
  • Cannot connect to redis running as container with boot2docker
  • PyCharm add remote Python interpreter inside the Docker
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.