Git Product home page Git Product logo

mongodb's People

Contributors

boscomw avatar mgilbir avatar pilwon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mongodb's Issues

Exited (100) with ENV LANG

The container does not start when configure env LANG="en-US.UTF-8".

$ docker run -d -e "LANG=en_US.UTF-8" --name mongodb dockerfile/mongodb
$ docker ps -a
CONTAINER ID        IMAGE                                               COMMAND                CREATED             STATUS                        PORTS               NAMES
ea6e30400da3        dockerfile/mongodb:latest                           "mongod"               2 seconds ago       Exited (100) 2 seconds ago                        mongodb
$ docker version
Client version: 1.2.0
Client API version: 1.14
Go version (client): go1.3.1
Git commit (client): fa7b24f
OS/Arch (client): linux/amd64
Server version: 1.2.0
Server API version: 1.14
Go version (server): go1.3.1
Git commit (server): fa7b24f

$ docker images dockerfile/mongodb
REPOSITORY           TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
dockerfile/mongodb   latest              a0775ca89ae7        2 hours ago         710.7 MB

Insufficient free space for journal files

I'm having trouble starting the image on Ubuntu:

$ uname -r
3.13.0-30-generic
$ cat /etc/issue
Ubuntu 14.04 LTS \n \l

...though it runs fine in a boot2docker box for example.

