mongo icon indicating copy to clipboard operation
mongo copied to clipboard

Exit code 100

Open jtmarmon opened this issue 11 years ago • 9 comments

My container is automatically exiting with error code 100 after sudo docker run -d -p 27017:27017 --name=mongo mongo.

OS stats:

NAME="Amazon Linux AMI"
VERSION="2014.09"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2014.09"
PRETTY_NAME="Amazon Linux AMI 2014.09"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2014.09:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"

jtmarmon avatar Jan 15 '15 17:01 jtmarmon

ah, this is resolved via the --smallfiles option

jtmarmon avatar Jan 15 '15 17:01 jtmarmon

Sadly it didn't help me. Any other options guys ? I run it via

docker run -p 127.0.0.1:27017:27017 --name mymongo -d mongo:3.1.6 --smallfiles

unoexperto avatar Aug 06 '15 22:08 unoexperto

Doesn't work for me either. Trying to run mongodb docker container in Windows 10. I'm using: docker run --name mongodb_svcrm -p 27017:27017 -v C:\Users\matt.moran\Documents\myproject\data\db:/data/db -d mongo --smallfiles docker ps -a shows it exits with code 100. There's plenty of disk space in the host system for journals. Any idea why this is happening?

MattMoranJava avatar May 22 '17 10:05 MattMoranJava

@MattMoranJava for Docker on Windows, see https://github.com/docker-library/mongo/issues/107#issuecomment-245690331

yosifkit avatar May 22 '17 19:05 yosifkit

try to make the whole data directory as a volume instead of

volumes: - ./data/db:/data/db

try volumes: - ./data:/data

it works for me.

m-amr avatar Aug 20 '17 17:08 m-amr

Since the Dockerfile defines a volume on /data/db, if you only mount /data you will not be keeping your data. If you check our data folder on your host, you'll see that it has a db subdirectory, but it should be empty, because it's in a separate volume.

tianon avatar Aug 21 '17 22:08 tianon

@tianon you are right this doesn't solve the problem.

m-amr avatar Aug 21 '17 22:08 m-amr

So are there any solutions to this? Should directory mounting work with mongo:windowsservercore image?

aorlenko avatar Sep 13 '17 13:09 aorlenko

@aorlenko, current solutions are to mount a folder from the VM (https://github.com/docker-library/mongo/issues/74#issuecomment-172675750) or use a named volume (https://github.com/docker-library/mongo/issues/74#issuecomment-238918488).

Yes, the windowsservercore images work just fine if you are using windows containers:

PS C:\Users\Docker\docker> docker run -d --name mongo -v C:\Users\Docker\docker\mongo-data:C:\data\db mongo:3.4-windowsservercore
PS C:\Users\Docker\docker> ls .\mongo-data\


    Directory: C:\Users\Docker\docker\mongo-data


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        9/13/2017   2:30 PM                diagnostic.data
d-----        9/13/2017   2:30 PM                journal
-a----        9/13/2017   2:30 PM          16384 collection-0--6462546833303440715.wt
-a----        9/13/2017   2:30 PM          16384 collection-2--6462546833303440715.wt
-a----        9/13/2017   2:30 PM          16384 index-1--6462546833303440715.wt
-a----        9/13/2017   2:30 PM          16384 index-3--6462546833303440715.wt
-a----        9/13/2017   2:30 PM          16384 index-4--6462546833303440715.wt
-a----        9/13/2017   2:30 PM              0 mongod.lock
-a----        9/13/2017   2:30 PM          16384 sizeStorer.wt
-a----        9/13/2017   2:30 PM             95 storage.bson
-a----        9/13/2017   2:30 PM             49 WiredTiger
-a----        9/13/2017   2:30 PM             21 WiredTiger.lock
-a----        9/13/2017   2:30 PM            986 WiredTiger.turtle
-a----        9/13/2017   2:30 PM          24576 WiredTiger.wt
-a----        9/13/2017   2:30 PM           4096 WiredTigerLAS.wt
-a----        9/13/2017   2:30 PM          16384 _mdb_catalog.wt


PS C:\Users\Docker\docker>

yosifkit avatar Sep 13 '17 21:09 yosifkit