-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.4.0
-
Component/s: None
-
None
-
Environment:CentOS 5.4
The mongod server does not daemonize correctly. When using --fork it only fork's once and sets the session id. It really needs to fork an additional time and also close stdin/stdout/stderr.
This is causing an issue for us when we do our backups of mongodb. Our process is:
1) ssh root@hostname "/etc/init.d/mongod stop"
2) rsync the db directory
3) ssh root@hostname "/etc/iint.d/mongod start"
This can also be replicated without using an init script by running a command like:
ssh root@hostname "/usr/bin/mongod --fork --logpath /var/log/mongo/mongod.log --dbpath /data/mongo/db"
This will should return, but it does not. It hangs. I have verified that this can be fixed by having mongod close stdin/stdout/stderr if you use --fork.
For reference http://www.svbug.com/documentation/comp.unix.programmer-FAQ/faq_2.html#SEC16
- is related to
-
SERVER-9239 Mongo Server does not close stdout when using --fork and --syslog
- Closed