Why I can't read replicate data in MongoDB? -


i have created replica set 4 mongod running. port: 2017, 2018, 2019, 2020

very standard. followed instruction in documentation.

then set 2020 primary one. , insert data.

then go , login one. e.g. ./mongo localhost:2017

and try find(). returns:

error: { "$err" : "not master", "code": 10107} 

why ?? tried on other replicates , gave me same error.


i notice error in mongod output when insert data.

 failed allocate new file: /home/ec2-user/db/r04/test.1, size: 134217728, aborting. 

i'm no clue what's going on yet.

you need set slaveok when querying slaves.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

sql server - python to mssql encoding problem -

windows - Python Service Installation - "Could not find PythonClass entry" -