-
-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NotMasterNoSlaveOk #167
Comments
@valeriomazzeo It seems MongoKitten sent a query to one of the slaves. This is only possible for read queries where slaveOK is explicitly true. MongoKitten never sets slaveOK to true, so that explains the error. What query were you running? |
I am not sure, as I was using Fluent, so this must be coming from the driver. |
Yes. Your primary MongoDB server's node's connection went offline for whatever reason and MongoKitten (had to) switch to a secondary node. Probably picked the wrong one. |
ok, so how could we prevent this to happen or to properly recover? |
@Joannis ? |
You can shutdown MongoKitten's server object and it'll reconnect the next query. |
I suppose when using mongo-driver with fluent it should be the driver to take care of this? |
The Fluent driver, yes. |
I'm closing this, since it's a Fluent issue. |
I keep randomly getting this error, not sure what could be the cause:
MongoKitten.MongoError.invalidResponse([{\"ok\":0.0,\"codeName\":\"NotMasterNoSlaveOk\",\"errmsg\":\"not master and slaveOk=false\",\"code\":13435}])
Environment:
The text was updated successfully, but these errors were encountered: