Closed hatashiro closed 9 years ago
BTW, when tested in my environment, it keeps printing the following message.
[error] r.api.Failover - Got an error, no more attempts to do. Completing with a failure...
reactivemongo.core.actors.Exceptions$PrimaryUnavailableException$: MongoError['No primary node is available!']
at reactivemongo.core.actors.Exceptions$PrimaryUnavailableException$.<clinit>(actors.scala) ~[reactivemongo_2.10-0.10.5.akka23-SNAPSHOT.jar:0.10.5.akka23-SNAPSHOT]
at reactivemongo.core.actors.MongoDBSystem$$anonfun$pickChannel$4.apply(actors.scala:508) ~[reactivemongo_2.10-0.10.5.akka23-SNAPSHOT.jar:0.10.5.akka23-SNAPSHOT]
at reactivemongo.core.actors.MongoDBSystem$$anonfun$pickChannel$4.apply(actors.scala:508) ~[reactivemongo_2.10-0.10.5.akka23-SNAPSHOT.jar:0.10.5.akka23-SNAPSHOT]
at scala.Option.getOrElse(Option.scala:120) ~[scala-library.jar:na]
at reactivemongo.core.actors.MongoDBSystem.pickChannel(actors.scala:508) ~[reactivemongo_2.10-0.10.5.akka23-SNAPSHOT.jar:0.10.5.akka23-SNAPSHOT]
I couldn't find where the error comes from. I think ReactiveMongo is not needed to be turned on for config servers, so I'd like to turn it off but I can't find out how to turn it off.
Any idea?
Cause it works only in production mode, you can manually test it with the following command:
activator run -Dbeyond.mongodb.type="config" -Dbeyond.standalone-mode=true -Dbeyond.mongodb.config.dbpath="data/dev/mongo/configsvr" -Dbeyond.mongodb.config.port="27019"
Why do you using 'svr' instead of 'server'? Do you has a reason for using abbreviation?
No specific reason. Just it's used in mongod
as well like --configsvr
. Would it be better to change it to server
?
I prefer to avoid abbreviation if there is no significant reason. So I want to use server
even if the option is --configsvr
.
But it's just my flavor. If you want to use svr
I'll not care about it.
The others are LGTM.
I'll change them to server
. Btw, I've found a problem in the implementation about port
. It must be a address:port
format, cause they will be used by mongos
s.
I'll modify a little bit and upload this again till tmr.
nvm. I think port
must be enough for the manual version. I've updated this PR.
The first commit is to separate some configs of MongoDB into a separated object, because there will be more settings that will be added and they will make the original configuration complicated.
The other commit is to implement a launcher to launch a MongoDB config server.