com.mongodb.CommandFailureException: { "serverUsed" : "/****" , "errmsg" : "auth fails" , "ok" : 0.0} { "serverUsed" : "****" , "errmsg" : "auth fails" , "ok" : 0.0}

Pentaho BI Platform Tracking | Gregory | 2 years ago
  1. 0

    I created MongoDBInput step and fill login field with string "${myUser}" and password with "${myPassword}". And I want to use the same transformation with different databases by using those variables. On one of my servers i use admin/querty as login/password. With those server transformation works well. Other have no authorization. So, if i set myUser and myPassword variables to empty strings, i'll receive exception: {noformat} INFO 28-08 21:49:48,842 - My mongodb input step - Normal authentication for user INFO 28-08 21:49:48,855 - My mongodb input step - Configuring connection with read preference: primary INFO 28-08 21:49:48,856 - My mongodb input step - No read preference tag sets defined INFO 28-08 21:49:48,856 - My mongodb input step - Configuring connection with default write concern - w = 1, wTimeout: 0, journaled = false ERROR 28-08 21:49:48,966 - My mongodb input step - There was an error connecting to MongoDB with host ****, port ****, database bla-bla-bla and collection my_collection: ERROR 28-08 21:49:48,966 - My mongodb input step - org.pentaho.di.core.exception.KettleException: com.mongodb.CommandFailureException: { "serverUsed" : "/****" , "errmsg" : "auth fails" , "ok" : 0.0} { "serverUsed" : "****" , "errmsg" : "auth fails" , "ok" : 0.0} at org.pentaho.mongo.wrapper.UsernamePasswordMongoClientWrapper.getDb(UsernamePasswordMongoClientWrapper.java:95) at org.pentaho.mongo.wrapper.NoAuthMongoClientWrapper.getCollection(NoAuthMongoClientWrapper.java:1104) at org.pentaho.di.trans.steps.mongodbinput.MongoDbInput.init(MongoDbInput.java:248) at org.pentaho.di.trans.step.StepInitThread.run(StepInitThread.java:62) at java.lang.Thread.run(Thread.java:662) Caused by: com.mongodb.CommandFailureException: { "serverUsed" : "/****" , "errmsg" : "auth fails" , "ok" : 0.0} at com.mongodb.CommandResult.getException(CommandResult.java:71) at com.mongodb.CommandResult.throwOnError(CommandResult.java:110) at com.mongodb.DBPort$NativeAuthenticator.authenticate(DBPort.java:549) at com.mongodb.DBPort.authenticate(DBPort.java:322) at com.mongodb.DBTCPConnector.authenticate(DBTCPConnector.java:621) at com.mongodb.DBApiLayer.doAuthenticate(DBApiLayer.java:180) at com.mongodb.DB.authenticateCommandHelper(DB.java:630) at com.mongodb.DB.authenticateCommand(DB.java:609) at org.pentaho.mongo.wrapper.UsernamePasswordMongoClientWrapper.authenticateWithDb(UsernamePasswordMongoClientWrapper.java:101) at org.pentaho.mongo.wrapper.UsernamePasswordMongoClientWrapper.getDb(UsernamePasswordMongoClientWrapper.java:89) ... 4 more ERROR 28-08 21:49:48,966 - My mongodb input step - Error initializing step [My mongodb input step] {noformat}

    Pentaho BI Platform Tracking | 2 years ago | Gregory
    com.mongodb.CommandFailureException: { "serverUsed" : "/****" , "errmsg" : "auth fails" , "ok" : 0.0} { "serverUsed" : "****" , "errmsg" : "auth fails" , "ok" : 0.0}
  2. 0

    I created MongoDBInput step and fill login field with string "${myUser}" and password with "${myPassword}". And I want to use the same transformation with different databases by using those variables. On one of my servers i use admin/querty as login/password. With those server transformation works well. Other have no authorization. So, if i set myUser and myPassword variables to empty strings, i'll receive exception: {noformat} INFO 28-08 21:49:48,842 - My mongodb input step - Normal authentication for user INFO 28-08 21:49:48,855 - My mongodb input step - Configuring connection with read preference: primary INFO 28-08 21:49:48,856 - My mongodb input step - No read preference tag sets defined INFO 28-08 21:49:48,856 - My mongodb input step - Configuring connection with default write concern - w = 1, wTimeout: 0, journaled = false ERROR 28-08 21:49:48,966 - My mongodb input step - There was an error connecting to MongoDB with host ****, port ****, database bla-bla-bla and collection my_collection: ERROR 28-08 21:49:48,966 - My mongodb input step - org.pentaho.di.core.exception.KettleException: com.mongodb.CommandFailureException: { "serverUsed" : "/****" , "errmsg" : "auth fails" , "ok" : 0.0} { "serverUsed" : "****" , "errmsg" : "auth fails" , "ok" : 0.0} at org.pentaho.mongo.wrapper.UsernamePasswordMongoClientWrapper.getDb(UsernamePasswordMongoClientWrapper.java:95) at org.pentaho.mongo.wrapper.NoAuthMongoClientWrapper.getCollection(NoAuthMongoClientWrapper.java:1104) at org.pentaho.di.trans.steps.mongodbinput.MongoDbInput.init(MongoDbInput.java:248) at org.pentaho.di.trans.step.StepInitThread.run(StepInitThread.java:62) at java.lang.Thread.run(Thread.java:662) Caused by: com.mongodb.CommandFailureException: { "serverUsed" : "/****" , "errmsg" : "auth fails" , "ok" : 0.0} at com.mongodb.CommandResult.getException(CommandResult.java:71) at com.mongodb.CommandResult.throwOnError(CommandResult.java:110) at com.mongodb.DBPort$NativeAuthenticator.authenticate(DBPort.java:549) at com.mongodb.DBPort.authenticate(DBPort.java:322) at com.mongodb.DBTCPConnector.authenticate(DBTCPConnector.java:621) at com.mongodb.DBApiLayer.doAuthenticate(DBApiLayer.java:180) at com.mongodb.DB.authenticateCommandHelper(DB.java:630) at com.mongodb.DB.authenticateCommand(DB.java:609) at org.pentaho.mongo.wrapper.UsernamePasswordMongoClientWrapper.authenticateWithDb(UsernamePasswordMongoClientWrapper.java:101) at org.pentaho.mongo.wrapper.UsernamePasswordMongoClientWrapper.getDb(UsernamePasswordMongoClientWrapper.java:89) ... 4 more ERROR 28-08 21:49:48,966 - My mongodb input step - Error initializing step [My mongodb input step] {noformat}

    Pentaho BI Platform Tracking | 2 years ago | Gregory
    com.mongodb.CommandFailureException: { "serverUsed" : "/****" , "errmsg" : "auth fails" , "ok" : 0.0} { "serverUsed" : "****" , "errmsg" : "auth fails" , "ok" : 0.0}
  3. 0

    User and support list for MongoDB, a NoSQL database. ()

    gmane.org | 1 year ago
    com.mongodb.CommandFailureException: { "serverUsed" : "mymongohost/xx.xxx.xxx.xx:20000" , "ok" : 0.0 , "errmsg" : "auth fails"}
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    MongoDB via Java: CommandFailureException, code 18

    Stack Overflow | 2 years ago | Dmitri Pisarenko
    com.mongodb.CommandFailureException: { "serverUsed" : "AAA.BBB.CCC.DDD:27017" , "code" : 18 , "ok" : 0.0 , "errmsg" : "auth fails"}
  6. 0

    how to use mongo-hadoop connector to access mongDB with user and password

    Google Groups | 4 years ago | Zhu Wayne
    com.mongodb.CommandFailureException: { "serverUsed" : "mymongohost/xx.xxx.xxx.xx:20000" , "ok" : 0.0 , "errmsg" : "auth fails"}

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.mongodb.CommandFailureException

      { "serverUsed" : "/****" , "errmsg" : "auth fails" , "ok" : 0.0}

      at com.mongodb.CommandResult.getException()
    2. MongoDB Java Driver
      DB.authenticateCommand
      1. com.mongodb.CommandResult.getException(CommandResult.java:71)
      2. com.mongodb.CommandResult.throwOnError(CommandResult.java:110)
      3. com.mongodb.DBPort$NativeAuthenticator.authenticate(DBPort.java:549)
      4. com.mongodb.DBPort.authenticate(DBPort.java:322)
      5. com.mongodb.DBTCPConnector.authenticate(DBTCPConnector.java:621)
      6. com.mongodb.DBApiLayer.doAuthenticate(DBApiLayer.java:180)
      7. com.mongodb.DB.authenticateCommandHelper(DB.java:630)
      8. com.mongodb.DB.authenticateCommand(DB.java:609)
      8 frames
    3. org.pentaho.mongo
      NoAuthMongoClientWrapper.getCollection
      1. org.pentaho.mongo.wrapper.UsernamePasswordMongoClientWrapper.authenticateWithDb(UsernamePasswordMongoClientWrapper.java:101)
      2. org.pentaho.mongo.wrapper.UsernamePasswordMongoClientWrapper.getDb(UsernamePasswordMongoClientWrapper.java:89)
      3. org.pentaho.mongo.wrapper.NoAuthMongoClientWrapper.getCollection(NoAuthMongoClientWrapper.java:1104)
      3 frames
    4. org.pentaho.di
      StepInitThread.run
      1. org.pentaho.di.trans.steps.mongodbinput.MongoDbInput.init(MongoDbInput.java:248)
      2. org.pentaho.di.trans.step.StepInitThread.run(StepInitThread.java:62)
      2 frames
    5. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:662)
      1 frame