我需要将我的应用程序连接到Atlas Cluster上的mongoDB。 我的应用程序使用类似URI的方式连接到mongodb “ mongodb:// user:pass @ host1:27017,host2:27017,host3:27017 / mydb?ssl = true&replicaSet = replica&authSource = admin
我最终得到了这个堆栈跟踪:
java.lang.ExceptionInInitializerError
at controllers.LoginController$$anonfun$login$1$$anonfun$apply$26.apply(LoginController.scala:220)
at controllers.LoginController$$anonfun$login$1$$anonfun$apply$26.apply(LoginController.scala:217)
at scala.util.Success$$anonfun$map$1.apply(Try.scala:237)
at scala.util.Try$.apply(Try.scala:192)
at scala.util.Success.map(Try.scala:237)
at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:237)
at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:237)
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:36)
at scala.concurrent.impl.ExecutionContextImpl$AdaptedForkJoinTask.exec(ExecutionContextImpl.scala:121)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: reactivemongo.core.actors.Exceptions$NodeSetNotReachable: MongoError['The node set can not be reached! Please check your network connectivity (Supervisor-1/Connection-2)']
at reactivemongo.api.MongoConnection.reactivemongo$api$MongoConnection$$wait$1(api.scala:349)
at reactivemongo.api.MongoConnection$$anonfun$doRetry$1$1.apply(api.scala:366)
at reactivemongo.api.MongoConnection$$anonfun$doRetry$1$1.apply(api.scala:364)
at akka.pattern.FutureTimeoutSupport$$anonfun$after$1.liftedTree1$1(FutureTimeoutSupport.scala:25)
at akka.pattern.FutureTimeoutSupport$$anonfun$after$1.apply$mcV$sp(FutureTimeoutSupport.scala:25)
at akka.actor.Scheduler$$anon$4.run(Scheduler.scala:126)
at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:39)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:415)
有人遇到这样的事情吗?