Comments (13)
+1
from mongo.
from mongo.
I've got mine setup with a config:
$ cat /opt/testmongo/config/mongo.conf
systemLog:
destination: file
path: "/logs/mongo.log"
logAppend: true
I try to run docker ... mongo -f /config/mongo.conf
and get the error: 2015-04-22T19:24:29.503+0000 SEVERE: Failed global initialization: FileNotOpen Failed to open "/logs/mongo.log"
(But if I run chown -R mongodb /logs
inside the container, it works as expected.)
from mongo.
from mongo.
Agreed.
It's just not immediately obvious why (without investigation into the inner working of the Dockerfile / entrypoint) we receive this error.
I think it should be mentioned in https://github.com/docker-library/docs/tree/master/mongo that destionation: file
logging won't work unless the path is accessible to the mongodb user.
from mongo.
from mongo.
If I want to see a pattern with the existing entrypoint, this project must update the docker-entrypoint.sh adding:
chown -R mongodb /logs/db
In the same line a volume must to be created in de Dockerfile like:
VOLUME /logs/db
This is assuming the fact I'm caching the pattern correctly since my vote will go to do this modifications (the entrypoint and the dockerfile) but with this paths:
/data/mongodb
/logs/mongodb
since I could have more databases and all could fight for the db idea
Another change I would do will be to change the name docker-entrypoint.sh to entrypoint.sh since I don't get the need to add docker-
I don't really know how syslog works but I prefer the file option because I can consume it with logstash without touching the host filesystem
I you are agree with my bet, I could make a pull request to show you the actual changes in context and to test
What do you think?
from mongo.
hi again!
here: docker-library/elasticsearch#18 (comment)
make a good point: why to change the default paths for data and logs?
I would like to change my mind and respect the default configuration on the whole docker official images
from mongo.
Actually, we don't have any active config, so we are getting the defaults from the daemon, ie the data dir of /data/db/
(docs.mongodb). This does not conflict with mariadb, mysql, percona, rabbitmq, postgres, elasticsearch, or redis. Changing the data directory will break a non-zero number of users. The default logging, when you don't give a systemLog.destination
, is to standard out (docs.mongo).
I would be in favor of documenting how a user can handle logging in a nice way.
from mongo.
Then is good enought to me
Agree too with the log issue: seems to me that the correct way is to put them in the mongo's standard location and change the permissions ala data folder in the entrypoint
from mongo.
Referring to this ticket Docker stores the logs, even to the stdout
, so if your restart your container, they will be stored, i.e. you can view old logs using --since
option of logs
command.
from mongo.
Hi Guys. My container is increasing by a gig everyday please help.
ubuntu@ip-172-31-5-57:~$ sudo du -ch -d 1 /var/lib/docker
9.9G /var/lib/docker/containers
8.0K /var/lib/docker/tmp
2.9M /var/lib/docker/image
60K /var/lib/docker/volumes
4.0K /var/lib/docker/trust
1.4G /var/lib/docker/aufs
60K /var/lib/docker/network
12G /var/lib/docker
12G total
from mongo.
Closing old issue. The solution is to either provide --logpath
and --logappend
via command line options or config file, or to configure docker log drivers as desired.
Related to #103 (comment).
from mongo.
Related Issues (20)
- PGP KEYS expired for Mongodb v3.6 HOT 2
- CVE-2023-29403 HOT 3
- Add an example to documentation for "Initializing a fresh instance" HOT 1
- docker run mongo failed
- Mongo 6.0+ Fails to Run Using WSL HOT 6
- Is it possible Docker without WSL?
- Need help with CVE-2023-24538, CVE-2023-24540, CVE-2024-21626 and CVE-2023-27561 HOT 4
- Not connecting in the mongodb compass - getaddrinfo ENOTFOUND db-mongo-node17 HOT 6
- Mongo container sends network requests to mysterious EC2 servers at AWS HOT 9
- MongoDB container not always initialising after clearing volumes HOT 1
- 7.0.7 tag is missing linux/arm64 image HOT 1
- mongod:6.0.13 - Failed during mongod binary build in docker image.
- docker PIDS keeps increasing at 7.0.8 HOT 1
- Can't connect apps to MongoDB inside docker in Linux HOT 2
- `ENTRYPOINT` documentation HOT 1
- The docker container is throwing connection error if host machine is also running a mongodb on port 27017.
- Docker encountered an exited while in use
- mongo in the container does not properly listen on IPv6
- custom mongod.conf file append to docker mongo it restarts HOT 1
- Operation not permitted\nActual exception type: std::system_error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongo.