I am trying to do the Replica Sets tutorial for mongodb. I am using ubuntu on 64 bit and installed using sudo apt-get install mongodb-10gen.
Tutorial is at http://www.mongodb.org/display/DOCS/Replica+Sets+-+Basics
I stop the service using
/etc/init.d/mongodb stop
I then try:
/etc/init.d/mongodb start --rest --replSet myset
When I go to http://localhost:28017/_replSet I get this message.
REST is not enabled. use –rest to turn on. check that port 28017 is
secured for the network too.
So…how do I resolve? How do I open a port on ubuntu is that is the problem? Did I do things correct?
Thanks
You need to edit your
/etc/mongodb.conffile , settingrest = trueandreplSet = myset, and restart mongo.Init.d script don’t accept parameters. Or:
/etc/init.d/mongodbis not the same as/usr/bin/mongod– The parameters you’re passing are not making it to the mongo executable.