草庐IT

WritableServerSelector

全部标签

java - WritableServerSelector 没有从集群中选择服务器

作为MongoDB的新手,我正在尝试将一个简单的文档插入到我新安装的mongoDB(v3.2.4)中。使用MongoDBDriver3.2.2。这是我最小化的代码:public(){publicstaticfinalStringCOLLECTION_NAME="logs";MongoClientmongoClient=newMongoClient("");MongoDatabasedb=mongoClient.getDatabase("test");Documentdata=newDocument();data.append();//...insertingmoreintodocume

java - 在等待与 WritableServerSelector 匹配的服务器时超时 30000 毫秒

我在很多论坛上都看到过这个问题,但没有一个能解决我的问题。我正在尝试将示例文档插入MongoDBDB。不幸的是,在插入过程中colReceived.insert(doc)我得到了以下错误:SEVERE:Servlet.service()forservletspringthrewexceptioncom.mongodb.MongoTimeoutException:Timedoutafter30000mswhilewaitingforaserverthatmatchesWritableServerSelector.Clientviewofclusterstateis{type=UNKNOW

java - 在等待与 WritableServerSelector 匹配的服务器时超时 30000 毫秒

我在很多论坛上都看到过这个问题,但没有一个能解决我的问题。我正在尝试将示例文档插入MongoDBDB。不幸的是,在插入过程中colReceived.insert(doc)我得到了以下错误:SEVERE:Servlet.service()forservletspringthrewexceptioncom.mongodb.MongoTimeoutException:Timedoutafter30000mswhilewaitingforaserverthatmatchesWritableServerSelector.Clientviewofclusterstateis{type=UNKNOW