org.springframework.data.mongodb.UncategorizedMongoDbException: Command failed with error 13: 'not authorized on myDb to execute command { listCollections: 1, cursor: { batchSize: 0 } }' on server localhost:27017. The full response is { "ok" : 0.0, "errmsg" : "not authorized on myDb to execute command { listCollections: 1, cursor: { batchSize: 0 } }", "code" : 13 }; nested exception is com.mongodb.MongoCommandException: Command failed with error 13: 'not authorized on journaldev to execute command { listCollections: 1, cursor: { batchSize: 0 } }' on server localhost:27017. The full response is { "ok" : 0.0, "errmsg" : "not authorized on myDb to execute command { listCollections: 1, cursor: { batchSize: 0 } }", "code" : 13 }

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • GitHub comment 17#172569668
    via GitHub by sboesebeck
    ,
  • GitHub comment 98#175936363
    via GitHub by caarto
    ,
  • Test: "com.mongodb.async.client.SmokeTestSpecification.should handle common administrative scenarios without error" Here's one: {noformat} com.mongodb.MongoTimeoutException: Callback timed out at com.mongodb.async.FutureResultCallback.get(FutureResultCallback.java:74) at com.mongodb.async.client.SmokeTestSpecification.run(SmokeTestSpecification.groovy:177) at com.mongodb.async.client.SmokeTestSpecification.should handle common administrative scenarios without error(SmokeTestSpecification.groovy:108) {noformat} and another: {noformat} com.mongodb.MongoCommandException: Command failed with error 13140: 'exception: Don't recognize source or target DB' on server localhost:27018. The full response is { "code" : 13140, "ok" : 0.0, "errmsg" : "exception: Don't recognize source or target DB" } at com.mongodb.connection.ProtocolHelper.getCommandFailureException(ProtocolHelper.java:75) at com.mongodb.connection.CommandResultCallback.callCallback(CommandResultCallback.java:51) at com.mongodb.connection.CommandResultCallback.callCallback(CommandResultCallback.java:29) at com.mongodb.connection.CommandResultBaseCallback.callCallback(CommandResultBaseCallback.java:39) at com.mongodb.connection.ResponseCallback.onResult(ResponseCallback.java:48) at com.mongodb.connection.ResponseCallback.onResult(ResponseCallback.java:23) at com.mongodb.connection.DefaultConnectionPool$PooledConnection$2.onResult(DefaultConnectionPool.java:417) at com.mongodb.connection.DefaultConnectionPool$PooledConnection$2.onResult(DefaultConnectionPool.java:411) at com.mongodb.connection.UsageTrackingInternalConnection$3.onResult(UsageTrackingInternalConnection.java:127) at com.mongodb.connection.UsageTrackingInternalConnection$3.onResult(UsageTrackingInternalConnection.java:123) at com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:53) at com.mongodb.connection.InternalStreamConnection.processPendingResults(InternalStreamConnection.java:528) at com.mongodb.connection.InternalStreamConnection.processPendingReads(InternalStreamConnection.java:424) at com.mongodb.connection.InternalStreamConnection.access$1300(InternalStreamConnection.java:55) at com.mongodb.connection.InternalStreamConnection$3.onResult(InternalStreamConnection.java:460) at com.mongodb.connection.InternalStreamConnection$3.onResult(InternalStreamConnection.java:449) at com.mongodb.connection.InternalStreamConnection$ResponseHeaderCallback.onSuccess(InternalStreamConnection.java:386) at com.mongodb.connection.InternalStreamConnection$ResponseHeaderCallback.access$900(InternalStreamConnection.java:341) at com.mongodb.connection.InternalStreamConnection$ResponseHeaderCallback$ResponseBodyCallback.onResult(InternalStreamConnection.java:408) at com.mongodb.connection.InternalStreamConnection$ResponseHeaderCallback$ResponseBodyCallback.onResult(InternalStreamConnection.java:392) at com.mongodb.connection.InternalStreamConnection$2.completed(InternalStreamConnection.java:273) at com.mongodb.connection.InternalStreamConnection$2.completed(InternalStreamConnection.java:270) at com.mongodb.connection.netty.NettyStream.readAsync(NettyStream.java:211) at com.mongodb.connection.InternalStreamConnection.fillAndFlipBuffer(InternalStreamConnection.java:270) at com.mongodb.connection.InternalStreamConnection.access$700(InternalStreamConnection.java:55) at com.mongodb.connection.InternalStreamConnection$ResponseHeaderCallback.onResult(InternalStreamConnection.java:364) at com.mongodb.connection.InternalStreamConnection$ResponseHeaderCallback.onResult(InternalStreamConnection.java:341) at com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:53) at com.mongodb.connection.InternalStreamConnection$2.completed(InternalStreamConnection.java:273) at com.mongodb.connection.InternalStreamConnection$2.completed(InternalStreamConnection.java:270) at com.mongodb.connection.netty.NettyStream.readAsync(NettyStream.java:211) at com.mongodb.connection.netty.NettyStream.handleReadResponse(NettyStream.java:241) at com.mongodb.connection.netty.NettyStream.access$700(NettyStream.java:60) at com.mongodb.connection.netty.NettyStream$InboundBufferHandler.channelRead0(NettyStream.java:272) at com.mongodb.connection.netty.NettyStream$InboundBufferHandler.channelRead0(NettyStream.java:269) at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:150) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) at java.lang.Thread.run(Thread.java:662) {noformat}
    via by Jeff Yemin,
  • Test: "com.mongodb.async.client.SmokeTestSpecification.should handle common administrative scenarios without error" Here's one: {noformat} com.mongodb.MongoTimeoutException: Callback timed out at com.mongodb.async.FutureResultCallback.get(FutureResultCallback.java:74) at com.mongodb.async.client.SmokeTestSpecification.run(SmokeTestSpecification.groovy:177) at com.mongodb.async.client.SmokeTestSpecification.should handle common administrative scenarios without error(SmokeTestSpecification.groovy:108) {noformat} and another: {noformat} com.mongodb.MongoCommandException: Command failed with error 13140: 'exception: Don't recognize source or target DB' on server localhost:27018. The full response is { "code" : 13140, "ok" : 0.0, "errmsg" : "exception: Don't recognize source or target DB" } at com.mongodb.connection.ProtocolHelper.getCommandFailureException(ProtocolHelper.java:75) at com.mongodb.connection.CommandResultCallback.callCallback(CommandResultCallback.java:51) at com.mongodb.connection.CommandResultCallback.callCallback(CommandResultCallback.java:29) at com.mongodb.connection.CommandResultBaseCallback.callCallback(CommandResultBaseCallback.java:39) at com.mongodb.connection.ResponseCallback.onResult(ResponseCallback.java:48) at com.mongodb.connection.ResponseCallback.onResult(ResponseCallback.java:23) at com.mongodb.connection.DefaultConnectionPool$PooledConnection$2.onResult(DefaultConnectionPool.java:417) at com.mongodb.connection.DefaultConnectionPool$PooledConnection$2.onResult(DefaultConnectionPool.java:411) at com.mongodb.connection.UsageTrackingInternalConnection$3.onResult(UsageTrackingInternalConnection.java:127) at com.mongodb.connection.UsageTrackingInternalConnection$3.onResult(UsageTrackingInternalConnection.java:123) at com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:53) at com.mongodb.connection.InternalStreamConnection.processPendingResults(InternalStreamConnection.java:528) at com.mongodb.connection.InternalStreamConnection.processPendingReads(InternalStreamConnection.java:424) at com.mongodb.connection.InternalStreamConnection.access$1300(InternalStreamConnection.java:55) at com.mongodb.connection.InternalStreamConnection$3.onResult(InternalStreamConnection.java:460) at com.mongodb.connection.InternalStreamConnection$3.onResult(InternalStreamConnection.java:449) at com.mongodb.connection.InternalStreamConnection$ResponseHeaderCallback.onSuccess(InternalStreamConnection.java:386) at com.mongodb.connection.InternalStreamConnection$ResponseHeaderCallback.access$900(InternalStreamConnection.java:341) at com.mongodb.connection.InternalStreamConnection$ResponseHeaderCallback$ResponseBodyCallback.onResult(InternalStreamConnection.java:408) at com.mongodb.connection.InternalStreamConnection$ResponseHeaderCallback$ResponseBodyCallback.onResult(InternalStreamConnection.java:392) at com.mongodb.connection.InternalStreamConnection$2.completed(InternalStreamConnection.java:273) at com.mongodb.connection.InternalStreamConnection$2.completed(InternalStreamConnection.java:270) at com.mongodb.connection.netty.NettyStream.readAsync(NettyStream.java:211) at com.mongodb.connection.InternalStreamConnection.fillAndFlipBuffer(InternalStreamConnection.java:270) at com.mongodb.connection.InternalStreamConnection.access$700(InternalStreamConnection.java:55) at com.mongodb.connection.InternalStreamConnection$ResponseHeaderCallback.onResult(InternalStreamConnection.java:364) at com.mongodb.connection.InternalStreamConnection$ResponseHeaderCallback.onResult(InternalStreamConnection.java:341) at com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:53) at com.mongodb.connection.InternalStreamConnection$2.completed(InternalStreamConnection.java:273) at com.mongodb.connection.InternalStreamConnection$2.completed(InternalStreamConnection.java:270) at com.mongodb.connection.netty.NettyStream.readAsync(NettyStream.java:211) at com.mongodb.connection.netty.NettyStream.handleReadResponse(NettyStream.java:241) at com.mongodb.connection.netty.NettyStream.access$700(NettyStream.java:60) at com.mongodb.connection.netty.NettyStream$InboundBufferHandler.channelRead0(NettyStream.java:272) at com.mongodb.connection.netty.NettyStream$InboundBufferHandler.channelRead0(NettyStream.java:269) at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:150) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) at java.lang.Thread.run(Thread.java:662) {noformat}
    via by Jeff Yemin,
  • GitHub comment 4#236615277
    via GitHub by ngtandat
    ,
  • Error using Map-Reduce with Java (Spring)
    via Stack Overflow by gemr1423
    ,
  • GitHub comment 405#243629340
    via GitHub by greenaar
    ,
    • org.springframework.data.mongodb.UncategorizedMongoDbException: Command failed with error 13: 'not authorized on myDb to execute command { listCollections: 1, cursor: { batchSize: 0 } }' on server localhost:27017. The full response is { "ok" : 0.0, "errmsg" : "not authorized on myDb to execute command { listCollections: 1, cursor: { batchSize: 0 } }", "code" : 13 }; nested exception is com.mongodb.MongoCommandException: Command failed with error 13: 'not authorized on journaldev to execute command { listCollections: 1, cursor: { batchSize: 0 } }' on server localhost:27017. The full response is { "ok" : 0.0, "errmsg" : "not authorized on myDb to execute command { listCollections: 1, cursor: { batchSize: 0 } }", "code" : 13 } at org.springframework.data.mongodb.core.MongoExceptionTranslator.translateExceptionIfPossible(MongoExceptionTranslator.java:107) at org.springframework.data.mongodb.core.MongoTemplate.potentiallyConvertRuntimeException(MongoTemplate.java:2114) at org.springframework.data.mongodb.core.MongoTemplate.execute(MongoTemplate.java:448) at org.springframework.data.mongodb.core.MongoTemplate.getCollectionNames(MongoTemplate.java:1654) at dao.TemplateDaoImpl.testingSales(TemplateDaoImpl.java:4812) at dao.impl.TemplateDaoImpl.main(TemplateDaoImpl.java:340) Caused by: com.mongodb.MongoCommandException: Command failed with error 13: 'not authorized on myDb to execute command { listCollections: 1, cursor: { batchSize: 0 } }' on server localhost:27017. The full response is { "ok" : 0.0, "errmsg" : "not authorized on myDb to execute command { listCollections: 1, cursor: { batchSize: 0 } }", "code" : 13 } at com.mongodb.connection.ProtocolHelper.getCommandFailureException(ProtocolHelper.java:86) at com.mongodb.connection.CommandProtocol.execute(CommandProtocol.java:119) at com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:159) at com.mongodb.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:286) at com.mongodb.connection.DefaultServerConnection.command(DefaultServerConnection.java:173) at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:215) at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:206) at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:112) at com.mongodb.operation.ListCollectionsOperation$1.call(ListCollectionsOperation.java:177) at com.mongodb.operation.ListCollectionsOperation$1.call(ListCollectionsOperation.java:172) at com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:239) at com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:212) at com.mongodb.operation.ListCollectionsOperation.execute(ListCollectionsOperation.java:172) at com.mongodb.operation.ListCollectionsOperation.execute(ListCollectionsOperation.java:80) at com.mongodb.Mongo.execute(Mongo.java:773) at com.mongodb.Mongo$2.execute(Mongo.java:760) at com.mongodb.OperationIterable.iterator(OperationIterable.java:47) at com.mongodb.OperationIterable.forEach(OperationIterable.java:70) at com.mongodb.MappingIterable.forEach(MappingIterable.java:50) at com.mongodb.MappingIterable.into(MappingIterable.java:60) at com.mongodb.DB.getCollectionNames(DB.java:253) at org.springframework.data.mongodb.core.MongoTemplate$14.doInDB(MongoTemplate.java:1656) at org.springframework.data.mongodb.core.MongoTemplate$14.doInDB(MongoTemplate.java:1654) at org.springframework.data.mongodb.core.MongoTemplate.execute(MongoTemplate.java:446) ... 3 more

    Users with the same issue

    rp
    rp2 times, last one,
    Dunmer
    Dunmer1 times, last one,
    Alireza Mohamadi
    Alireza Mohamadi11 times, last one,
    poroszd
    poroszd1 times, last one,