> On Mon, Aug 23, 2010 at 9:06 AM, Jon <
not.jon.tay... <at> gmail.com> wrote:
> > Hi,
>
> > I'm using a two node setup (alpha01/alpha02) for some testing, and i'm
> > having some confusion i was hoping somebody could help me clear up.
> > (the two nodes are sharded replica sets). I wanted to be able to
> > knock down one of my two nodes and see if it continued to function.
>
> > In the docs ->
http://www.mongodb.org/display/DOCS/Sharding+and+Failover
> > it says "A production shard cluster will have three config server
> > processes, each existing on a separate machine. "
>
> > i realize i'm tryin to fudge things with just two, but should i be
> > trying to replicate the configsvr process? i gave it a shot, and it
> > won't let me configure it,
>
> > mongod --fork --replSet pok --configsvr --dbpath /data/db/config --
> > port 20000 --logpath /var/log/mongodb/mongo.log
> > > rs.initiate(config);
> > "errmsg" : "couldn't initiate : member
> >
alpha02.mdc.gameloft.org:20000
> > has data already, cannot initiate set. All members except initiator
> > must be empty.",
> > "ok" : 0
>
> > If i try and setup my environment without replicated config servers (1
> > per server), as below..
> > using 1.6.1
> > SERVER 1
> > 9472 ? Sl 33:51 mongod --replSet foo --shardsvr --dbpath /
> > data/db/shard00 --port 10000 --logpath /var/log/mongodb/mongo.log --
> > fork
> > 9562 ? Sl 32:59 mongod --replSet foo2 --shardsvr --dbpath /
> > data/db/shard01 --port 10001 --logpath /var/log/mongodb/mongo.log --
> > fork
> > 29364 ? Sl 0:00 mongod --fork --configsvr --dbpath /data/db/
> > config --port 20000 --logpath /var/log/mongodb/mongo.log
> > 29381 ? Sl 0:00 mongos --fork --configdb
> >
alpha01.mdc.gameloft.org:20000 --chunkSize 1 --logpath /var/log/
> > mongodb/mongos.log
> > SERVER 2
> > 872 ? Sl 0:00 mongod --fork --configsvr --dbpath /data/db/
> > config --port 20000 --logpath /var/log/mongodb/mongo.log
> > 881 ? Sl 0:00 mongos --fork --configdb
> >
alpha02.mdc.gameloft.org:20000 --chunkSize 1 --logpath /var/log/
> > mongodb/mongos.log
> > 2725 ? Sl 95:36 mongod --replSet foo --shardsvr --dbpath /
> > data/db/shard00 --port 10000 --logpath /var/log/mongodb/mongo.log --
> > fork
> > 2835 ? Sl 91:31 mongod --replSet foo2 --shardsvr --dbpath /
> > data/db/shard01 --port 10001 --logpath /var/log/mongodb/mongo.log --
> > fork
>
> > when i connect to mongo on the 2nd server..
> > [root <at> alpha01 ~]# mongo mydb
> > MongoDB shell version: 1.6.1
> > connecting to: mydb
> > > show collections;
> > mycollection
> > system.indexes
>
> > [root <at> alpha02 db]# mongo mydb
> > MongoDB shell version: 1.6.1
> > connecting to: mydb
> > > show collections;
> > Mon Aug 23 13:02:02 uncaught exception: error: { "$err" : "can't find
> > a shard to put new db on", "code" : 10185 }
>
> > If i kill the mongos process on alpha02, and point it to alpha01, i
> > can connect fine, which makes sense.. but if alpha01 goes down, i've
> > effectively lost my database.
>
> > How do i sync the configurations between servers?
>
> > Thanks for any help.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "mongodb-user" group.
> > To post to this group, send email to
mongodb-user-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> > To unsubscribe from this group, send email to