首页 > 其他分享 >"errmsg" : "Got invalid BSON from external server while reading from cursor

"errmsg" : "Got invalid BSON from external server while reading from cursor

时间:2022-08-17 22:00:22浏览次数:61  
标签:db invalid server cursor 3.4 Got BSON featureCompatibilityVersion

使用db.copyDatabase报错
"errmsg" : "Got invalid BSON from external server while reading from cursor
:: caused by :: InvalidBSON: Cannot use decimal BSON type when the featureCompatibilityVersion is 3.2.
See http://dochub.mongodb.org/core/3.4-feature-compatibility."
是因为featureCompatibilityVersion版本不对
1.查看当前featureCompatibilityVersion的版本
执行命令行db.adminCommand({getParameter:1,featureCompatibilityVersion:1})
返回 { "featureCompatibilityVersion" : "3.2", "ok" : 1 }
2.修改featureCompatibilityVersion版本
执行命令行db.adminCommand ({setFeatureCompatibilityVersion:"3.4"})
返回{ "featureCompatibilityVersion" : "3.4", "ok" : 1 } ,修改成功
再去执行db.copyDatabase就ok了

标签:db,invalid,server,cursor,3.4,Got,BSON,featureCompatibilityVersion
From: https://www.cnblogs.com/mtck/p/16596924.html

相关文章