I've been working on a Spark Streaming application which interfaces with MongoDB via the reactivemongo connector. However, the Spark job is hitting the following exception
16:53:23.153 [ForkJoinPool-4-worker-5] ERROR reactivemongo.api.Failover2 - Got an error, no more attempts to do. Completing with a failure... reactivemongo.core.errors.ConnectionNotInitialized: MongoError['Connection is missing metadata (like protocol version, etc.) The connection pool is probably being initialized.'] at reactivemongo.core.errors.ConnectionNotInitialized$.MissingMetadata(errors.scala:67)
I couldn't find online references to debugging this exception. Has anyone encountered this before? If so, any ideas on what could possibly throwing this exception?
Snippet of my code:
...
val driver = MongoDriver()
val connection = driver.connection(List("10.211.55.10"))
val db = connection("wordCountDB")
val collection = db[BSONCollection]("counts")
...
Thanks in advance