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" }

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via JIRA by Jeff Yemin, 1 year ago
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" }
via JIRA by Jeff Yemin, 1 year ago
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" }
via GitHub by xmlking
, 1 year ago
Command failed with error 13: 'not authorized on myapp to execute command { aggregate: "todo", pipeline: [ { $project: { _id: 1 } }, { $group: { _id: 0, count: { $sum: 1 } } } ], cursor: { batchSize: 128 } }' on server localhost:27017. The full
via GitHub by greenaar
, 1 year ago
Command failed with error -1: 'index not found' on server localhost:27017. The full response is { "errmsg" : "index not found", "ok" : 0.0 }
via GitHub by loque1
, 4 months ago
Command failed with error 13: 'not authorized on seyren to execute command { createIndexes: "checks", indexes: [ { key: { name: 1 }, name: "name_1", ns: "seyren.checks", unique: true } ] }' on server prd-mdb-004:27017. The full response is { "ok
via Stack Overflow by Yinzara
, 1 year ago
Command failed with error 86: 'Trying to create an index with same name event_source_link_type_at_id_IDX with different key spec **** vs existing spec *****' on server 127.0.0.1:27017. The full response is { "ok" : 0.0, "errmsg" : "Trying to create an index with same name event_source_link_type_at_id_IDX with different key spec **** vs existing spec *****", "code" : 86 }
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 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 java.lang.Thread.run(Thread.java:662)

Users with the same issue

4 times, 1 month ago
2 times, 2 months ago
4 times, 3 months ago
2 times, 8 months ago
Once, 10 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.