$ docker run -d dockerfile/mongodb
76814a1501cc77df70283041143479a749a7ed9ffa46558e7dad00302374cdb8
$ docker logs 76814a1501cc77df70283041143479a749a7ed9ffa46558e7dad00302374cdb8
mongod --help for help and startup options
2014-07-15T12:59:41.035+0000 [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=76814a1501cc
2014-07-15T12:59:41.035+0000 [initandlisten] db version v2.6.1
2014-07-15T12:59:41.035+0000 [initandlisten] git version: 4b95b086d2374bdcfcdf2249272fb552c9c726e8
2014-07-15T12:59:41.035+0000 [initandlisten] build info: Linux build14.nj1.10gen.cc 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-07-15T12:59:41.035+0000 [initandlisten] allocator: tcmalloc
2014-07-15T12:59:41.036+0000 [initandlisten] options: {}
2014-07-15T12:59:41.089+0000 [initandlisten] journal dir=/data/db/journal
2014-07-15T12:59:41.089+0000 [initandlisten] recover : no journal files present, no recovery needed
2014-07-15T12:59:41.089+0000 [initandlisten]
2014-07-15T12:59:41.089+0000 [initandlisten] ERROR: Insufficient free space for journal files
2014-07-15T12:59:41.089+0000 [initandlisten] Please make at least 3379MB available in /data/db/journal or use --smallfiles
2014-07-15T12:59:41.090+0000 [initandlisten]
2014-07-15T12:59:41.090+0000 [initandlisten] exception in initAndListen: 15926 Insufficient free space for journals, terminating
2014-07-15T12:59:41.090+0000 [initandlisten] dbexit:
2014-07-15T12:59:41.090+0000 [initandlisten] shutdown: going to close listening sockets...
2014-07-15T12:59:41.090+0000 [initandlisten] shutdown: going to flush diaglog...
2014-07-15T12:59:41.091+0000 [initandlisten] shutdown: going to close sockets...
2014-07-15T12:59:41.091+0000 [initandlisten] shutdown: waiting for fs preallocator...
2014-07-15T12:59:41.091+0000 [initandlisten] shutdown: lock for final commit...
2014-07-15T12:59:41.091+0000 [initandlisten] shutdown: final commit...
2014-07-15T12:59:41.091+0000 [initandlisten] shutdown: closing all files...
2014-07-15T12:59:41.091+0000 [initandlisten] closeAllFiles() finished
2014-07-15T12:59:41.091+0000 [initandlisten] journalCleanup...
2014-07-15T12:59:41.092+0000 [initandlisten] removeJournalFiles
2014-07-15T12:59:41.122+0000 [initandlisten] shutdown: removing fs lock...
2014-07-15T12:59:41.122+0000 [initandlisten] dbexit: really exiting now

Any ideas? I was under the impression the default container virtual size limit was around 10 GB, though I'm having a hard time finding a source for that...

Failed to create symbolic link

Step 0 : FROM dockerfile/ubuntu
 ---> c0331f89a737
Step 1 : RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
 ---> Using cache
 ---> 8049766501d5
Step 2 : RUN echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/mongodb.list
 ---> Using cache
 ---> 7d18b721a90e
Step 3 : RUN dpkg-divert --local --rename --add /sbin/initctl
 ---> Using cache
 ---> fad360772601
Step 4 : RUN ln -s /bin/true /sbin/initctl
 ---> Running in f01aa2756e50
ln: failed to create symbolic link `/sbin/initctl': File exists
2014/04/22 05:45:57 The command [/bin/sh -c ln -s /bin/true /sbin/initctl] returned a non-zero code: 1

Step 4 could not be completed, the file `/sbin/initctl exists. I tried omitting these two steps but it started complaining about init.d scripts. Any ideas?

Cheers!

Container will not run

When attempting to run docker run -d -p 27017:27017 dockerfile/mongodb I receive "Invalid command: bash" error with an output of general options. Output from docker version:

Client version: 0.11.1
Client API version: 1.11
Go version (client): go1.2.1
Git commit (client): fb99f99
Server version: 0.11.1
Server API version: 1.11
Git commit (server): fb99f99
Go version (server): go1.2.1
Last stable version: 0.11.1

Offer a lightweight Alpine image

The image of the current MongoDB is 402 MB.
Maybe an alternative image latest image based on Alpine could totally make sense.

Can't connect from OS X using Robomongo

Also I ran VBoxManage modifyvm "boot2docker-vm" --natpf1 "guestmongodb,tcp,127.0.0.1,27017,,27017", I can't connect to the MongoDb instance using RoboMongo running on the host.
I tried localhost:27017, 127.0.0.1:27017 and 0.0.0.0:27017
I also restarted the boot2docker VM before trying to connect.

Image not found

I'm trying to pull the dockerfile/mongodb image but got this:

Pulling repository dockerfile/mongodb
FATA[0004] Error: image dockerfile/mongodb:latest not found

Respect container memory limits

Apologies if this isn't the best place for this issue.

I've noticed that with docker 17.12.0-ce and the mongo:3.4.1 image, memory limits imposed on the container are not "respected" by mongo. What I mean by this is that mongo seems to not recognize the memory limit and tries to use the full memory of the host system.

This leads to bad things happening when memory fills up - mongo starts spilling into swap and performance slows to a crawl.

I would rather not give mongo unrestricted access to the host's memory, or be forced to periodically kill mongod.

I considered explicitly limiting the cache size for WiredTiger, but that's no good because the file-system cache is still unbounded.

Any ideas for a workaround?

Custom entrypoint - loosing environment variables

I'm trying to create a custom docker compose where I'm going to execute custom commands before starting mongod. However if I add the entry point the environment variables are no longer picked up! Not sure why this is happening?

 mongo:
    image: mongo:4.4
    volumes:
      - ./data/mongo:/data/db
    environment:
      MONGO_INITDB_DATABASE: ${MONGO_DATABASE}
      MONGO_INITDB_ROOT_USERNAME: ${MONGO_USERNAME}
      MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
    restart: unless-stopped
    entrypoint: >
      /bin/sh -c "
      mongod
      "

docker mongoldb with boot2docker-vm

I tried setting up the NAT port forwarding setup as per your command using the VBoxManage and I still get the following errors.

I have a symbolic link in my / and my mongoldb is located in /usr/local/mongodb/data/db

docker-compose.yml contains the following
mongo:
image: mongo
volumes:
- /usr/local/mongodb/data/db:/data/db
ports:
- "27017:27017"

I'm still getting the below error.

mongo_1 | chown: changing ownership of '/data/db/_mdb_catalog.wt': Operation not permitted mongo_1 | chown: changing ownership of '/data/db/diagnostic.data/metrics.2016-10-13T01-07-35Z-00000': Operation not permitted mongo_1 | chown: changing ownership of '/data/db/diagnostic.data/metrics.2016-10-18T16-17-12Z-00000': Operation not permitted mongo_1 | chown: changing ownership of '/data/db/diagnostic.data/metrics.2017-04-02T03-08-02Z-00000': Operation not permitted mongo_1 | chown: changing ownership of '/data/db/diagnostic.data/metrics.2017-04-02T03-15-21Z-00000': Operation not permitted mongo_1 | chown: changing ownership of '/data/db/diagnostic.data': Operation not permitted mongo_1 | chown: changing ownership of '/data/db/journal/WiredTigerLog.0000000004': Operation not permitted mongo_1 | chown: changing ownership of '/data/db/journal/WiredTigerPreplog.0000000001': Operation not permitted mongo_1 | chown: changing ownership of '/data/db/journal/WiredTigerPreplog.0000000002': Operation not permitted mongo_1 | chown: changing ownership of '/data/db/journal': Operation not permitted mongo_1 | chown: changing ownership of '/data/db/local/collection-0--8592570065685910789.wt': Operation not permitted mongo_1 | chown: changing ownership of '/data/db/local/index-1--8592570065685910789.wt': Operation not permitted mongo_1 | chown: changing ownership of '/data/db/local': Operation not permitted mongo_1 | chown: changing ownership of '/data/db/mongod.lock': Operation not permitted mongo_1 | chown: changing ownership of '/data/db/sizeStorer.wt': Operation not permitted mongo_1 | chown: changing ownership of '/data/db/storage.bson': Operation not permitted mongo_1 | chown: changing ownership of '/data/db/WiredTiger': Operation not permitted mongo_1 | chown: changing ownership of '/data/db/WiredTiger.lock': Operation not permitted mongo_1 | chown: changing ownership of '/data/db/WiredTiger.turtle': Operation not permitted mongo_1 | chown: changing ownership of '/data/db/WiredTiger.wt': Operation not permitted mongo_1 | chown: changing ownership of '/data/db/WiredTigerLAS.wt': Operation not permitted mongo_1 | chown: changing ownership of '/data/db': Operation not permitted

Run mongo

This is creating a new mongod instance, how do I connect in the mongo shell? (boot2docker)
docker run -it --rm --link mongodb:mongodb dockerfile/mongodb bash -c 'mongo --host mongodb'

How to add data to the mongodb

Hi, how do i add data files to the mongodb from my local machine.
Now i have data in my local machine and want to add that data to mongodb through dockerfile.

for ex: if i want to copy some project/war file to tomcat, we do following in the the tomcat docker file
COPY ./soucefile/ ./destination/

Likewise, how do i add data to mongodb via docker file

Thanks,
Krishna P

repository dockerfile/mongodb not found: does not exist or no pull access

I'm still getting this error when trying to pull from the public registry:

$ docker pull dockerfile/mongodb
Error response from daemon: repository dockerfile/mongodb not found: does not exist or no pull access

I tried updating docker client on my mac:

Version 17.06.1-ce-mac24 (18950)
Channel: stable
54dc09c3e3

I've tried removing credsStore from config.json. Logging in and out of docker. Even deleting my config file entirely.

The weird thing is that I'm able to pull from my own registries just fine.

docker pull coreyleoc/docker-amazon-dash-button-hack:latest

I'm new to docker, so excuse me if I'm missing something obvious. Is there something special I need to do to be able to pull from this docker hub registry?

Upgrade build to include 2.6.4 release

Hi,

From Docker Hub build history [1], it seems that this trusted build has not been updated to lastest release in 2.6.x series (which is 2.6.4 as of now). It would be great to trigger a rebuild of this recipe so that latest Debian package is used.

PS: For sake of readability, maybe it would be great to force version inside apt-get instruction and always push a tagged version in Docker Hub.

[1] https://registry.hub.docker.com/u/dockerfile/mongodb/builds_history/6862/

bug: can't build image from Dockerfile

Looks building from the Dockerfile fails:

Step 0 : FROM dockerfile/ubuntu
Pulling repository dockerfile/ubuntu
1f089cc15e82: Download complete
511136ea3c5a: Download complete
5e66087f3ffe: Download complete
4d26dd3ebc1c: Download complete
d4010efcfd86: Download complete
99ec81b80c55: Download complete
b261bc65cd23: Download complete
42404685406e: Download complete
6cc69450fe19: Download complete
efc4fbcd007f: Download complete
2baeb2edbf92: Download complete
ecd5c1cc18ac: Download complete
 ---> 1f089cc15e82
Step 1 : RUN  apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 &&  echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/mongodb.list &&  apt-get update &&  apt-get install -y mongodb-org &&  mkdir -p /data/db
 ---> Running in 1cde82292dbc
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.5IXdKbHMCB --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
gpg: requesting key 7F0CEB10 from hkp server keyserver.ubuntu.com
?: keyserver.ubuntu.com: Host not found
gpgkeys: HTTP fetch error 7: couldn't connect: Success
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
2014/06/18 16:06:11 The command [/bin/sh -c apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 &&  echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/mongodb.list &&  apt-get update &&  apt-get install -y mongodb-org &&  mkdir -p /data/db] returned a non-zero code: 2

-v <src>/db:/data/db Gives odd results

When I try to mount my host directory as a volume, it doesn't seem to do anything; that's when one gets the not enough space error.

I then tried this -v <src>/db:/data/db2 to see what would happen, and the /data/db directory was blank, but suddenly /data/db2 had journal files in it... although it didn't attach back to my host.

I then tried -v <src>/db/:/foo to see if it was merely globbing the /data directory -- now to my surprise the journal files appeared in /foo. That was unexpected, as the documentation seems to imply the MongoDB instance will be looking in /data/db (and whatever was mapped there), rather than where the volume was mounted.

Cannot connect to server

I set it up using docker pull dockerfile/mongodb

Then I start it up with docker run -d -p 27017:27017 -p 28017:28017 dockerfile/mongodb --rest

But when I run docker run -i -rm -t -entrypoint="mongo" dockerfile/mongodb
it throw following error

MongoDB shell version: 2.4.9
connecting to: test
Mon Mar 10 04:14:40.180 Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145
exception: connect failed

[error] client.go:2245 Couldn't send EOF: use of closed network connection

Is this a bug or I'm doing something wrong?

Insufficient free space for journal files with symlink

I symlinked the var lib mongodb to a drive with space

sudo mkdir -p /mnt/newdrive2/var/lib/mongodb/journal
sudo rm -rf /var/lib/mongodb/*
sudo ln -s /var/lib/mongodb/ /mnt/newdrive2/var/lib/mongodb/
sudo /etc/init.d/mongodb restart

yet it still complains:

Sun Oct 25 07:28:29.066 [initandlisten] journal dir=/var/lib/mongodb/journal
Sun Oct 25 07:28:29.066 [initandlisten] recover : no journal files present, no recovery needed
Sun Oct 25 07:28:29.066 [initandlisten] 
Sun Oct 25 07:28:29.066 [initandlisten] ERROR: Insufficient free space for journal files
Sun Oct 25 07:28:29.066 [initandlisten] Please make at least 3379MB available in /var/lib/mongodb/journal or use --smallfiles

Cannot start service db: driver failed programming external connectivity on endpoint

docker-compose up
Starting ltg_db_1

ERROR: for db Cannot start service db: driver failed programming external connectivity on endpoint ltg_db_1 (dd305d77ebeb0230dadf14dbf27db439306944826ccb3650b7e0956945fb23c5): Error starting userland proxy: Bind for 0.0.0.0:27017 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.

Error 404

while doing
sudo docker pull dockerfile/mongodb

this output is given:
Pulling repository dockerfile/mongodb
HTTP code: 404

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.