Last active
June 23, 2020 19:36
-
-
Save psihonavt/bc3cd5491cafd68e899817a488edfeae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@app1 ~]# mongo messagesdb1.virtual.ninternal.com:27017 | |
MongoDB shell version: 3.0.12 | |
connecting to: messagesdb1.virtual.ninternal.com:27017/test | |
Server has startup warnings: | |
2020-06-21T15:17:57.671+0000 I CONTROL [initandlisten] | |
2020-06-21T15:17:57.671+0000 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database. | |
2020-06-21T15:17:57.671+0000 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted. | |
2020-06-21T15:17:57.671+0000 I CONTROL [initandlisten] | |
2020-06-21T15:17:57.672+0000 I CONTROL [initandlisten] | |
2020-06-21T15:17:57.672+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'. | |
2020-06-21T15:17:57.672+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never' | |
2020-06-21T15:17:57.672+0000 I CONTROL [initandlisten] | |
2020-06-21T15:17:57.672+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'. | |
2020-06-21T15:17:57.672+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never' | |
2020-06-21T15:17:57.672+0000 I CONTROL [initandlisten] | |
messagesdbvirtual:PRIMARY> db.test.insert({v: 4}) | |
WriteResult({ "nInserted" : 1 }) | |
messagesdbvirtual:PRIMARY> | |
bye | |
[root@app1 ~]# mongo messagesdb2.virtual.ninternal.com:27017 | |
MongoDB shell version: 3.0.12 | |
connecting to: messagesdb2.virtual.ninternal.com:27017/test | |
Server has startup warnings: | |
2020-06-21T15:20:51.643+0000 I CONTROL [initandlisten] | |
2020-06-21T15:20:51.643+0000 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database. | |
2020-06-21T15:20:51.643+0000 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted. | |
2020-06-21T15:20:51.643+0000 I CONTROL [initandlisten] | |
2020-06-21T15:20:51.643+0000 I CONTROL [initandlisten] | |
2020-06-21T15:20:51.643+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'. | |
2020-06-21T15:20:51.643+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never' | |
2020-06-21T15:20:51.643+0000 I CONTROL [initandlisten] | |
2020-06-21T15:20:51.643+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'. | |
2020-06-21T15:20:51.644+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never' | |
2020-06-21T15:20:51.644+0000 I CONTROL [initandlisten] | |
messagesdbvirtual:SECONDARY> db.test.find({v: 4}) | |
Error: error: { "$err" : "not master and slaveOk=false", "code" : 13435, "ok" : 0 } | |
messagesdbvirtual:SECONDARY> rs.slaveOk() | |
messagesdbvirtual:SECONDARY> db.test.find({v: 4}) | |
{ "_id" : ObjectId("5ef258e1582c4c592d65ded9"), "v" : 4 } | |
messagesdbvirtual:SECONDARY> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment