欢迎光临本站

肿瘤

您现在的位置是:首页>健康新闻

健康新闻

如何找正规的黑客(先办事后付款的黑客)

tangfengyu2023-01-30 20:12:05健康新闻106来源:抖时代

如何找正规的黑客(先办事后付款的黑客)

  "set" : "testSet",
   "date" : ISODate("2020-09-08T11:45:12.096Z"),
   "myState" : 1,
   "term" : NumberLong(1),
   "syncingTo" : "",
   "syncSourceHost" : "",
   "syncSourceId" : -1,
   "heartbeatIntervalMillis" : NumberLong(2000),
   "optimes" : {
       "lastCommittedOpTime" : {
           "ts" : Timestamp(1599565502, 1),
           "t" : NumberLong(1)
       },
       "lastCommittedWallTime" : ISODate("2020-09-08T11:45:02.775Z"),
       "readConcernMajorityOpTime" : {
           "ts" : Timestamp(1599565502, 1),
           "t" : NumberLong(1)
       },
       "readConcernMajorityWallTime" : ISODate("2020-09-08T11:45:02.775Z"),
       "appliedOpTime" : {
           "ts" : Timestamp(1599565502, 1),
           "t" : NumberLong(1)
       },
       "durableOpTime" : {
           "ts" : Timestamp(1599565502, 1),
           "t" : NumberLong(1)
       },
       "lastAppliedWallTime" : ISODate("2020-09-08T11:45:02.775Z"),
       "lastDurableWallTime" : ISODate("2020-09-08T11:45:02.775Z")
   },
   "lastStableRecoveryTimestamp" : Timestamp(1599565492, 1),
   "lastStableCheckpointTimestamp" : Timestamp(1599565492, 1),
   "members" : [
       {
           "_id" : 0,
           "name" : "7abd89794aa7:27017",
           "ip" : "10.0.1.41",
           "health" : 1,
           "state" : 1,
           "stateStr" : "PRIMARY",
           "uptime" : 2784,
           "optime" : {
               "ts" : Timestamp(1599565502, 1),
               "t" : NumberLong(1)
           },
           "optimeDate" : ISODate("2020-09-08T11:45:02Z"),
           "syncingTo" : "",
           "syncSourceHost" : "",
           "syncSourceId" : -1,
           "infoMessage" : "",
           "electionTime" : Timestamp(1599562790, 2),
           "electionDate" : ISODate("2020-09-08T10:59:50Z"),
           "configVersion" : 3,
           "self" : true,
           "lastHeartbeatMessage" : ""
       },
       {
           "_id" : 1,
           "name" : "secondary:27017",
           "ip" : "10.0.1.233",
           "health" : 1,
           "state" : 2,
           "stateStr" : "SECONDARY",
           "uptime" : 2711,
           "optime" : {
               "ts" : Timestamp(1599565502, 1),
               "t" : NumberLong(1)
           },
           "optimeDurable" : {
               "ts" : Timestamp(1599565502, 1),
               "t" : NumberLong(1)
           },
           "optimeDate" : ISODate("2020-09-08T11:45:02Z"),
           "optimeDurableDate" : ISODate("2020-09-08T11:45:02Z"),
           "lastHeartbeat" : ISODate("2020-09-08T11:45:11.494Z"),
           "lastHeartbeatRecv" : ISODate("2020-09-08T11:45:11.475Z"),
           "pingMs" : NumberLong(0),
           "lastHeartbeatMessage" : "",
           "syncingTo" : "7abd89794aa7:27017",
           "syncSourceHost" : "7abd89794aa7:27017",
           "syncSourceId" : 0,
           "infoMessage" : "",
           "configVersion" : 3
       },
       {
           "_id" : 2,
           "name" : "arbiter:27017",
           "ip" : null,
           "health" : 0,
           "state" : 8,
           "stateStr" : "(not reachable/healthy)",
           "uptime" : 0,
           "lastHeartbeat" : ISODate("2020-09-08T11:45:10.463Z"),
           "lastHeartbeatRecv" : ISODate("1970-01-01T00:00:00Z"),
           "pingMs" : NumberLong(0),
           "lastHeartbeatMessage" : "Error connecting to arbiter:27017 :: caused by :: Could not find address for arbiter SocketException: Host not found (authoritative)",
           "syncingTo" : "",
           "syncSourceHost" : "",
           "syncSourceId" : -1,
           "infoMessage" : "",
           "configVersion" : -1
       }
   ],
   "ok" : 1,
   "$clusterTime" : {
       "clusterTime" : Timestamp(1599565502, 1),
       "signature" : {
           "hash" : BinData(0,"7/ei+8UrhlpIny9zKeWuAFpn46c="),
           "keyId" : NumberLong("6870069879538450434")
       }
   },
   "operationTime" : Timestamp(1599565502, 1)
}

五、验证 MongoDB 可用性

先进入主节点服务器添加一条数据

1
2
3
4
5
docker exec -it master mongo
use admin
db.auth('root', '123456')
use test
db.test.insert({name:"muyang",age:20})

在来副节点服务器查看是否已经同步了这条数据

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[root@linux secondary] docker exec -it secondary mongo
testSet:SECONDARY> use admin
testSet:SECONDARY> db.auth('root', '123456')
testSet:SECONDARY> use test
testSet:SECONDARY> db.test.find()
2020-09-08T19:03:02.295+0800 E QUERY  [js] uncaught exception: Error: listCollections failed: {
   "operationTime" : Timestamp(1599562972, 1),
   "ok" : 0,
   "errmsg" : "not master and slaveOk=false",
   "code" : 13435,
   "codeName" : "NotMasterNoSlaveOk",
   "$clusterTime" : {
       "clusterTime" : Timestamp(1599562972, 1),
       "signature" : {
           "hash" : BinData(0,"mhsrpGHRl7qZg2QOjyS3RbBb/Yc="),
           "keyId" : NumberLong("6870069879538450434")
       }
   }
} :
testSet:SECONDARY> rs.slaveOk()
testSet:SECONDARY> db.users.find()
{ "_id" : ObjectId("5f5764b1f909544b783696c2"), "name" : "muyang", "age" : 20 }