Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-70424

BFA floods the Jenkins log with messages about "command 'distinct' requires authentication"

XMLWordPrintable

      I just recognized that there are a lot of messages like the following in our Jenkins log:

      Jan 13 12:23:47 he-jenkins jenkins[2133]: com.mongodb.MongoCommandException: Command failed with error 13 (Unauthorized): 'command distinct requires authentication
      ' on server localhost:27017. The full response is {"ok": 0.0, "errmsg": "command distinct requires authentication", "code": 13, "codeName": "Unauthorized"}
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.mongodb.internal.connection.ProtocolHelper.getCommandFailureException(ProtocolHelper.java:175)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.mongodb.internal.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnectio
      n.java:359)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.mongodb.internal.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:280)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.mongodb.internal.connection.UsageTrackingInternalConnection.sendAndReceive(UsageTrackingInternalConnection
      .java:100)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection.sendAndReceive(DefaultConnectionPool.ja
      va:490)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.mongodb.internal.connection.CommandProtocolImpl.execute(CommandProtocolImpl.java:71)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.mongodb.internal.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:255)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.mongodb.internal.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:202)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.mongodb.internal.connection.DefaultServerConnection.command(DefaultServerConnection.java:118)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.mongodb.internal.connection.DefaultServerConnection.command(DefaultServerConnection.java:110)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.mongodb.internal.operation.CommandOperationHelper.executeCommand(CommandOperationHelper.java:345)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.mongodb.internal.operation.CommandOperationHelper.executeCommand(CommandOperationHelper.java:336)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.mongodb.internal.operation.CommandOperationHelper.executeCommandWithConnection(CommandOperationHelper.java
      :222)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.mongodb.internal.operation.CommandOperationHelper$5.call(CommandOperationHelper.java:208)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.mongodb.internal.operation.OperationHelper.withReadConnectionSource(OperationHelper.java:582)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.mongodb.internal.operation.CommandOperationHelper.executeCommand(CommandOperationHelper.java:205)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.mongodb.internal.operation.DistinctOperation.execute(DistinctOperation.java:182)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.mongodb.internal.operation.DistinctOperation.execute(DistinctOperation.java:62)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.execute(MongoClientDelegate.java:178
      )
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.mongodb.client.internal.MongoIterableImpl.execute(MongoIterableImpl.java:135)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.mongodb.client.internal.MongoIterableImpl.iterator(MongoIterableImpl.java:92)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at org.mongojack.internal.util.DistinctIterableDecorator.iterator(DistinctIterableDecorator.java:92)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.sonyericsson.jenkins.plugins.bfa.db.MongoDBKnowledgeBaseCache.loadCategories(MongoDBKnowledgeBaseCache.jav
      a:179)
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.sonyericsson.jenkins.plugins.bfa.db.MongoDBKnowledgeBaseCache.access$400(MongoDBKnowledgeBaseCache.java:49
      )
      Jan 13 12:23:47 he-jenkins jenkins[2133]:         at com.sonyericsson.jenkins.plugins.bfa.db.MongoDBKnowledgeBaseCache$UpdateThread.run(MongoDBKnowledgeBaseCache.j
      ava:143)
      

      The MongoDB server has authentication enabled and the DB user used by the plugin has the "readWrite" role, which includes the "find" privilege which in turn should allow the "distinct" function.

      Jenkins is 2.332.1, BFA plugin is 2.2.1 and MongoDB is 5.0.14

            t_westling Tomas Westling
            dhs Dirk Heinrichs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: