-
Type:
Question
-
Resolution: Done
-
Priority:
Minor - P4
-
None
-
Affects Version/s: 1.8.3
-
Component/s: Replication
-
None
-
Environment:Linux 2.6.18-238.12.1.el5 #1 SMP Sat May 7 20:18:50 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
-
Fully Compatible
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
I am setting up replica set.
On master:
replSet = rs2 added to config file
~~~
> rs.initiate()
{
"info2" : "no configuration explicitly specified – making one",
"info" : "Config now saved locally. Should come online in about a minute.",
"ok" : 1
}
rs2:PRIMARY> db.unicorns.find(
);
<', dob: new Date(1992,2,13,7,47), loves: ['carrot','papaya'], weight: 600, gender: 'm', vampires: 63});
rs2:PRIMARY> db.unicorns.find(
);
{ "_id" : ObjectId("4e723bcffa1ff8e3080494cf"), "name" : "Horny", "dob" : ISODate("1992-03-13T12:47:00Z"), "loves" : [ "carrot", "papaya" ], "weight" : 600, "gender" : "m", "vampires" : 63 }rs2:PRIMARY>
rs2:PRIMARY> rs.status()
{
"set" : "rs2",
"date" : ISODate("2011-09-15T17:57:48Z"),
"myState" : 1,
"members" : [
{
"_id" : 0,
"name" : "SD2QVQ01VL:27017",
"health" : 1,
"state" : 1,
"stateStr" : "PRIMARY",
"optime" :
,
"optimeDate" : ISODate("2011-09-15T17:54:24Z"),
"self" : true
}
],
"ok" : 1
}
rs2:PRIMARY>
~~~
On slave :
replSet = rs2 added to config file
~~
> rs2.add("SD2QVQ01VL:27017");
Thu Sep 15 14:25:04 ReferenceError: rs2 is not defined (shell):1
~~~
Ping SD2QVQ01VL shows
64 bytes from SD2QVQ01VL.SAKSDIRECT.COM (10.32.150.82): icmp_seq=2 ttl=64 time=0.194 ms
What is wrong in my setup?
Thanks in advance.
Leonid M.