question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support reactivemongo v0.13.0

See original GitHub issue

Hello and thanks for this plugin.

I faced several issues with trying to use reactivemongo as a driver for plugin version 2.0.7, all of which, I believe, are related to 0.12.x and block completely from using this driver if ssl connection option wants to be specified.

First, 0.12.7, the latest version of reactivemongo fails with error on trying to persist something because collection ‘does not exist’, which presumably happens because of index creation or something. The behaviour is pretty much as described in this thread: https://groups.google.com/forum/#!topic/reactivemongo/NsFBbcL71xA

reactivemongo.api.commands.bson.DefaultBSONCommandError: CommandError[code=26, errmsg=Collection myDb.coll doesn't exist, doc: {
  "ok": NumberDecimal(0.0),
  "errmsg": "Collection db.akka_persistence_metadata doesn't exist",
  "code": 26,
  "codeName": "NamespaceNotFound"
}

One can create akka_persistence_metadata and akka_persistence_realtime collections beforehand, but it is very weird to do that for every persistenceId, especially in case we use suffix appender feature.

Then, 0.12.6 and all versions below (0.12.x | x < 7) do not support ssl connection option:

[info] 2018-03-16 16:23:18.926 DEBUG [akka.contrib.persistence.mongodb.RxMongoDriver] [sample-actor-system-akka-contrib-persistence-dispatcher-8] Suffixed name for value "akka-persistence-journal" in settings and suffix "my-persistence-id" is "akka-persistence-journal_my-persistence-id"
[info] 2018-03-16 16:23:19.025 WARN  [reactivemongo.api.MongoDriver] [sample-actor-system-akka-contrib-persistence-dispatcher-8] Some options were ignored because they are not supported (yet): authMechanism, ssl
[info] 2018-03-16 16:23:19.035 INFO  [reactivemongo.api.MongoDriver] [sample-actor-system-akka-contrib-persistence-dispatcher-8] [Supervisor-1] Creating connection: Connection-2
[info] 2018-03-16 16:23:19.040 DEBUG [reactivemongo.api.MongoDriver] [sample-actor-system-akka-contrib-persistence-dispatcher-5] [Supervisor-1] Add connection to the supervisor: Connection-2
[info] 2018-03-16 16:23:19.060 DEBUG [reactivemongo.api.MongoConnection] [sample-actor-system-akka-contrib-persistence-dispatcher-8] [Supervisor-1/Connection-2] Waiting is available...
[info] 2018-03-16 16:23:19.232 DEBUG [reactivemongo.core.nodeset.ChannelFactory] [reactivemongo-akka.actor.default-dispatcher-3] Netty channel configuration:
[info] - connectTimeoutMS: 0
[info] - maxIdleTimeMS: 0ms
[info] - tcpNoDelay: false
[info] - keepAlive: false
[info] - sslEnabled: false
[info] 2018-03-16 16:23:19.947 DEBUG [reactivemongo.core.actors.MongoDBSystem] [reactivemongo-akka.actor.default-dispatcher-3] [Supervisor-1/Connection-2] Register monitor Actor[akka://reactivemongo/user/Monitor-Connection-2#-1851943013]
[info] 2018-03-16 16:23:19.990 DEBUG [reactivemongo.core.actors.MongoDBSystem] [reactivemongo-akka.actor.default-dispatcher-3] [Supervisor-1/Connection-2] Sends a fresh IsMaster request to Node[node1.sample.org:27017: Unknown (1/1 available connections), latency=9223372036854775807], auth=Set()
[info] 2018-03-16 16:23:19.995 DEBUG [reactivemongo.core.actors.MongoDBSystem] [reactivemongo-akka.actor.default-dispatcher-3] [Supervisor-1/Connection-2] Sends a fresh IsMaster request to Node[node1.sample.org:27017: Unknown (1/1 available connections), latency=9223372036854775807], auth=Set()
[info] 2018-03-16 16:23:20.122 DEBUG [reactivemongo.core.actors.MongoDBSystem] [reactivemongo-akka.actor.default-dispatcher-3] [Supervisor-1/Connection-2] Sends a fresh IsMaster request to Node[node1.sample.org:27017: Unknown (1/1 available connections), latency=9223372036854775807], auth=Set()
[info] 2018-03-16 16:23:20.181 DEBUG [reactivemongo.core.actors.MongoDBSystem] [reactivemongo-akka.actor.default-dispatcher-3] [Supervisor-1/Connection-2] The entire node set is still unreachable, is there a network problem?

Thus there is no way to connect to the set via ssl and not having troubles with new collections creation using reactivemongo for this plugin. I would very much prefer not to use casbah as it is declared legacy scala driver and does not support all features of new MongoDB versions (https://docs.mongodb.com/ecosystem/drivers/scala/#casbah).

I think it’s fair to assume that 0.12.x problems mentioned earlier are resolved in 0.13.0, so the request is to introduce support for this as a high priority

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
scullxbonescommented, Nov 22, 2018

Released with v2.2.0

1reaction
scullxbonescommented, Nov 22, 2018

Fixed by #208

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - ReactiveMongo
Overview of the Play JSON library: the standalone library to support JSON serialization. Integration with Play Framework: the complete Play plugin (also using ......
Read more >
ReactiveMongo 0.20.13 – Release details
ReactiveMongo 0.20.13 – Release details. What's new? ... The DNS seedlist is now supported, using mongodb+srv:// scheme in the connection URI.
Read more >
Release details - ReactiveMongo
ReactiveMongo 0.11.14 – Release details. What's new? Enhancements: New APIs, for the commands and streaming; Compatibility with MongoDB 3.2; SSL support ...
Read more >
ReactiveMongo - Home
ReactiveMongo is a Scala driver that provides fully non-blocking and asynchronous I/O operations. Scale better, use fewer threads.
Read more >
Release details - ReactiveMongo
The Biːsən library supports BSON Decimal128 (MongoDB 3.4+). See documentation. Note: The BSONDocument and BSONArray factories have been optimized and support ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found