1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
| root@master-100:~ Current Mongosh Log ID: 658a701121e3220f6524dba8 Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.1.1 Using MongoDB: 6.0.12 Using Mongosh: 2.1.1
test> rs.initiate( ... { ... _id: "rs-mongodb", ... version: 1, ... members: [ ... { _id: 0, host : "127.0.0.1:27017", priority: 1, votes: 1 }, ... { _id: 1, host : "127.0.0.1:27018", priority: 1, votes: 1 }, ... { _id: 2, host : "127.0.0.1:27019", priority: 1, votes: 1 } ... ] ... } ... ) { ok: 1 }
rs-mongodb [direct: primary] test> rs.status() { set: 'rs-mongodb', date: ISODate('2023-12-26T06:28:42.783Z'), myState: 1, term: Long('1'), syncSourceHost: '', syncSourceId: -1, heartbeatIntervalMillis: Long('2000'), ......
root@master-100:~ Current Mongosh Log ID: 658a7604ad491f8e96942a6d Connecting to: mongodb://127.0.0.1:27017,127.0.0.1:27018,127.0.0.1:27019/?replicaSet=rs-mongodb&readPreference=secondaryPreferred&serverSelectionTimeoutMS=2000&appName=mongosh+2.1.1 Using MongoDB: 6.0.12 Using Mongosh: 2.1.1
For mongosh info see: https://docs.mongodb.com/mongodb-shell/
------ The server generated these startup warnings when booting 2023-12-26T14:06:09.470+08:00: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem 2023-12-26T14:06:10.080+08:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted 2023-12-26T14:06:10.080+08:00: You are running this process as the root user, which is not recommended 2023-12-26T14:06:10.080+08:00: /sys/kernel/mm/transparent_hugepage/enabled is 'always'. We suggest setting it to 'never' 2023-12-26T14:06:10.081+08:00: Soft rlimits for open file descriptors too low ------
rs-mongodb [primary] test>
|