jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Reutegger (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-7485) DocumentNodeStore doesn't work with shared Atlas MongoDB replica set
Date Thu, 13 Sep 2018 13:53:00 GMT

    [ https://issues.apache.org/jira/browse/OAK-7485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16613529#comment-16613529
] 

Marcel Reutegger commented on OAK-7485:
---------------------------------------

Meanwhile the MongoDB Atlas documentation has been updated and now states the {{serverStatus()}}
command will return a {{ok=0}} response.

https://docs.atlas.mongodb.com/reference/unsupported-commands/#commands-with-special-behavior

That is, the behaviour reported in this issue is considered working as designed.

> DocumentNodeStore doesn't work with shared Atlas MongoDB replica set
> --------------------------------------------------------------------
>
>                 Key: OAK-7485
>                 URL: https://issues.apache.org/jira/browse/OAK-7485
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: documentmk, mongomk
>    Affects Versions: 1.9.0
>            Reporter: Tomek Rękawek
>            Assignee: Marcel Reutegger
>            Priority: Major
>             Fix For: 1.10
>
>
> After the Oak switched to using mongo-java-driver 3.6.x, it stopped working with the
shared Atlas MongoDB cluster (eg. M2). Following exception is logged:
> {noformat}
> 08.05.2018 13:08:13.881 *ERROR* [FelixStartLevel] org.apache.jackrabbit.oak-store-document
bundle org.apache.jackrabbit.oak-store-document:1.9.0 (108)[org.apache.jackrabbit.oak.plugins.document.DocumentNo
> deStoreService(224)] : The activate method has thrown an exception (com.mongodb.MongoCommandException:
Command failed with error -1: '' on server [redacted]. The full response is { "operationTime"
: { "$timestamp" : { "t" : 1525784890, "i" : 2 } }, "ok" : 0.0, "$clusterTime" : { "clusterTime"
: { "$timestamp" : { "t" : 1525784890, "i" : 2 } }, "signature" : { "hash"
> : { "$binary" : "Ig9HeiO+kyyQKVzRaUGeqMzspbI=", "$type" : "00" }, "keyId" : { "$numberLong"
: "6547663121467572225" } } }, "metrics" : { "atlas" : { "connectionPool" : { "totalCreated"
: { "$numberLong" : "56" } }, "bytesInWrites" : { "$numberLong" : "0" } } } })
> com.mongodb.MongoCommandException: Command failed with error -1: '' on server [redacted].
The full response is { "operationTime" : { "$timestamp" : { "t" : 152578489
> 0, "i" : 2 } }, "ok" : 0.0, "$clusterTime" : { "clusterTime" : { "$timestamp" : { "t"
: 1525784890, "i" : 2 } }, "signature" : { "hash" : { "$binary" : "Ig9HeiO+kyyQKVzRaUGeqMzspbI=",
"$type" : "00" }, "keyId" : { "$numberLong" : "6547663121467572225" } } }, "metrics" : { "atlas"
: { "connectionPool" : { "totalCreated" : { "$numberLong" : "56" } }, "bytesInWrites" : {
"$numberLong" : "0" } } } }
>         at com.mongodb.connection.ProtocolHelper.getCommandFailureException(ProtocolHelper.java:164)
[org.mongodb.mongo-java-driver:3.6.3]                                                    
                     at com.mongodb.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:295)
