Mongo 客戶端出錯 (Error with Mongo Client)


問題描述

Mongo 客戶端出錯 (Error with Mongo Client)

When I try to connected to a Mongo server with the mongo client, I get the following warning:

Error while trying to show server startup warnings: no such cmd

It still gives me access and I can access the database. The issue is when I try accessing the DB from C#. That warning throws an exception, and the application terminates.

The mongod command used was 

mongod ‑‑port 30000

No startup scripts as far as I can tell.

The mongo server is running on Debian, on another machine.

Update

The error thrown by .NET is

Unable to connect to server xxx.xxx.xxx.xx:30000: Command 'ping' failed: no such cmd (response: { "errmsg" : "no such cmd", "bad cmd" : { "ping" : 1 }, "ok" : 0.0 }).

參考解法

方法 1:

Solved. The server version was older than the client version.

(by GersonGerson)

參考文件

  1. Error with Mongo Client (CC BY‑SA 3.0/4.0)

#mongoDB #debian #C#






相關問題

將 (.net) BsonDocument 字符串轉換為 (java) DBObject (Converting (.net) BsonDocument string into a (java) DBObject)

Mongo 客戶端出錯 (Error with Mongo Client)

對列表進行排序並在 mongodb 中插入一個新列 (Sort the list and insert a new column in mongodb)

無法導入示例數據集(系統找不到指定文件) (Cannot import example dataset (the system cannot find the specified file))

mongodb c#更新嵌入文檔 (mongodb c# update embedded document)

查詢嵌入列表中的數組 (Querying for array in embedded list)

搜索條件的mongodb map reduce (mongodb map reduce for search criteria)

org.bson.codecs.configuration.CodecConfigurationException:找不到類 [Ljava.lang.String; 的編解碼器; (org.bson.codecs.configuration.CodecConfigurationException: Can't find a codec for class [Ljava.lang.String;)

在碼頭上部署 gwt Web 應用程序 (deploying gwt web application on jetty)

MongoMetaRecord MegaProtoUser 登錄時密碼未散列 (MongoMetaRecord MegaProtoUser Password not hashed when signing in)

將 mongo shell 連接到受限的 MongoDB Atlas 數據庫? (Connect mongo shell to restricted MongoDB Atlas Database?)

用於 $or 和 $and 場景的 $elemMatch 數組 (Arrays working $elemMatch for $or and $and scenarios)







留言討論