[SERVER-2961] mongos may try to setShardVersion on a slave Created: 19/Apr/11  Updated: 12/Jul/16  Resolved: 19/Apr/11

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 1.8.2, 1.9.0

Type: Bug Priority: Major - P3
Reporter: Eliot Horowitz (Inactive) Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by PYTHON-251 too many attempts to update config, f... Closed
Operating System: ALL
Participants:

 Description   

after using a slave conn, it may try to call setShardVersion on a slave

You'll see something like
setShardVersion failed ... not master



 Comments   
Comment by Michael Conigliaro [ 05/May/11 ]

I have created https://jira.mongodb.org/browse/SERVER-3049

Comment by Eliot Horowitz (Inactive) [ 05/May/11 ]

Its normal to get some after a failover.
If you think there is an issue, please open a new case with all the logs, etc...

Comment by Michael Conigliaro [ 04/May/11 ]

I'm also getting lots of these in my app:

com.mongodb.MongoException: setShardVersion failed host[mongodb05.example:27018]

{ errmsg: "not master", ok: 0.0 }

Interestingly, they don't happen on every request. The app seems to fail with this exception about half the time. Restarting mongos seems to resolve this, though it's not a great workaround. Automatic failover is essentially broken for us at this point.

Comment by Michael Conigliaro [ 04/May/11 ]

Still seeing occasional errors like this in my mongos.log after failover. This is on 1.8.2-rc0.

Wed May 4 22:50:41 [conn3] Assertion: 10429:setShardVersion failed host[mongodb05.example.com:27018]

{ errmsg: "not master", ok: 0.0 }

0x51fc59 0x69ca53 0x69c5e2
/usr/bin/mongos(_ZN5mongo11msgassertedEiPKc+0x129) [0x51fc59]
/usr/bin/mongos() [0x69ca53]
/usr/bin/mongos() [0x69c5e2]
Wed May 4 22:50:41 [conn3] AssertionException in process: setShardVersion failed host[mongodb05.example.com:27018]

{ errmsg: "not master", ok: 0.0 }
Comment by auto [ 19/Apr/11 ]

Author:

{u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

Message: don't use ShardConnection for getMore SERVER-2961
test forthcoming
Branch: v1.8
https://github.com/mongodb/mongo/commit/dff2c6b66e29f2d7b91fe5994d07532adca38135

Comment by auto [ 19/Apr/11 ]

Author:

{u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

Message: test for SERVER-2961 and comment
Branch: master
https://github.com/mongodb/mongo/commit/f8cb1e292c1e7e80ba5627468705cbf0130c82af

Comment by auto [ 19/Apr/11 ]

Author:

{u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

Message: don't use ShardConnection for getMore SERVER-2961
test forthcoming
Branch: master
https://github.com/mongodb/mongo/commit/157ab952e51c0c08e9c6534541ee276a4d9b4292

Generated at Thu Feb 08 03:01:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.