With both drivers whenever I make a query when connecting through a mongoS with the slaveOk parameters, it's always the Master of each shard that anwser, never the secondaries.
However, I tested with the C# drivers, if I connect directly through one replica set with the SlaveOk option, it works fine.
To enable the SlaveOk property, I use the connection string ie."mongodb://server/?slaveOk=true" to tell the drivers I want the slave Ok option. When debugging I can see in my MongoServerSettings object that its SlaveOk property is set to true.
Currently, through mongos, it does not working either with the java drivers nor the C# drivers, and I've also tried the python drivers and its not working.
Is there something specific I need to check or config to make it happened ? Like I said earlier: it does work when connecting directly to the replica set. When I debug using the replica set, I see the 3 servers instance and the drivers know which server is the master and which one are the secondaries. But what happens when those servers sit behind a mongos ? Since the drivers don't know anything about the servers behind the mongos, the mongos need to do the dispatch for the SlaveOk to work correctly. So is there any special configuration required for the mongos to make the SlaveOk work properly ?
If I fire 30k requests to the mongos. When watching the mongostat of each server, I see that its always the master of each shard that is anwsering and none of the secondaries.
Since all the drivers can see is the mongos to whom it is connected, and its SlaveOk setting is set to "true". I assume that it's the mongos that did not forward the queries to the replica set with the mention "SlaveOk = true".
On Tuesday, March 20, 2012 9:54:18 AM UTC-4, Simon T. wrote:
> If I fire 30k requests to the mongos. When watching the mongostat of each > server, I see that its always the master of each shard that is anwsering > and none of the secondaries.
> Since all the drivers can see is the mongos to whom it is connected, and > its SlaveOk setting is set to "true". I assume that it's the mongos that > did not forward the queries to the replica set with the mention "SlaveOk = > true".
> On Monday, March 19, 2012 5:34:04 PM UTC-4, Kristina Chodorow wrote:
>> What makes you think that mongos isn't dispatching these queries to the >> secondaries?
>> On Monday, March 19, 2012 4:42:53 PM UTC-4, Simon T. wrote:
>>> I forgot to mention that I'm using C# drivers 1.3.1 (latest as of now, I >>> believe) and our servers are 2.0.3.
Attached to this message is a .tar file with the mongostat -discover output and the mongos log. The test started around 16:07:05 so you can scroll down to that part.
On Tuesday, March 20, 2012 11:23:31 AM UTC-4, Kristina Chodorow wrote:
> Hmm, can you run mongostat --discover for a few minutes while you do some > queries and then send its output + mongos log from that time?
> On Tuesday, March 20, 2012 9:54:18 AM UTC-4, Simon T. wrote:
>> If I fire 30k requests to the mongos. When watching the mongostat of each >> server, I see that its always the master of each shard that is anwsering >> and none of the secondaries.
>> Since all the drivers can see is the mongos to whom it is connected, and >> its SlaveOk setting is set to "true". I assume that it's the mongos that >> did not forward the queries to the replica set with the mention "SlaveOk = >> true".
>> On Monday, March 19, 2012 5:34:04 PM UTC-4, Kristina Chodorow wrote:
>>> What makes you think that mongos isn't dispatching these queries to the >>> secondaries?
>>> On Monday, March 19, 2012 4:42:53 PM UTC-4, Simon T. wrote:
>>>> I forgot to mention that I'm using C# drivers 1.3.1 (latest as of now, >>>> I believe) and our servers are 2.0.3.
On Tuesday, March 20, 2012 12:31:24 PM UTC-4, Simon T. wrote:
> Thanks for your help Kristina.
> Attached to this message is a .tar file with the mongostat -discover > output and the mongos log. The test started around 16:07:05 so you can > scroll down to that part.
> Thank you very much again.
> Simon
> On Tuesday, March 20, 2012 11:23:31 AM UTC-4, Kristina Chodorow wrote:
>> Hmm, can you run mongostat --discover for a few minutes while you do some >> queries and then send its output + mongos log from that time?
>> On Tuesday, March 20, 2012 9:54:18 AM UTC-4, Simon T. wrote:
>>> If I fire 30k requests to the mongos. When watching the mongostat of >>> each server, I see that its always the master of each shard that is >>> anwsering and none of the secondaries.
>>> Since all the drivers can see is the mongos to whom it is connected, and >>> its SlaveOk setting is set to "true". I assume that it's the mongos that >>> did not forward the queries to the replica set with the mention "SlaveOk = >>> true".
>>> On Monday, March 19, 2012 5:34:04 PM UTC-4, Kristina Chodorow wrote:
>>>> What makes you think that mongos isn't dispatching these queries to the >>>> secondaries?
>>>> On Monday, March 19, 2012 4:42:53 PM UTC-4, Simon T. wrote:
>>>>> I forgot to mention that I'm using C# drivers 1.3.1 (latest as of now, >>>>> I believe) and our servers are 2.0.3.
On Tuesday, March 20, 2012 12:35:35 PM UTC-4, Simon T. wrote:
> By the way, I'm aware of the issue with the server 1 and 3 on shardB.
> On Tuesday, March 20, 2012 12:31:24 PM UTC-4, Simon T. wrote:
>> Thanks for your help Kristina.
>> Attached to this message is a .tar file with the mongostat -discover >> output and the mongos log. The test started around 16:07:05 so you can >> scroll down to that part.
>> Thank you very much again.
>> Simon
>> On Tuesday, March 20, 2012 11:23:31 AM UTC-4, Kristina Chodorow wrote:
>>> Hmm, can you run mongostat --discover for a few minutes while you do >>> some queries and then send its output + mongos log from that time?
>>> On Tuesday, March 20, 2012 9:54:18 AM UTC-4, Simon T. wrote:
>>>> If I fire 30k requests to the mongos. When watching the mongostat of >>>> each server, I see that its always the master of each shard that is >>>> anwsering and none of the secondaries.
>>>> Since all the drivers can see is the mongos to whom it is connected, >>>> and its SlaveOk setting is set to "true". I assume that it's the mongos >>>> that did not forward the queries to the replica set with the mention >>>> "SlaveOk = true".
>>>> On Monday, March 19, 2012 5:34:04 PM UTC-4, Kristina Chodorow wrote:
>>>>> What makes you think that mongos isn't dispatching these queries to >>>>> the secondaries?
>>>>> On Monday, March 19, 2012 4:42:53 PM UTC-4, Simon T. wrote:
>>>>>> I forgot to mention that I'm using C# drivers 1.3.1 (latest as of >>>>>> now, I believe) and our servers are 2.0.3.
> ...and send the output? (Replacing collectionYouAreQueryingFromC# and /* > somequery */ :) )
> On Tuesday, March 20, 2012 12:35:35 PM UTC-4, Simon T. wrote:
>> By the way, I'm aware of the issue with the server 1 and 3 on shardB.
>> On Tuesday, March 20, 2012 12:31:24 PM UTC-4, Simon T. wrote:
>>> Thanks for your help Kristina.
>>> Attached to this message is a .tar file with the mongostat -discover >>> output and the mongos log. The test started around 16:07:05 so you can >>> scroll down to that part.
>>> Thank you very much again.
>>> Simon
>>> On Tuesday, March 20, 2012 11:23:31 AM UTC-4, Kristina Chodorow wrote:
>>>> Hmm, can you run mongostat --discover for a few minutes while you do >>>> some queries and then send its output + mongos log from that time?
>>>> On Tuesday, March 20, 2012 9:54:18 AM UTC-4, Simon T. wrote:
>>>>> If I fire 30k requests to the mongos. When watching the mongostat of >>>>> each server, I see that its always the master of each shard that is >>>>> anwsering and none of the secondaries.
>>>>> Since all the drivers can see is the mongos to whom it is connected, >>>>> and its SlaveOk setting is set to "true". I assume that it's the mongos >>>>> that did not forward the queries to the replica set with the mention >>>>> "SlaveOk = true".
>>>>> On Monday, March 19, 2012 5:34:04 PM UTC-4, Kristina Chodorow wrote:
>>>>>> What makes you think that mongos isn't dispatching these queries to >>>>>> the secondaries?
>>>>>> On Monday, March 19, 2012 4:42:53 PM UTC-4, Simon T. wrote:
>>>>>>> I forgot to mention that I'm using C# drivers 1.3.1 (latest as of >>>>>>> now, I believe) and our servers are 2.0.3.
On Mon, Mar 19, 2012 at 5:34 PM, Kristina Chodorow <krist...@10gen.com> wrote: > What makes you think that mongos isn't dispatching these queries to the > secondaries?
> On Monday, March 19, 2012 4:42:53 PM UTC-4, Simon T. wrote:
>> I forgot to mention that I'm using C# drivers 1.3.1 (latest as of now, I >> believe) and our servers are 2.0.3.
> To post to this group, send email to mongodb-user@googlegroups.com. > To unsubscribe from this group, send email to > mongodb-user+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/mongodb-user?hl=en.
} On Wednesday, March 21, 2012 11:15:24 AM UTC-4, Scott Hernandez wrote:
> Can you please post the output from these command connected to a mongos:
> use config > db.shards.find() > db.printShardingStatus()
> On Mon, Mar 19, 2012 at 5:34 PM, Kristina Chodorow <krist...@10gen.com> > wrote: > > What makes you think that mongos isn't dispatching these queries to the > > secondaries?
> > On Monday, March 19, 2012 4:42:53 PM UTC-4, Simon T. wrote:
> >> I forgot to mention that I'm using C# drivers 1.3.1 (latest as of now, I > >> believe) and our servers are 2.0.3.
> > To post to this group, send email to mongodb-user@googlegroups.com. > > To unsubscribe from this group, send email to > > mongodb-user+unsubscribe@googlegroups.com. > > For more options, visit this group at > > http://groups.google.com/group/mongodb-user?hl=en.
Hmm... still weird. Can you up the logLevel of the mongos to 5 temporarily - this will give us the exact options being used by the query as it is dispatched.
> On Wednesday, March 21, 2012 11:15:24 AM UTC-4, Scott Hernandez wrote:
>> Can you please post the output from these command connected to a mongos:
>> use config >> db.shards.find() >> db.printShardingStatus()
>> On Mon, Mar 19, 2012 at 5:34 PM, Kristina Chodorow <krist...@10gen.com> >> wrote: >> > What makes you think that mongos isn't dispatching these queries to the >> > secondaries?
>> > On Monday, March 19, 2012 4:42:53 PM UTC-4, Simon T. wrote:
>> >> I forgot to mention that I'm using C# drivers 1.3.1 (latest as of now, >> I >> >> believe) and our servers are 2.0.3.
>> > To post to this group, send email to mongodb-user@googlegroups.com. >> > To unsubscribe from this group, send email to >> > mongodb-user+unsubscribe@googlegroups.com. >> > For more options, visit this group at >> > http://groups.google.com/group/mongodb-user?hl=en.
Hi guys, here is the logs. I've enable it and launch a couple a query.
A line that caught my attention was:
Fri Mar 23 13:58:19 [conn380] dbclient_rs getSlave not selecting { addr: "osmngb02:27018", isMaster: false, secondary: true, hidden: false, ok: false }, not currently okForSecondaryQueries
On Thursday, March 22, 2012 12:14:42 PM UTC-4, Greg Studer wrote:
> Hmm... still weird. Can you up the logLevel of the mongos to 5 > temporarily - this will give us the exact options being used by the query > as it is dispatched.
>> On Wednesday, March 21, 2012 11:15:24 AM UTC-4, Scott Hernandez wrote:
>>> Can you please post the output from these command connected to a mongos:
>>> use config
>>> db.shards.find()
>>> db.printShardingStatus()
>>> On Mon, Mar 19, 2012 at 5:34 PM, Kristina Chodorow <krist...@10gen.com> >>> wrote:
>>> > What makes you think that mongos isn't dispatching these queries to the
>>> > secondaries?
>>> > On Monday, March 19, 2012 4:42:53 PM UTC-4, Simon T. wrote:
>>> >> I forgot to mention that I'm using C# drivers 1.3.1 (latest as of >>> now, I
>>> >> believe) and our servers are 2.0.3.
>>> > To post to this group, send email to mongodb-user@googlegroups.com.
>>> > To unsubscribe from this group, send email to
>>> > mongodb-user+unsubscribe@googlegroups.com<mongodb-user%2Bunsubscribe@googl egroups.com>
>>> .
>>> > For more options, visit this group at
>>> > http://groups.google.com/group/mongodb-user?hl=en<http://groups.google.com/group/mongodb-user?hl=en>
>>> .
Thanks for the log! It looks like it's getting back healthy responses from the secondaries but not updating that they are healthy. I'm not sure why it's not refreshing the secondaries' health, I've created a bug for it you can track: https://jira.mongodb.org/browse/SERVER-5405.
In the meantime, have you tried restarting the mongos?
On Friday, March 23, 2012 10:43:43 AM UTC-4, Simon T. wrote:
> Hi guys, here is the logs. I've enable it and launch a couple a query.
> A line that caught my attention was:
> Fri Mar 23 13:58:19 [conn380] dbclient_rs getSlave not selecting { addr: > "osmngb02:27018", isMaster: false, secondary: true, hidden: false, ok: > false }, not currently okForSecondaryQueries
> Attached is a sample of the log file.
> Tell me what do you think.
> Simon
> On Thursday, March 22, 2012 12:14:42 PM UTC-4, Greg Studer wrote:
>> Hmm... still weird. Can you up the logLevel of the mongos to 5 >> temporarily - this will give us the exact options being used by the query >> as it is dispatched.
>>> On Wednesday, March 21, 2012 11:15:24 AM UTC-4, Scott Hernandez wrote:
>>>> Can you please post the output from these command connected to a mongos:
>>>> use config
>>>> db.shards.find()
>>>> db.printShardingStatus()
>>>> On Mon, Mar 19, 2012 at 5:34 PM, Kristina Chodorow <krist...@10gen.com> >>>> wrote:
>>>> > What makes you think that mongos isn't dispatching these queries to >>>> the
>>>> > secondaries?
>>>> > On Monday, March 19, 2012 4:42:53 PM UTC-4, Simon T. wrote:
>>>> >> I forgot to mention that I'm using C# drivers 1.3.1 (latest as of >>>> now, I
>>>> >> believe) and our servers are 2.0.3.
>>>> > To post to this group, send email to mongodb-user@googlegroups.com.
>>>> > To unsubscribe from this group, send email to
>>>> > mongodb-user+unsubscribe@googlegroups.com<mongodb-user%2Bunsubscribe@googl egroups.com>
>>>> .
>>>> > For more options, visit this group at
>>>> > http://groups.google.com/group/mongodb-user?hl=en<http://groups.google.com/group/mongodb-user?hl=en>
>>>> .
On Monday, March 26, 2012 11:29:36 AM UTC-4, Kristina Chodorow wrote:
> Thanks for the log! It looks like it's getting back healthy responses > from the secondaries but not updating that they are healthy. I'm not sure > why it's not refreshing the secondaries' health, I've created a bug for it > you can track: https://jira.mongodb.org/browse/SERVER-5405.
> In the meantime, have you tried restarting the mongos?
> On Friday, March 23, 2012 10:43:43 AM UTC-4, Simon T. wrote:
>> Hi guys, here is the logs. I've enable it and launch a couple a query.
>> A line that caught my attention was:
>> Fri Mar 23 13:58:19 [conn380] dbclient_rs getSlave not selecting { addr: >> "osmngb02:27018", isMaster: false, secondary: true, hidden: false, ok: >> false }, not currently okForSecondaryQueries
>> Attached is a sample of the log file.
>> Tell me what do you think.
>> Simon
>> On Thursday, March 22, 2012 12:14:42 PM UTC-4, Greg Studer wrote:
>>> Hmm... still weird. Can you up the logLevel of the mongos to 5 >>> temporarily - this will give us the exact options being used by the query >>> as it is dispatched.
>>>> On Wednesday, March 21, 2012 11:15:24 AM UTC-4, Scott Hernandez wrote:
>>>>> Can you please post the output from these command connected to a >>>>> mongos:
>>>>> use config
>>>>> db.shards.find()
>>>>> db.printShardingStatus()
>>>>> On Mon, Mar 19, 2012 at 5:34 PM, Kristina Chodorow <krist...@10gen.com> >>>>> wrote:
>>>>> > What makes you think that mongos isn't dispatching these queries to >>>>> the
>>>>> > secondaries?
>>>>> > On Monday, March 19, 2012 4:42:53 PM UTC-4, Simon T. wrote:
>>>>> >> I forgot to mention that I'm using C# drivers 1.3.1 (latest as of >>>>> now, I
>>>>> >> believe) and our servers are 2.0.3.
>>>>> > To post to this group, send email to mongodb-user@googlegroups.com.
>>>>> > To unsubscribe from this group, send email to
>>>>> > mongodb-user+unsubscribe@googlegroups.com<mongodb-user%2Bunsubscribe@googl egroups.com>
>>>>> .
>>>>> > For more options, visit this group at
>>>>> > http://groups.google.com/group/mongodb-user?hl=en<http://groups.google.com/group/mongodb-user?hl=en>
>>>>> .
Yes, I can confirm MongoS servers were restarted but it doesn’t make any difference.
I've quickly created a test php code to simulate this problem and I see exactly same behaviour as Simon (he's testing java and c# drivers I believe).
Also if I run queries directly from MongoS shell I still see only primary nodes of each shard responding.
As Simon mentioned I am currently attuning MongoDB training in London so I had a chance to show our mongo environment to Chris Harris - he had quick look and according to him servers are healthy and overall setup is OK...
On Monday, 26 March 2012 16:29:36 UTC+1, Kristina Chodorow wrote:
> Thanks for the log! It looks like it's getting back healthy responses > from the secondaries but not updating that they are healthy. I'm not sure > why it's not refreshing the secondaries' health, I've created a bug for it > you can track: https://jira.mongodb.org/browse/SERVER-5405.
> In the meantime, have you tried restarting the mongos?
> On Friday, March 23, 2012 10:43:43 AM UTC-4, Simon T. wrote:
>> Hi guys, here is the logs. I've enable it and launch a couple a query.
>> A line that caught my attention was:
>> Fri Mar 23 13:58:19 [conn380] dbclient_rs getSlave not selecting { addr: >> "osmngb02:27018", isMaster: false, secondary: true, hidden: false, ok: >> false }, not currently okForSecondaryQueries
>> Attached is a sample of the log file.
>> Tell me what do you think.
>> Simon
>> On Thursday, March 22, 2012 12:14:42 PM UTC-4, Greg Studer wrote:
>>> Hmm... still weird. Can you up the logLevel of the mongos to 5 >>> temporarily - this will give us the exact options being used by the query >>> as it is dispatched.
>>>> On Wednesday, March 21, 2012 11:15:24 AM UTC-4, Scott Hernandez wrote:
>>>>> Can you please post the output from these command connected to a >>>>> mongos:
>>>>> use config
>>>>> db.shards.find()
>>>>> db.printShardingStatus()
>>>>> On Mon, Mar 19, 2012 at 5:34 PM, Kristina Chodorow <krist...@10gen.com> >>>>> wrote:
>>>>> > What makes you think that mongos isn't dispatching these queries to >>>>> the
>>>>> > secondaries?
>>>>> > On Monday, March 19, 2012 4:42:53 PM UTC-4, Simon T. wrote:
>>>>> >> I forgot to mention that I'm using C# drivers 1.3.1 (latest as of >>>>> now, I
>>>>> >> believe) and our servers are 2.0.3.
>>>>> > To post to this group, send email to mongodb-user@googlegroups.com.
>>>>> > To unsubscribe from this group, send email to
>>>>> > mongodb-user+unsubscribe@googlegroups.com<mongodb-user%2Bunsubscribe@googl egroups.com>
>>>>> .
>>>>> > For more options, visit this group at
>>>>> > http://groups.google.com/group/mongodb-user?hl=en<http://groups.google.com/group/mongodb-user?hl=en>
>>>>> .
On Monday, 26 March 2012 16:29:36 UTC+1, Kristina Chodorow wrote:
> Thanks for the log! It looks like it's getting back healthy responses > from the secondaries but not updating that they are healthy. I'm not sure > why it's not refreshing the secondaries' health, I've created a bug for it > you can track: https://jira.mongodb.org/browse/SERVER-5405.
> In the meantime, have you tried restarting the mongos?
> On Friday, March 23, 2012 10:43:43 AM UTC-4, Simon T. wrote:
>> Hi guys, here is the logs. I've enable it and launch a couple a query.
>> A line that caught my attention was:
>> Fri Mar 23 13:58:19 [conn380] dbclient_rs getSlave not selecting { addr: >> "osmngb02:27018", isMaster: false, secondary: true, hidden: false, ok: >> false }, not currently okForSecondaryQueries
>> Attached is a sample of the log file.
>> Tell me what do you think.
>> Simon
>> On Thursday, March 22, 2012 12:14:42 PM UTC-4, Greg Studer wrote:
>>> Hmm... still weird. Can you up the logLevel of the mongos to 5 >>> temporarily - this will give us the exact options being used by the query >>> as it is dispatched.
Yes, it looks like a bug in mongos, so it won't matter what language you use. If you connect directly to a replica set primary and run rs.status(), what is the output?
On Tuesday, 27 March 2012 15:07:40 UTC+1, Kristina Chodorow wrote: > Yes, it looks like a bug in mongos, so it won't matter what language you > use. If you connect directly to a replica set primary and run rs.status(), > what is the output?
> On Tuesday, March 27, 2012 9:42:10 AM UTC-4, Simon T. wrote:
>> I confirm that I've tested it with Java, C# and python drivers.
> On Tuesday, 27 March 2012 15:07:40 UTC+1, Kristina Chodorow wrote:
>> Yes, it looks like a bug in mongos, so it won't matter what language you >> use. If you connect directly to a replica set primary and run rs.status(), >> what is the output?
>> On Tuesday, March 27, 2012 9:42:10 AM UTC-4, Simon T. wrote:
>>> I confirm that I've tested it with Java, C# and python drivers.
Would it be possible to provide the test scripts you were using? Is this problem persistent, meaning does it not resolve after some time? I am asking this because there is a background thread that tries to refresh the state of all replica set connections every 10 seconds.
>> On Tuesday, 27 March 2012 15:07:40 UTC+1, Kristina Chodorow wrote:
>>> Yes, it looks like a bug in mongos, so it won't matter what language you >>> use. If you connect directly to a replica set primary and run rs.status(), >>> what is the output?
>>> On Tuesday, March 27, 2012 9:42:10 AM UTC-4, Simon T. wrote:
>>>> I confirm that I've tested it with Java, C# and python drivers.
Are you still having this issue? I am struggling to reproduce this bug. Do you have a verbose logs of the replicas that corresponds to the same time frame with the verbose mongos log that is experiencing this issue?
first - let me confirm - yes, the issue is permanent - its been like this since we have noticed it long time ago.
Saying that, the logs Simon posted on March 23 are exactly what you are asking for - i.e, verbose logs from the time frame while we are experiencing the issue.
BTW I would suggest to take this conversation offline until we find the solution, possibly to an email thread as I am slightly uncomfortable talking about our set-up on public forum ( this is production mongo we having issue with). I will try to contact you through G+ with private message.
On Wednesday, 4 April 2012 21:40:55 UTC+1, Randolph Tan wrote:
> Are you still having this issue? I am struggling to reproduce this bug. Do > you have a verbose logs of the replicas that corresponds to the same time > frame with the verbose mongos log that is experiencing this issue?
> On Thursday, March 29, 2012 3:27:40 PM UTC-4, Simon T. wrote:
>> The problem is indeed persistent, I never could get the queries to be >> redirected to the secondary while passing by the mongos.
>> The scripts are very simple: it is just looping queries. Here is two >> examples that does the same thing, one in java and the other one in C#:
>> JAVA: >> try { >> Mongo _mongo = new Mongo("osmngs01", 27017); >> _mongo.setReadPreference(ReadPreference.SECONDARY); >> DB db = _mongo.getDB("AAAAA"); >> if (db.authenticate("XXXXXXX", "YYYYYYYY".toCharArray()) == false) { >> String message = String.format("Initialization Error: Failed to >> authenticate to %1$s.", "osmngs01"); >> System.out.println(message); >> }
On Wednesday, 4 April 2012 21:40:55 UTC+1, Randolph Tan wrote:
> Are you still having this issue? I am struggling to reproduce this bug. Do > you have a verbose logs of the replicas that corresponds to the same time > frame with the verbose mongos log that is experiencing this issue?
> On Thursday, March 29, 2012 3:27:40 PM UTC-4, Simon T. wrote:
>> The problem is indeed persistent, I never could get the queries to be >> redirected to the secondary while passing by the mongos.
>> The scripts are very simple: it is just looping queries. Here is two >> examples that does the same thing, one in java and the other one in C#:
>> JAVA: >> try { >> Mongo _mongo = new Mongo("osmngs01", 27017); >> _mongo.setReadPreference(ReadPreference.SECONDARY); >> DB db = _mongo.getDB("AAAAA"); >> if (db.authenticate("XXXXXXX", "YYYYYYYY".toCharArray()) == false) { >> String message = String.format("Initialization Error: Failed to >> authenticate to %1$s.", "osmngs01"); >> System.out.println(message); >> }
here is the full log (level:5) of a RS, mongos and mongostat
The procedure was:
1. Start fresh log on a server 2. db.runCommand({ setParameter : 1, logLevel : 5 }) 3. Start a load test with the scripts that you can find on this thread