[org.mongodb.mongo-java-driver:3.6.3]
>         at com.mongodb.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:255)
[org.mongodb.mongo-java-driver:3.6.3]
>         at com.mongodb.connection.UsageTrackingInternalConnection.sendAndReceive(UsageTrackingInternalConnection.java:98)
[org.mongodb.mongo-java-driver:3.6.3]
>         at com.mongodb.connection.DefaultConnectionPool$PooledConnection.sendAndReceive(DefaultConnectionPool.java:441)
[org.mongodb.mongo-java-driver:3.6.3]
>         at com.mongodb.connection.CommandProtocolImpl.execute(CommandProtocolImpl.java:80)
[org.mongodb.mongo-java-driver:3.6.3]
>         at com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:189)
[org.mongodb.mongo-java-driver:3.6.3]
>         at com.mongodb.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:264)
[org.mongodb.mongo-java-driver:3.6.3]
>         at com.mongodb.connection.DefaultServerConnection.command(DefaultServerConnection.java:126)
[org.mongodb.mongo-java-driver:3.6.3]
>         at com.mongodb.connection.DefaultServerConnection.command(DefaultServerConnection.java:118)
[org.mongodb.mongo-java-driver:3.6.3]
>         at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:226)
[org.mongodb.mongo-java-driver:3.6.3]
>         at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:197)
[org.mongodb.mongo-java-driver:3.6.3]
>         at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:189)
[org.mongodb.mongo-java-driver:3.6.3]
>         at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:99)
[org.mongodb.mongo-java-driver:3.6.3]
>         at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:92)
[org.mongodb.mongo-java-driver:3.6.3]
>         at com.mongodb.operation.CommandReadOperation.execute(CommandReadOperation.java:55)
[org.mongodb.mongo-java-driver:3.6.3]
>         at com.mongodb.Mongo$3.execute(Mongo.java:826) [org.mongodb.mongo-java-driver:3.6.3]
>         at com.mongodb.MongoDatabaseImpl.executeCommand(MongoDatabaseImpl.java:166) [org.mongodb.mongo-java-driver:3.6.3]
>         at com.mongodb.MongoDatabaseImpl.runCommand(MongoDatabaseImpl.java:138) [org.mongodb.mongo-java-driver:3.6.3]
>         at com.mongodb.MongoDatabaseImpl.runCommand(MongoDatabaseImpl.java:133) [org.mongodb.mongo-java-driver:3.6.3]
>         at org.apache.jackrabbit.oak.plugins.document.mongo.MongoStatus.getServerStatus(MongoStatus.java:177)
[org.apache.jackrabbit.oak-store-document:1.9.0]
>         at org.apache.jackrabbit.oak.plugins.document.mongo.MongoStatus.isMajorityReadConcernSupported(MongoStatus.java:91)
[org.apache.jackrabbit.oak-store-document:1.9.0]
>         at org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentNodeStoreBuilderBase.setMongoDB(MongoDocumentNodeStoreBuilderBase.java:92)
[org.apache.jackrabbit.oak-store-document:1.9.0]
>         at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.registerNodeStore(DocumentNodeStoreService.java:297)
[org.apache.jackrabbit.oak-store-document:1.9.0]
>         at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.registerNodeStoreIfPossible(DocumentNodeStoreService.java:252)
[org.apache.jackrabbit.oak-store-document:1.9.0]
>         at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.activate(DocumentNodeStoreService.java:236)
[org.apache.jackrabbit.oak-store-document:1.9.0]
> {noformat}
> So, it seems that the serverStatus() command fails or doesn't return the required data.
Similarly, when using mongo-cli:
> {noformat}
> $ mongo [redacted]
> MongoDB shell version v3.6.4
> MongoDB server version: 3.6.4
> MongoDB Enterprise [redacted]:PRIMARY> db.serverStatus()
> {
>         "operationTime" : Timestamp(1525784995, 2),
>         "ok" : 0,
>         "$clusterTime" : {
>                 "clusterTime" : Timestamp(1525784995, 2),
>                 "signature" : {
>                         "hash" : BinData(0,"UbUJQri5/e/SsB8lBXmWPMaXwuk="),
>                         "keyId" : NumberLong("6547663121467572225")
>                 }
>         },
>         "metrics" : {
>                 "atlas" : {
>                         "connectionPool" : {
>                                 "totalCreated" : NumberLong(56)
>                         },
>                         "bytesInWrites" : NumberLong(0)
>                 }
>         }
> }
> {noformat}
> The {{ok}} field is {{0}}, but there's no error message. What's interesting, when using
an older Mongo CLI, the command works fine:
> {noformat}
> docker run -it --rm mongo:3.4 /bin/bash
> root@e3fa93e33d32:/# mongo [redacted]
> MongoDB shell version v3.4.14
> MongoDB server version: 3.6.4
> WARNING: shell and server versions do not match
> MongoDB Enterprise [redacted]:PRIMARY> db.serverStatus()
> {
>         "host" : "[redacted]",
>         "version" : "3.6.4",
>         "process" : "mongod",
>         "pid" : NumberLong(3408),
>         "uptime" : 1288779,
>         "uptimeMillis" : NumberLong(1288779510),
>         "uptimeEstimate" : NumberLong(1288779),
>         "localTime" : ISODate("2018-05-08T13:15:48.586Z"),
> ...
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message