Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major - P3 Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.5
    • Component/s: Cluster Management
    • Labels:
      None
    • Environment:
      1.62 linux 64 bit server
    • Operating System:
      Linux
    • # Replies:
      12
    • Last comment by Customer:
      true

      Description

      When the whole replica set is down, java driver generates this log message every 5 seconds.

      2010-12-06 14:35:10,294 ERROR [STDERR] (ReplicaSetStatus:Updater) Dec 6, 2010 2:35:10 PM com.mongodb.ReplicaSetStatus$Node update
      SEVERE: can't update node: shared-mongo-004.1515.mtvi.com:27017
      java.lang.NullPointerException
      at com.mongodb.OutMessage.reset(OutMessage.java:73)
      at com.mongodb.OutMessage.<init>(OutMessage.java:51)
      at com.mongodb.OutMessage.query(OutMessage.java:38)
      at com.mongodb.DBPort.findOne(DBPort.java:142)
      at com.mongodb.DBPort.runCommand(DBPort.java:159)
      at com.mongodb.ReplicaSetStatus$Node.update(ReplicaSetStatus.java:119)
      at com.mongodb.ReplicaSetStatus.updateAll(ReplicaSetStatus.java:277)
      at com.mongodb.ReplicaSetStatus$Updater.run(ReplicaSetStatus.java:238)

      Seems like an NPE is not what should happen. Strange thing is that OutMessage.java:73 is

              _id = ID.getAndIncrement();
      

      and I'm not sure how that line could generate an NPE.

        Activity

        Hide
        Jeff Yemin (Inactive)
        added a comment -

        I tried with a simple test program and couldn't reproduce it, which is not surprising.

        Show
        Jeff Yemin (Inactive)
        added a comment - I tried with a simple test program and couldn't reproduce it, which is not surprising.
        Hide
        Antoine Girbal
        added a comment -

        I attached a jar file that has a new init block for the ID field.

        private final static AtomicInteger ID;

        static

        { ID = new AtomicInteger(1); }

        let me know if it makes any difference.
        Note this .jar is from trunk and should not be used in production.

        Show
        Antoine Girbal
        added a comment - I attached a jar file that has a new init block for the ID field. private final static AtomicInteger ID; static { ID = new AtomicInteger(1); } let me know if it makes any difference. Note this .jar is from trunk and should not be used in production.
        Hide
        Antoine Girbal
        added a comment -

        let me know if you are still experiencing the problem with newest driver.
        If not I'll close ticket thx

        Show
        Antoine Girbal
        added a comment - let me know if you are still experiencing the problem with newest driver. If not I'll close ticket thx
        Hide
        Jeff Yemin
        added a comment -

        I haven't see it again, but I haven't brought down the replica set entirely. This is definitely not high priority for us though.

        Show
        Jeff Yemin
        added a comment - I haven't see it again, but I haven't brought down the replica set entirely. This is definitely not high priority for us though.
        Hide
        Antoine Girbal
        added a comment -

        will reopen if issues is brought up again.

        Show
        Antoine Girbal
        added a comment - will reopen if issues is brought up again.

          People

          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

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