1.10 with Mongo Atlas - No active channel can be found to the primary node:
73 views
Skip to first unread message
Michał Matłoka
unread,
Oct 25, 2023, 5:04:01 AM10/25/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ReactiveMongo - http://reactivemongo.org
Hi,
I have an application which was working fine with reactive mongo 0.12.4 (including play2-reactivemongo and reactivemongo-akka) and Mongo 4 running on Mongo Atlas.
I have update the app to the 1.1.0-play28-RC11 and to Mongo 6 on Mongo Atlas. Application is connected using mongodb+srv protocol. It works, but at random moments requests starts failing with
"""
play.api.UnexpectedException: Unexpected exception[ChannelNotFoundException: MongoError['No active channel can be found to the primary node: 'cluster-name-shard-00-01.cluster-address.mongodb.net:27017' { authenticated:0, authenticating: 0, connected:0, channels:2 } (Supervisor-1/app_name)']]
2023-10-25 07:49:10.732 [app_name] web.1 at play.api.http.HttpErrorHandlerExceptions$.throwableToUsefulException(HttpErrorHandler.scala:358)
2023-10-25 07:49:10.732 [app_name] web.1 at play.api.http.DefaultHttpErrorHandler.onServerError(HttpErrorHandler.scala:264)
2023-10-25 07:49:10.732 [app_name] web.1 at ErrorHandler.onServerError(ErrorHandler.scala:84)
2023-10-25 07:49:10.732 [app_name] web.1 at play.core.server.AkkaHttpServer$$anonfun$2.applyOrElse(AkkaHttpServer.scala:441)
2023-10-25 07:49:10.732 [app_name] web.1 at play.core.server.AkkaHttpServer$$anonfun$2.applyOrElse(AkkaHttpServer.scala:433)
2023-10-25 07:49:10.732 [app_name] web.1 at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:490)
2023-10-25 07:49:10.732 [app_name] web.1 at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:63)
2023-10-25 07:49:10.732 [app_name] web.1 at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:100)
2023-10-25 07:49:10.732 [app_name] web.1 at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
2023-10-25 07:49:10.732 [app_name] web.1 at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:94)
2023-10-25 07:49:10.732 [app_name] web.1 Caused by: reactivemongo.core.actors.Exceptions$ChannelNotFoundException: MongoError['No active channel can be found to the primary node: 'cluster-name-shard-00-01.cluster-address.mongodb.net:27017' { authenticated:0, authenticating: 0, connected:0, channels:2 } (Supervisor-1/app_name)']
2023-10-25 07:49:10.732 [app_name] web.1 Caused by: reactivemongo.core.actors.Exceptions$InternalState:
2023-10-25 07:49:10.732 [app_name] web.1 at reactivemongo.ChannelDisconnected(f1f5f862, {{NodeSet Some(atlas-some-address-shard-0) Node[cluster-name-shard-00-02.cluster-address.mongodb.net:27017: Secondary<36877s> (1/1/1 available connections), latency=0s, authenticated={dev@admin}] | Node[cluster-name-shard-00-00.cluster-address.mongodb.net:27017: Secondary<36877s> (1/1/1 available connections), latency=0s, authenticated={dev@admin}] | Node[cluster-name-shard-00-01.cluster-address.mongodb.net:27017: Primary<36877s> (1/1/1 available connections), latency=0s, authenticated={dev@admin}] }})(<time:36878411089418>)
2023-10-25 07:49:10.732 [app_name] web.1 at reactivemongo.ScramNegociation(SCRAM-SHA-1, 052f6a13)(<time:36877479395806>)
2023-10-25 07:49:10.732 [app_name] web.1 at reactivemongo.AuthResponse$PrimaryAvailable({{NodeSet Some(atlas-some-address-shard-0) Node[cluster-name-shard-00-02.cluster-address.mongodb.net:27017: Secondary<36877s> (1/1/1 available connections), latency=0s, authenticated={dev@admin}] | Node[cluster-name-shard-00-00.cluster-address.mongodb.net:27017: Secondary<36877s> (1/1/1 available connections), latency=0s, authenticated={}] | Node[cluster-name-shard-00-01.cluster-address.mongodb.net:27017: Primary<36877s> (1/1/1 available connections), latency=0s, authenticated={dev@admin}] }})(<time:36877479209708>)
2023-10-25 07:49:10.732 [app_name] web.1 at reactivemongo.AuthResponse$SetAvailable({{NodeSet Some(atlas-some-address-shard-0) Node[cluster-name-shard-00-02.cluster-address.mongodb.net:27017: Secondary<36877s> (1/1/1 available connections), latency=0s, authenticated={dev@admin}] | Node[cluster-name-shard-00-00.cluster-address.mongodb.net:27017: Secondary<36877s> (1/1/1 available connections), latency=0s, authenticated={}] | Node[cluster-name-shard-00-01.cluster-address.mongodb.net:27017: Primary<36877s> (1/1/1 available connections), latency=0s, authenticated={dev@admin}] }})(<time:36877479167008>)
2023-10-25 07:49:10.732 [app_name] web.1 at reactivemongo.ScramNegociation(SCRAM-SHA-1, c8f7ea91)(<time:36877460207648>)
2023-10-25 07:49:10.732 [app_name] web.1 at reactivemongo.AuthResponse$PrimaryAvailable({{NodeSet Some(atlas-some-address-shard-0) Node[cluster-name-shard-00-02.cluster-address.mongodb.net:27017: Secondary<36877s> (1/1/1 available connections), latency=0s, authenticated={}] | Node[cluster-name-shard-00-00.cluster-address.mongodb.net:27017: Secondary<36877s> (1/1/1 available connections), latency=0s, authenticated={}] | Node[cluster-name-shard-00-01.cluster-address.mongodb.net:27017: Primary<36877s> (1/1/1 available connections), latency=0s, authenticated={dev@admin}] }})(<time:36877460069687>)
2023-10-25 07:49:10.732 [app_name] web.1 at reactivemongo.AuthResponse$SetAvailable({{NodeSet Some(atlas-some-address-shard-0) Node[cluster-name-shard-00-02.cluster-address.mongodb.net:27017: Secondary<36877s> (1/1/1 available connections), latency=0s, authenticated={}] | Node[cluster-name-shard-00-00.cluster-address.mongodb.net:27017: Secondary<36877s> (1/1/1 available connections), latency=0s, authenticated={}] | Node[cluster-name-shard-00-01.cluster-address.mongodb.net:27017: Primary<36877s> (1/1/1 available connections), latency=0s, authenticated={dev@admin}] }})(<time:36877460027036>)
2023-10-25 07:49:10.732 [app_name] web.1 at reactivemongo.ScramNegociation(SCRAM-SHA-1, f1f5f862)(<time:36877459635697>)
2023-10-25 07:49:10.732 [app_name] web.1 at reactivemongo.AuthResponse$PrimaryAvailable({{NodeSet Some(atlas-some-address-shard-0) Node[cluster-name-shard-00-02.cluster-address.mongodb.net:27017: Secondary<36877s> (1/1/1 available connections), latency=0s, authenticated={}] | Node[cluster-name-shard-00-00.cluster-address.mongodb.net:27017: Secondary<36877s> (1/1/1 available connections), latency=0s, authenticated={}] | Node[cluster-name-shard-00-01.cluster-address.mongodb.net:27017: Primary<36877s> (1/1/1 available connections), latency=0s, authenticated={}] }})(<time:36877459099346>)
2023-10-25 07:49:10.732 [app_name] web.1 at reactivemongo.AuthResponse$SetAvailable({{NodeSet Some(atlas-some-address-shard-0) Node[cluster-name-shard-00-02.cluster-address.mongodb.net:27017: Secondary<36877s> (1/1/1 available connections), latency=0s, authenticated={}] | Node[cluster-name-shard-00-00.cluster-address.mongodb.net:27017: Secondary<36877s> (1/1/1 available connections), latency=0s, authenticated={}] | Node[cluster-name-shard-00-01.cluster-address.mongodb.net:27017: Primary<36877s> (1/1/1 available connections), latency=0s, authenticated={}] }})(<time:36877458859521>)
"""
Has anyone encountered such problem?
Brad Rust
unread,
Oct 25, 2023, 12:52:54 PM10/25/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to reacti...@googlegroups.com
FWIW, I too have not been able to have a stable environment against a Mongo 6 Atlas instance. If it matters, RC11 against Mongo 5 is our production environment and is stable.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ReactiveMongo - http://reactivemongo.org
With only 2 channels, resilience can hardly happen.
Brad Rust
unread,
Oct 31, 2023, 8:57:39 PM10/31/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ReactiveMongo - http://reactivemongo.org
I don't understand what you mean
Cédric , are you saying there is something configurable or are you saying that
it could never be resilient? If there is a suggested URI for Atlas Mongo 6, I would be more than happy to test against that and report back.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ReactiveMongo - http://reactivemongo.org
hm, theoretically I have the default settings
Brad Rust
unread,
Nov 3, 2023, 2:08:35 PM11/3/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to reacti...@googlegroups.com
I see what you mean now from the original comment. My particular comment about Atlas and Mongo 6.0 is
not related the nmChannelsPerNode. Thanks for being responsive btw,... I realize this is a large opensource project and is complex and relied upon but lots of folks.