-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 2.12.1
-
Component/s: Cluster Management
-
None
-
Environment:Java 1.7
Debian GNU/Linux
Single node mongo (dev)
Hi,
I've just upgraded our dev. environnement from Mongo Java Driver 2.11.4 to 2.12.1 and I'm getting the following error at each startup of our application :
mai 14, 2014 12:05:40 PM com.mongodb.MultiServerCluster handleStandAloneChanged Grave: Expecting a single StandAlone, but found more than one. Removing localhost:27017 from client view of cluster.
FYI, I'm using MongoClient(List<ServerAddress> seeds, MongoClientOptions options) constructor so that's my ClusterConnectionMode is "Multiple".
- In production / staging, I'm providing multiple servers members of replicaset without any issue
- In devel, I'm providing only a single ServerAddress, localhost:27017 which seems to be the source of this issue
Going deeper into Mongo Java driver code, I've found that my *ClusterSettings* hosts attribute, contains duplicate values : I can find twice "localhost:27017" ! It seems that hosts should be a Set instead of List.
Regards,