反应性Mongo会在互联网中断时停止,并且不会恢复,也不会停止播放,只是随后的查询会得到这些重复的异常,说明连接为10/1,但未找到频道。
这也被认为是GitHub问题,但是没有给出解决方案。我想知道的是,无论如何,在存在网络中断或Mongo无法访问数据库服务器的情况下,都可以使用它来监视连接运行状况并重新启动服务器
应用程序给出的异常:
play.api.UnexpectedException: Unexpected exception[ChannelNotFound: MongoError['Channel not found from the primary node: 'ds249005.mlab.com:49005' { authenticated:0, connected:10, channels:10 } (Supervisor-1/Connection-2)']]
at play.api.http.HttpErrorHandlerExceptions$.throwableToUsefulException(HttpErrorHandler.scala:251)
at play.api.http.DefaultHttpErrorHandler.onServerError(HttpErrorHandler.scala:180)
at play.filters.cors.AbstractCORSPolicy$$anonfun$1.applyOrElse(AbstractCORSPolicy.scala:122)
at play.filters.cors.AbstractCORSPolicy$$anonfun$1.applyOrElse(AbstractCORSPolicy.scala:120)
at scala.concurrent.Future$$anonfun$recoverWith$1.apply(Future.scala:346)
at scala.concurrent.Future$$anonfun$recoverWith$1.apply(Future.scala:345)
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:36)
at play.api.libs.streams.Execution$trampoline$.execute(Execution.scala:70)
at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:44)
at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:252)
Caused by: reactivemongo.core.actors.Exceptions$ChannelNotFound: MongoError['Channel not found from the primary node: 'ds249005.mlab.com:49005' { authenticated:0, connected:10, channels:10 } (Supervisor-1/Connection-2)']
Caused by: reactivemongo.core.actors.Exceptions$InternalState: null
at reactivemongo.ConnectAll$IsMaster(828, {{NodeSet None Node[ds249005.mlab.com:49005: Primary (10/10 available connections), latency=140], auth=Set() }})(<time:1530070373894>)
at reactivemongo.IsMaster(828, {{NodeSet None Node[ds249005.mlab.com:49005: Primary (10/10 available connections), latency=142], auth=Set() }}(<time:1530070373894>)
at reactivemongo.RefreshAll({{NodeSet None Node[ds249005.mlab.com:49005: Primary (10/10 available connections), latency=142], auth=Set() }})(<time:1530070373754>)
at reactivemongo.ConnectAll({{NodeSet None Node[ds249005.mlab.com:49005: Primary (10/10 available connections), latency=142], auth=Set() }})(<time:1530070373754>)
at reactivemongo.ConnectAll$IsMaster(827, {{NodeSet None Node[ds249005.mlab.com:49005: Primary (10/10 available connections), latency=142], auth=Set() }})(<time:1530070363895>)
at reactivemongo.IsMaster(827, {{NodeSet None Node[ds249005.mlab.com:49005: Primary (10/10 available connections), latency=141], auth=Set() }}(<time:1530070363895>)
at reactivemongo.RefreshAll({{NodeSet None Node[ds249005.mlab.com:49005: Primary (10/10 available connections), latency=141], auth=Set() }})(<time:1530070363753>)
at reactivemongo.ConnectAll({{NodeSet None Node[ds249005.mlab.com:49005: Primary (10/10 available connections), latency=141], auth=Set() }})(<time:1530070363753>)
at reactivemongo.ConnectAll$IsMaster(826, {{NodeSet None Node[ds249005.mlab.com:49005: Primary (10/10 available connections), latency=141], auth=Set() }})(<time:1530070353894>)
at reactivemongo.IsMaster(826, {{NodeSet None Node[ds249005.mlab.com:49005: Primary (10/10 available connections), latency=141], auth=Set() }}(<time:1530070353894>)