Core Server
  1. Core Server
  2. SERVER-2961

mongos may try to setShardVersion on a slave

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major - P3 Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.2, 1.9.0
    • Component/s: Sharding
    • Labels:
      None
    • Backport:
      Done
    • Operating System:
      ALL
    • # Replies:
      7
    • Last comment by Customer:
      true

      Description

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

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

        Issue Links

          Activity

          Hide
          auto
          added a comment -

          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

          Show
          auto
          added a comment - 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
          Hide
          auto
          added a comment -

          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

          Show
          auto
          added a comment - 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
          Hide
          auto
          added a comment -

          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

          Show
          auto
          added a comment - 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
          Hide
          Michael Conigliaro
          added a comment -

          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 }
          Show
          Michael Conigliaro
          added a comment - 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 }
          Hide
          Michael Conigliaro
          added a comment -

          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.

          Show
          Michael Conigliaro
          added a comment - 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.
          Hide
          Eliot Horowitz
          added a comment -

          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...

          Show
          Eliot Horowitz
          added a comment - 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...
          Hide
          Michael Conigliaro
          added a comment -
          Show
          Michael Conigliaro
          added a comment - I have created https://jira.mongodb.org/browse/SERVER-3049

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                2 years, 50 weeks, 2 days ago
                Date of 1st Reply: