I have a DB that is currently single-server and I'm trying to move it to a replica set. Currently everything is on
app.checkin.to and I want to add
s1db1.checkin.to and
s1db2.checkin.to. All servers are running 1.6.2 and the two new server are blank. The --replSet parameter is checkinto.
config = {
"_id" : "checkinto",
"members" : [
{
"_id" : 0,
},
{
"_id" : 1,
},
{
"_id" : 2,
}
]
}
> rs.initiate(config);
{
"info" : "Config now saved locally. Should come online in about a minute.",
"ok" : 1
}
> rs.status()
{
"set" : "checkinto",
"date" : "Mon Sep 06 2010 17:50:09 GMT-0700 (PDT)",
"myState" : 5,
"members" : [
{
"_id" : 0,
"name" : "fs:27017",
"health" : 1,
"state" : 5,
"self" : true
},
{
"_id" : 1,
"health" : 0,
"state" : 6,
"uptime" : 0,
"lastHeartbeat" : "Mon Sep 06 2010 17:50:07 GMT-0700 (PDT)",
"errmsg" : "still initializing"
},
{
"_id" : 2,
"health" : 0,
"state" : 6,
"uptime" : 0,
"lastHeartbeat" : "Mon Sep 06 2010 17:50:07 GMT-0700 (PDT)",
"errmsg" : "still initializing"
}
],
"ok" : 1
}
> db.isMaster()
{
"setName" : "checkinto",
"ismaster" : false,
"secondary" : false,
"hosts" : [
],
"ok" : 1
}
Server logs:
Mon Sep 6 17:48:22 [startReplSets] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
Mon Sep 6 17:48:32 [startReplSets] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
Mon Sep 6 17:48:42 [startReplSets] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
Mon Sep 6 17:48:52 [startReplSets] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
Mon Sep 6 17:48:55 [initandlisten] connection accepted from
127.0.0.1:54158 #3
Mon Sep 6 17:49:01 [conn3] replSet replSetInitiate admin command received from client
Mon Sep 6 17:49:01 [conn3] replSet replSetInitiate config object parses ok, 3 members specified
Mon Sep 6 17:49:01 [conn3] replSet replSetInitiate all members seem up
Mon Sep 6 17:49:01 [conn3] replSet info saving a newer config version to local.system.replset
Mon Sep 6 17:49:01 [conn3] replSet replSetInitiate config now saved locally. Should come online in about a minute.
Mon Sep 6 17:49:01 [conn3] query admin.$cmd ntoreturn:1 command: { replSetInitiate: { _id: "checkinto", members: [ { _id: 0.0, host: "
app.checkin.to" }, { _id: 1.0, host: "
s1db1.checkin.to" }, { _id: 2.0, host: "
s1db2.checkin.to" } ] } } reslen:128 687ms
Mon Sep 6 17:49:02 [rs Manager] replSet can't see a majority, will not try to elect self
s1db1:
...
Tue Sep 7 00:47:31 [startReplSets] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
Tue Sep 7 00:47:41 [startReplSets] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
Tue Sep 7 00:47:51 [startReplSets] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
Tue Sep 7 00:48:01 [startReplSets] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
Tue Sep 7 00:48:11 [startReplSets] replSet warning can't find self in the repl set configuration:
Tue Sep 7 00:48:11 [startReplSets] replSet info Couldn't load config yet. Sleeping 20sec and will try again.
Tue Sep 7 00:48:32 [startReplSets] replSet warning can't find self in the repl set configuration:
Tue Sep 7 00:48:32 [startReplSets] replSet info Couldn't load config yet. Sleeping 20sec and will try again.
Tue Sep 7 00:48:52 [startReplSets] replSet warning can't find self in the repl set configuration:
Tue Sep 7 00:48:52 [startReplSets] replSet info Couldn't load config yet. Sleeping 20sec and will try again.
... (continuing infinitely)
s1db2:
...
Tue Sep 7 00:47:28 [startReplSets] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
Tue Sep 7 00:47:38 [startReplSets] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
Tue Sep 7 00:47:48 [startReplSets] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
Tue Sep 7 00:47:58 [startReplSets] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
Tue Sep 7 00:48:09 [startReplSets] replSet warning can't find self in the repl set configuration:
Tue Sep 7 00:48:09 [startReplSets] replSet info Couldn't load config yet. Sleeping 20sec and will try again.
Tue Sep 7 00:48:29 [startReplSets] replSet warning can't find self in the repl set configuration:
Tue Sep 7 00:48:29 [startReplSets] replSet info Couldn't load config yet. Sleeping 20sec and will try again.
Tue Sep 7 00:48:49 [startReplSets] replSet warning can't find self in the repl set configuration:
Tue Sep 7 00:48:49 [startReplSets] replSet info Couldn't load config yet. Sleeping 20sec and will try again.
... (continuing infinitely)