"errmsg" : "Got invalid BSON from external server while reading from cursor
作者:互联网
使用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了
标签:adminCommand,ok,db,invalid,server,cursor,3.4,BSON,featureCompatibilityVersion 来源: https://www.cnblogs.com/mtck/p/16596924.html