Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-4841

Error during MongoDB initialization

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.6
    • 1.5.11, 1.6.0
    • mongomk
    • None

    Description

      In my configuration, there's a NullPointerException when doing
      new DocumentMK.Builder().setMongoDB(db)
      due to the "serverStatus" command not returning the expected object.

      Here's my stacktrace:

      java.lang.NullPointerException
      at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
      at java.util.regex.Matcher.reset(Matcher.java:309)
      at java.util.regex.Matcher.<init>(Matcher.java:229)
      at java.util.regex.Pattern.matcher(Pattern.java:1093)
      at org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore.checkVersion(MongoDocumentStore.java:305)
      at org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore.<init>(MongoDocumentStore.java:236)
      at org.apache.jackrabbit.oak.plugins.document.DocumentMK$Builder.setMongoDB(DocumentMK.java:633)
      at org.apache.jackrabbit.oak.plugins.document.DocumentMK$Builder.setMongoDB(DocumentMK.java:655)

      The "serverStatus" command in MongoDocumentStore constructor returns:

      { "ok" : 0.0 , "errmsg" : "not authorized on <mydatabase> to execute command

      { serverStatus: true }

      " , "code" : 13}

      Prior to version 1.5.6, "buildInfo" command was called instead, which happens to work from a mongo shell, while "serverStatus" doesn't.

      Seems related to OAK-4111.

      Attachments

        Issue Links

          Activity

            People

              mreutegg Marcel Reutegger
              landolina.giovanni Giovanni Landolina
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: