I have always tested replication by running multiple processes mongodon the same server (because using multiple services is more expensive, and I'm just testing at this point).
However, since I upgraded mongo to version v2.0.5, I get the following when I try to run mongod again (on a different port, with a different database folder, etc.):
mongod already running
Why is this so? Is there a flag to skip this check?
Update: for some reason this only happens when I run mongodas follows:
sudo start-stop-daemon --start -c mainuser --exec /usr/local/bin/mongod -- --journal --nohttpinterface --dbpath /home/mainuser/data/db-secondary --logpath /home/mainuser/data/logs/mongodb-secondary.log --logappend --replSet appname --port 30001
This does not happen when I run it like this:
sudo /usr/local/bin/mongod --journal --nohttpinterface --dbpath /home/mainuser/data/db-secondary --logpath /home/mainuser/data/logs/mongodb-secondary.log --logappend --replSet appname --port 30001
Unfortunately, I have to use start-stop-daemonfor use in my upstart script on Ubuntu 10.04 LTS. Why can this cause this problem?
manpage start-stop-daemon , , "". , start-stop-daemon, Upstart. , sudo, -?