LỖI NOT MASTER AND SLAVEOK=FALSE
An error occurred while loading navigation: ‘not master và slaveOk=false’: It is recommended khổng lồ change your read preference in the connection dialog lớn Primary Preferred or Secondary Preferred or provide a replica mix name for a full topology connection.
Bạn đang xem: Lỗi not master and slaveok=false
Milo_98897
It might be due to lớn some network related issue.
Can you please make sure you are able to ping the cluster?
ping cluster0-shard-00-00-jxeqq.thietkewebhcm.com.vn.net
And also please verify that port 27017 is not blocked by clicking http://portquiz.net:27017
On some occasions, even though the above mentioned tests passes, network is still a problem. So please make sure you are not connected khổng lồ any vpn và firewall/antivirus is disabled. You can also try khổng lồ connect from some other network such as your home network .
Hope it helps!
If the issue still persists please feel không tính tiền to get back lớn us. Happy Learning

Thanks,Shubham RanjanCurriculum support Engineer
Milo_98897:
not master và slaveOk=false
I doubt this is a networking issue but I could be wrong.
Based on the error message:
27017 is a Secondarythis Secondary node doesn’t accept reads (i.e. SlaveOk is false). As a result, any Read Preference that attempts lớn read from a Secondary will fail.Therefore, the only two options I can see is, use the port number belonging to lớn the Primary, or if you don’t know what the other ports are, use SRV.
Another student on another thread reported that the Primary for this replica phối (if I remember correctly) keeps changing.
SRV causes Compass to not see the Mongod instance.
Thanks for your reply. After trying again this morning (with absolutely no changes on my end, same saved ‘favorite’ connection) the problem seems khổng lồ have resolved, and i can successfully connect.
I had of course already checked the ping, which showed all packets successful.
Thanks for your reply. After trying again this morning (with absolutely no changes on my end, same saved ‘favorite’ connection) the problem seems to lớn have resolved, and i can successfully connect.
Thanks for your reply. After trying again this morning (with absolutely no changes on my end, same saved ‘favorite’ connection) the problem seems to have resolved, và i can successfully connect.
Milo_98897:
007_jb:
I doubt this is a networking issue but I could be wrong.
In Compass, network related issues manifest in so many ways that it is hard to lớn keep it out of the consideration when debugging any issue & it is always preferred to lớn make sure that at least these two basics tests are passing before going any further.
Xem thêm: Lưu Trữ Đám Mây Android, Cách Lưu Ảnh, Video, Dữ Liệu Trực Tuyến
007_jb:
Based on the error message:
27017 is a Secondarythis Secondary node doesn’t accept reads (i.e. SlaveOk is false). As a result, any Read Preference that attempts to lớn read from a Secondary will fail.27017 is the port number on which the clusters are running. All the nodes in the Cluster0-shard-0 replica mix which we use in our M001 : thietkewebhcm.com.vn Basics course runs on the same port i.e. 27017.
You can easily verify this by connecting to lớn the cluster from the mongo shell & then running the command rs.status()
Yes, this is correct that the secondaries will not serve the read requests if the slaveOk property for the current connection has been set lớn false but for this replica mix it does not apply because this property has been set lớn true and read from secondaries are permissible.
Milo_98897:
In your connection string if you have included the name of the replica phối along with any of its members host & port address, you should not worry about which node is the primary because it will always connect you to the primary.
In this screenshot, I can see that the replica mix name has been provided so which node is the primary is not of any concern here.
Another student on another thread reported that the Primary for this replica set (if I remember correctly) keeps changing.
Yes, the primary nodes keeps on changing from time to time due to lớn some very obvious reasons. The thread that you are referring khổng lồ here was for one of our student’s sandbox cluster.
Ok. SRV isn’t setup in this Cluster.
You can totally connect lớn the atlas class cluster using the SRV Records as it has been already configured for the same. For doing that please use the connection string mentioned below và select the SRV Record option.
cluster0-jxeqq.thietkewebhcm.com.vn.netHope it helps. BTW, I like your debugging style & your engagement with the community. Keep up the good work

Thanks,Shubham RanjanCurriculum support Engineer
27017 is the port number on which the clusters are running. All the nodes in the Cluster0-shard-0 replica set which we use in our M001 : thietkewebhcm.com.vn Basics course runs on the same port i.e. 27017 .
I didn’t take this course so I was none the wiser about the setup. I was expecting the cài đặt to be similar to lớn all other courses that use different ports per node. & I can now see that it’s running on the same port with different host names after login in yesterday for the first time.
Yes, this is correct that the secondaries will not serve the read requests if the slaveOk property for the current connection has been set lớn false but for this replica set it does not apply because this property has been set to lớn true and read from secondaries are permissible.
Good lớn know for future debugging!


cluster0-jxeqq.thietkewebhcm.com.vn.net
Good to know too! You guys don’t seem lớn recommend this option most times. Any particular reasons?
Hope it helps. BTW, I lượt thích your debugging style and your engagement with the community. Keep up the good work

Thanks! vị what we can lớn help!

Good to lớn know too! You guys don’t seem to lớn recommend this option most times. Any particular reasons?
When the videos were recorded, Compass did not have this functionality. At the moment, we vì not recommend this because it may create unnecessary confusion among the learners.