-
Notifications
You must be signed in to change notification settings - Fork 649
Docker Image mongo:3.2 won't start because of Permission denied #154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I've got the same issue. docker run --name some-mongo mongo
cat /etc/redhat-release
uname -a
docker version
docker image inspect mongo [
{
"Id": "sha256:ffae984aa30cfde62ca06d127b65b5d37252b89ad407d0c2c632212d52ba58ca",
"RepoTags": [
"mongo:latest"
],
"RepoDigests": [
"mongo@sha256:e5a4f6caf4fb6773e41292b56308ed427692add67ffd7c655fdf11a78a72df4e"
],
"Parent": "",
"Comment": "",
"Created": "2017-03-21T18:27:48.94406564Z",
"Container": "2f4eef809837f7184b072d3536a2f71c16f41dcfb674fc52a1ef406de6a41313",
"ContainerConfig": {
"Hostname": "15ebb19d5ddb",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"27017/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"GOSU_VERSION=1.7",
"GPG_KEYS=0C49F3730359A14518585931BC711F9BA15703C6",
"MONGO_MAJOR=3.4",
"MONGO_VERSION=3.4.2",
"MONGO_PACKAGE=mongodb-org"
],
"Cmd": [
"/bin/sh",
"-c",
"#(nop) ",
"CMD [\"mongod\"]"
],
"ArgsEscaped": true,
"Image": "sha256:70f490c1f75d8b83fa78563bfcff681c16d77553ba0d4780c62a9008b2fee1b3",
"Volumes": {
"/data/configdb": {},
"/data/db": {}
},
"WorkingDir": "",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": [],
"Labels": {}
},
"DockerVersion": "1.12.6",
"Author": "",
"Config": {
"Hostname": "15ebb19d5ddb",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"27017/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"GOSU_VERSION=1.7",
"GPG_KEYS=0C49F3730359A14518585931BC711F9BA15703C6",
"MONGO_MAJOR=3.4",
"MONGO_VERSION=3.4.2",
"MONGO_PACKAGE=mongodb-org"
],
"Cmd": [
"mongod"
],
"ArgsEscaped": true,
"Image": "sha256:70f490c1f75d8b83fa78563bfcff681c16d77553ba0d4780c62a9008b2fee1b3",
"Volumes": {
"/data/configdb": {},
"/data/db": {}
},
"WorkingDir": "",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": [],
"Labels": {}
},
"Architecture": "amd64",
"Os": "linux",
"Size": 358964731,
"VirtualSize": 358964731,
"GraphDriver": {
"Name": "overlay",
"Data": {
"RootDir": "/var/lib/docker/overlay/a737e1148a57aed1362100567229e2ed1ad29dacbee93c84dceed1838fed64fc/root"
}
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:483da7fbbc1a693d269f42733de4b60db96a2157be65a100c0a0cfe002327ecc",
"sha256:144cfca37e38cadb4a046b24d4472bd2ca9f996e183fd97e6975428858f37dc0",
"sha256:92c7f3c3f729bdcc7226e10afe036607b5a6f9d2617cf329e604823d5d761b0e",
"sha256:0f58e2d21079e1914a74c107af538f2335935671756d237d75c182eb7ee3b360",
"sha256:29f5883477dbf074ea34ad109bf5819de47c53e64f0ab238d180b03c997365d3",
"sha256:a5fe28d6e759f4cce422f697978a7feab82c0027138f9a20098ae58d924b9b2b",
"sha256:2febb6f8ed4e89df5427ca30bd49c4538df865e15ed2e6bf6a1182c2dc69289f",
"sha256:0c1029e243e98b3e5547fb8a01e27f04336b14fc7fe23bd078a581a9b6a2b4e0",
"sha256:8b59e97d607e5d01fb5624cc3ac136f25b4a45c462c167b0b4220532b2c903bb",
"sha256:6a4ae0bc9ea79d78c2e9980a3956bf5ebc5095831f7b3fb1a2bc7b7e827b4163",
"sha256:96e178a2cc3f4b1295cf0b878ceda5526590066c17b76bd61c04ab8d9ea5746d"
]
}
}
] |
But not here. cat /etc/upstream-release/lsb-release
uname -a
docker version
docker image inspect mongo [
{
"Id": "sha256:ffae984aa30cfde62ca06d127b65b5d37252b89ad407d0c2c632212d52ba58ca",
"RepoTags": [
"mongo:latest"
],
"RepoDigests": [
"mongo@sha256:e5a4f6caf4fb6773e41292b56308ed427692add67ffd7c655fdf11a78a72df4e"
],
"Parent": "",
"Comment": "",
"Created": "2017-03-21T18:27:48.94406564Z",
"Container": "2f4eef809837f7184b072d3536a2f71c16f41dcfb674fc52a1ef406de6a41313",
"ContainerConfig": {
"Hostname": "15ebb19d5ddb",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"27017/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"GOSU_VERSION=1.7",
"GPG_KEYS=0C49F3730359A14518585931BC711F9BA15703C6",
"MONGO_MAJOR=3.4",
"MONGO_VERSION=3.4.2",
"MONGO_PACKAGE=mongodb-org"
],
"Cmd": [
"/bin/sh",
"-c",
"#(nop) ",
"CMD [\"mongod\"]"
],
"ArgsEscaped": true,
"Image": "sha256:70f490c1f75d8b83fa78563bfcff681c16d77553ba0d4780c62a9008b2fee1b3",
"Volumes": {
"/data/configdb": {},
"/data/db": {}
},
"WorkingDir": "",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": [],
"Labels": {}
},
"DockerVersion": "1.12.6",
"Author": "",
"Config": {
"Hostname": "15ebb19d5ddb",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"27017/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"GOSU_VERSION=1.7",
"GPG_KEYS=0C49F3730359A14518585931BC711F9BA15703C6",
"MONGO_MAJOR=3.4",
"MONGO_VERSION=3.4.2",
"MONGO_PACKAGE=mongodb-org"
],
"Cmd": [
"mongod"
],
"ArgsEscaped": true,
"Image": "sha256:70f490c1f75d8b83fa78563bfcff681c16d77553ba0d4780c62a9008b2fee1b3",
"Volumes": {
"/data/configdb": {},
"/data/db": {}
},
"WorkingDir": "",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": [],
"Labels": {}
},
"Architecture": "amd64",
"Os": "linux",
"Size": 358986787,
"VirtualSize": 358986787,
"GraphDriver": {
"Name": "aufs",
"Data": null
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:483da7fbbc1a693d269f42733de4b60db96a2157be65a100c0a0cfe002327ecc",
"sha256:144cfca37e38cadb4a046b24d4472bd2ca9f996e183fd97e6975428858f37dc0",
"sha256:92c7f3c3f729bdcc7226e10afe036607b5a6f9d2617cf329e604823d5d761b0e",
"sha256:0f58e2d21079e1914a74c107af538f2335935671756d237d75c182eb7ee3b360",
"sha256:29f5883477dbf074ea34ad109bf5819de47c53e64f0ab238d180b03c997365d3",
"sha256:a5fe28d6e759f4cce422f697978a7feab82c0027138f9a20098ae58d924b9b2b",
"sha256:2febb6f8ed4e89df5427ca30bd49c4538df865e15ed2e6bf6a1182c2dc69289f",
"sha256:0c1029e243e98b3e5547fb8a01e27f04336b14fc7fe23bd078a581a9b6a2b4e0",
"sha256:8b59e97d607e5d01fb5624cc3ac136f25b4a45c462c167b0b4220532b2c903bb",
"sha256:6a4ae0bc9ea79d78c2e9980a3956bf5ebc5095831f7b3fb1a2bc7b7e827b4163",
"sha256:96e178a2cc3f4b1295cf0b878ceda5526590066c17b76bd61c04ab8d9ea5746d"
]
}
}
] |
Workaround
Bug start from 3.4/docker-entrypoint.sh#L10 |
This is a duplicate of #149, fixed in #151. See docker-library/official-images#2780 for progress on getting this image updated on the Hub (which will happen before EOD today). 👍 |
Actually I pulled the new image and get this error in the logs: chown: changing ownership of '/proc/1/fd/1': Permission denied |
@stemau98 can you please try running the image with ie: $ docker run -it --rm --user mongodb mongo:3.4
about to fork child process, waiting until server is ready for connections.
forked process: 12
2017-03-24T20:26:09.652+0000 I CONTROL [initandlisten] MongoDB starting : pid=12 port=27017 dbpath=/data/db 64-bit host=8ca88681e10a
2017-03-24T20:26:09.653+0000 I CONTROL [initandlisten] db version v3.4.2
2017-03-24T20:26:09.653+0000 I CONTROL [initandlisten] git version: 3f76e40c105fc223b3e5aac3e20dcd026b83b38b
2017-03-24T20:26:09.653+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1t 3 May 2016
2017-03-24T20:26:09.653+0000 I CONTROL [initandlisten] allocator: tcmalloc
2017-03-24T20:26:09.653+0000 I CONTROL [initandlisten] modules: none
2017-03-24T20:26:09.653+0000 I CONTROL [initandlisten] build environment:
2017-03-24T20:26:09.653+0000 I CONTROL [initandlisten] distmod: debian81
2017-03-24T20:26:09.653+0000 I CONTROL [initandlisten] distarch: x86_64
2017-03-24T20:26:09.653+0000 I CONTROL [initandlisten] target_arch: x86_64
2017-03-24T20:26:09.653+0000 I CONTROL [initandlisten] options: { net: { bindIp: "127.0.0.1" }, processManagement: { fork: true, pidFilePath: "/tmp/tmp.Lh96uZj1Ee" }, systemLog: { destination: "file", path: "/proc/1/fd/1" } }
2017-03-24T20:26:09.663+0000 I STORAGE [initandlisten]
2017-03-24T20:26:09.663+0000 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2017-03-24T20:26:09.663+0000 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
2017-03-24T20:26:09.663+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=15562M,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2017-03-24T20:26:09.994+0000 I CONTROL [initandlisten]
2017-03-24T20:26:09.994+0000 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2017-03-24T20:26:09.994+0000 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2017-03-24T20:26:09.994+0000 I CONTROL [initandlisten]
2017-03-24T20:26:10.066+0000 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2017-03-24T20:26:10.179+0000 I INDEX [initandlisten] build index on: admin.system.version properties: { v: 2, key: { version: 1 }, name: "incompatible_with_version_32", ns: "admin.system.version" }
2017-03-24T20:26:10.180+0000 I INDEX [initandlisten] building index using bulk method; build may temporarily use up to 500 megabytes of RAM
2017-03-24T20:26:10.181+0000 I INDEX [initandlisten] build index done. scanned 0 total records. 0 secs
2017-03-24T20:26:10.182+0000 I COMMAND [initandlisten] setting featureCompatibilityVersion to 3.4
2017-03-24T20:26:10.183+0000 I NETWORK [thread1] waiting for connections on port 27017
child process started successfully, parent exiting
2017-03-24T20:26:10.254+0000 I NETWORK [thread1] connection accepted from 127.0.0.1:59408 #1 (1 connection now open)
2017-03-24T20:26:10.254+0000 I NETWORK [conn1] received client metadata from 127.0.0.1:59408 conn1: { application: { name: "MongoDB Shell" }, driver: { name: "MongoDB Internal Client", version: "3.4.2" }, os: { type: "Linux", name: "PRETTY_NAME="Debian GNU/Linux 8 (jessie)"", architecture: "x86_64", version: "Kernel 4.4.52-gentoo" } }
2017-03-24T20:26:10.257+0000 I - [conn1] end connection 127.0.0.1:59408 (1 connection now open)
/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
killing process with pid: 12
2017-03-24T20:26:10.284+0000 I CONTROL [signalProcessingThread] got signal 15 (Terminated), will terminate after current cmd ends
2017-03-24T20:26:10.284+0000 I NETWORK [signalProcessingThread] shutdown: going to close listening sockets...
2017-03-24T20:26:10.284+0000 I NETWORK [signalProcessingThread] closing listening socket: 7
2017-03-24T20:26:10.284+0000 I NETWORK [signalProcessingThread] closing listening socket: 8
2017-03-24T20:26:10.284+0000 I NETWORK [signalProcessingThread] removing socket file: /tmp/mongodb-27017.sock
2017-03-24T20:26:10.285+0000 I NETWORK [signalProcessingThread] shutdown: going to flush diaglog...
2017-03-24T20:26:10.285+0000 I FTDC [signalProcessingThread] Shutting down full-time diagnostic data capture
2017-03-24T20:26:10.285+0000 I STORAGE [signalProcessingThread] WiredTigerKVEngine shutting down
2017-03-24T20:26:10.616+0000 I STORAGE [signalProcessingThread] shutdown: removing fs lock...
2017-03-24T20:26:10.617+0000 I CONTROL [signalProcessingThread] now exiting
2017-03-24T20:26:10.617+0000 I CONTROL [signalProcessingThread] shutting down with code:0
MongoDB init process complete; ready for start up.
2017-03-24T20:26:11.313+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=8ca88681e10a
2017-03-24T20:26:11.313+0000 I CONTROL [initandlisten] db version v3.4.2
2017-03-24T20:26:11.313+0000 I CONTROL [initandlisten] git version: 3f76e40c105fc223b3e5aac3e20dcd026b83b38b
2017-03-24T20:26:11.313+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1t 3 May 2016
2017-03-24T20:26:11.313+0000 I CONTROL [initandlisten] allocator: tcmalloc
2017-03-24T20:26:11.313+0000 I CONTROL [initandlisten] modules: none
2017-03-24T20:26:11.313+0000 I CONTROL [initandlisten] build environment:
2017-03-24T20:26:11.313+0000 I CONTROL [initandlisten] distmod: debian81
2017-03-24T20:26:11.313+0000 I CONTROL [initandlisten] distarch: x86_64
2017-03-24T20:26:11.313+0000 I CONTROL [initandlisten] target_arch: x86_64
2017-03-24T20:26:11.313+0000 I CONTROL [initandlisten] options: {}
2017-03-24T20:26:11.319+0000 I - [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2017-03-24T20:26:11.319+0000 I STORAGE [initandlisten]
2017-03-24T20:26:11.319+0000 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2017-03-24T20:26:11.319+0000 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
2017-03-24T20:26:11.319+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=15562M,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2017-03-24T20:26:12.256+0000 I CONTROL [initandlisten]
2017-03-24T20:26:12.256+0000 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2017-03-24T20:26:12.256+0000 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2017-03-24T20:26:12.256+0000 I CONTROL [initandlisten]
2017-03-24T20:26:12.259+0000 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2017-03-24T20:26:12.260+0000 I NETWORK [thread1] waiting for connections on port 27017 |
@tianon Starting the container with |
Hrm... I'm hitting this even when setting
(Docker CE 17.03.1 and 17.04 on an Ubuntu 14.04 system (64-bit, with kernel 4.4.0-72)) |
yep same issue here when pulling mongo:3.2 or 3.4 |
@jonathonf me too
|
same issue when pulling latest image
and here is the logs with mongodb user:
|
Same error today with the official installation procedure (https://hub.docker.com/_/mongo):
|
@gregfr, this issue is quite old and likely does not have the same cause, please open a new issue with more details and logs. For example: does it also fail while running with |
Following output is displayed if container is started:
chown: changing ownership of '/dev/stdout': Permission denied
chown: changing ownership of '/dev/stderr': Permission denied
Please fix this in docker-entrypoint.sh
The text was updated successfully, but these errors were encountered: