User Tools

Site Tools


windows_mongodb_arbiter

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
windows_mongodb_arbiter [2020/01/23 09:35] – [Create a MongoDB Service] walkeradminwindows_mongodb_arbiter [2023/03/09 22:35] (current) – external edit 127.0.0.1
Line 107: Line 107:
 \\  \\ 
 ---- ----
 +\\ 
 +===== Add Arbiter to Replicaset =====
 +\\ 
 +SSH (or console) to your 'PRIMARY' Controller (this will be the one that has the VIP IP).
 +\\ 
 +\\ 
 +From the command line type <color #00a2e8>ip a</color>
 +\\ 
 +\\ 
 +eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
 +\\ 
 +link/ether 74:fe:48:45:5a:52 brd ff:ff:ff:ff:ff:ff
 +\\ 
 +inet <color #ed1c24>10.43.30.17/24</color> brd 10.43.30.255 scope global noprefixroute eth0
 +\\ 
 + valid_lft forever preferred_lft forever
 +\\ 
 +inet <color #ed1c24>10.43.30.19/32</color> scope global eth0
 +\\ 
 + valid_lft forever preferred_lft forever
 +\\ 
 +inet <color #ed1c24>10.43.30.20/32</color> scope global eth0
 +\\ 
 + valid_lft forever preferred_lft forever
 +\\ 
 +inet6 fe80::76fe:48ff:fe45:5a52/64 scope link
 +\\ 
 + valid_lft forever preferred_lft forever
 +\\ 
 +\\ 
 +If you see the three IP Addresses (Controller IP1, VIP, LicensingVIP) then you are on the PRIMARY controller.
 +\\ 
 +\\ 
 +Check the password in the secrets.ini
 +    cat /etc/ericsson/secrets/mongo/secrets.ini
 +Now add the Arbiter details by using the following:
 +    mongo admin -u MediaKind -p *********
 +\\ 
 +\\ 
 +Add the Arbiter using the rs.addArb method with the IP address of the Windows server that is used
 +for the management network of the MediaKind appliances e.g.
 +\\ 
 +    repldb:PRIMARY> rs.addArb("x.x.x.x:27018")
 +    
 +    (where x.x.x.x is the Management IP Address of your nCompass Server)
 +\\ 
 +----
 +===== Verify Replicaset Members =====
 +\\ 
 +Whilst in the mongo client, use the rs.status method to list the members of the Replicaset:
 +    repldb:PRIMARY> rs.status()
 +This should return information including details of the PRIMARY, SECONDARY and ARBITER nodes:
 +<file>
 +{
 +        "set" : "repldb",
 +        "date" : ISODate("2020-01-23T08:30:18.165Z"),
 +        "myState" : 1,
 +        "term" : NumberLong(1),
 +        "syncingTo" : "",
 +        "syncSourceHost" : "",
 +        "syncSourceId" : -1,
 +        "heartbeatIntervalMillis" : NumberLong(2000),
 +        "optimes" : {
 +                "lastCommittedOpTime" : {
 +                        "ts" : Timestamp(1579768211, 2),
 +                        "t" : NumberLong(1)
 +                },
 +                "readConcernMajorityOpTime" : {
 +                        "ts" : Timestamp(1579768211, 2),
 +                        "t" : NumberLong(1)
 +                },
 +                "appliedOpTime" : {
 +                        "ts" : Timestamp(1579768211, 2),
 +                        "t" : NumberLong(1)
 +                },
 +                "durableOpTime" : {
 +                        "ts" : Timestamp(1579768211, 2),
 +                        "t" : NumberLong(1)
 +                }
 +        },
 +        "members" : [
 +                {
 +                        "_id" : 0,
 +                        "name" : "10.43.30.17:27017",
 +                        "health" : 1,
 +                        "state" : 1,
 +                        "stateStr" : "PRIMARY",
 +                        "uptime" : 64477,
 +                        "optime" : {
 +                                "ts" : Timestamp(1579768211, 2),
 +                                "t" : NumberLong(1)
 +                        },
 +                        "optimeDate" : ISODate("2020-01-23T08:30:11Z"),
 +                        "syncingTo" : "",
 +                        "syncSourceHost" : "",
 +                        "syncSourceId" : -1,
 +                        "infoMessage" : "",
 +                        "electionTime" : Timestamp(1579703742, 2),
 +                        "electionDate" : ISODate("2020-01-22T14:35:42Z"),
 +                        "configVersion" : 3,
 +                        "self" : true,
 +                        "lastHeartbeatMessage" : ""
 +                },
 +                {
 +                        "_id" : 1,
 +                        "name" : "10.43.30.18:27017",
 +                        "health" : 1,
 +                        "state" : 2,
 +                        "stateStr" : "SECONDARY",
 +                        "uptime" : 64308,
 +                        "optime" : {
 +                                "ts" : Timestamp(1579768211, 2),
 +                                "t" : NumberLong(1)
 +                        },
 +                        "optimeDurable" : {
 +                                "ts" : Timestamp(1579768211, 2),
 +                                "t" : NumberLong(1)
 +                        },
 +                        "optimeDate" : ISODate("2020-01-23T08:30:11Z"),
 +                        "optimeDurableDate" : ISODate("2020-01-23T08:30:11Z"),
 +                        "lastHeartbeat" : ISODate("2020-01-23T08:30:17.980Z"),
 +                        "lastHeartbeatRecv" : ISODate("2020-01-23T08:30:17.039Z"),
 +                        "pingMs" : NumberLong(0),
 +                        "lastHeartbeatMessage" : "",
 +                        "syncingTo" : "10.43.30.17:27017",
 +                        "syncSourceHost" : "10.43.30.17:27017",
 +                        "syncSourceId" : 0,
 +                        "infoMessage" : "",
 +                        "configVersion" : 3
 +                },
 +                {
 +                        "_id" : 2,
 +                        "name" : "10.43.30.21:27018",
 +                        "health" : 1,
 +                        "state" : 7,
 +                        "stateStr" : "ARBITER",
 +                        "uptime" : 22,
 +                        "lastHeartbeat" : ISODate("2020-01-23T08:30:17.981Z"),
 +                        "lastHeartbeatRecv" : ISODate("2020-01-23T08:30:18.084Z"),
 +                        "pingMs" : NumberLong(1),
 +                        "lastHeartbeatMessage" : "",
 +                        "syncingTo" : "",
 +                        "syncSourceHost" : "",
 +                        "syncSourceId" : -1,
 +                        "infoMessage" : "",
 +                        "configVersion" : 3
 +                }
 +        ],
 +        "ok" : 1,
 +        "operationTime" : Timestamp(1579768211, 2),
 +        "$clusterTime" : {
 +                "clusterTime" : Timestamp(1579768215, 1),
 +                "signature" : {
 +                        "hash" : BinData(0,"TvImZ5m+/dag28UkRYCDcqrXlvk="),
 +                        "keyId" : NumberLong("6784775917848756225")
 +                }
 +        }
 +}
 +repldb:PRIMARY> exit
 +</file>
windows_mongodb_arbiter.1579772101.txt.gz · Last modified: 2023/03/09 22:35 (external edit)