Ravinder Payal
Ravinder Payal

Reputation: 3031

Scala ReactiveMongo: Channel not found on minor internet outage

Reactive Mongo stops on minor internet outage and doesn't restore, neither play stops, just subsequent queries get these repeated exception saying connection 10/1 but channel not found.

This is mentioned as GitHub issue as well, but no solution is given. what I want to know is that is there anyway using which I can monitor connection health and restart server in case of network outages or reactive Mongo's failure to access the DB server

Exception given by application:

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>)

Upvotes: 3

Views: 494

Answers (0)

Related Questions