I have a mongodb 2.2.2 setup on ubuntu 12.04 machine and I need to modify binding_ip list while database is running, without mongo restart. Is there a way to do so? Is it possible to do from pymongo?
p.s. I've actually tried
mongod --config /etc/mongodb.conf --bind_ip 127.0.0.1 31.**
with bind_ip list supplied but it says
Wed Dec 19 17:02:05 [initandlisten] exception in initAndListen: 10309 Unable to create/open lock file: /var/lib/mongodb/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating
and I'm not sure if it is not just restarting database.
iptables(8)
rules could do the trick. Is that an option? My understanding is that your mongodb is currently answering on too many addresses and you want to limit those. – kmkaplan