rmongodb对MongoDB 3的支持 [英] rmongodb support for MongoDB 3

查看:97
本文介绍了rmongodb对MongoDB 3的支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个 R脚本,在该脚本中,我需要通过身份验证连接到 MongoDB ,并使用

I am building a R script in which I need to connect to MongoDB through authentication and process the data fetched from database using rmongodb package.For that I have created a new MongoDB user in version 3.0.4 and while connecting to mongoDB from R script authentication fails. Also the user is authenticated successfully through mongo shell. Also authentication works fine while I authenticate user created in MongoDB version 2.x.

以下是我们在R脚本中用于连接到Mongo数据库的代码段.

Following is code snippet which we have used in R script to connect to Mongo database.

mongo<-mongo.create("127.0.0.1",",用户",通过","db",0L)

mongo <- mongo.create("127.0.0.1", "", "user", "pass", "db", 0L )

在执行上述代码段时,我们收到以下响应

While executing above code snippet we receive the following response

错误:加载所需的软件包:rmongodb身份验证失败.

error: Loading required package: rmongodb Authentication failed.

请向我建议rmongodb程序包中身份验证失败问题的适当解决方案.

Please suggest me appropriate solution to authentication failure issue in rmongodb package.

推荐答案

rmongodb(从1.8.0版开始)使用旧版MongoDB C驱动程序,该驱动程序尚未完全支持MongoDB 3.0.特别是,它将不支持使用新的SCRAM-SHA-1默认身份验证或可选的WiredTiger存储引擎.

rmongodb (as at 1.8.0) uses a legacy MongoDB C driver which doesn't have full support for MongoDB 3.0 yet. In particular, it will not support using the new SCRAM-SHA-1 default authentication or optional WiredTiger storage engine.

Github中有一个rmongodb问题跟踪此问题:与MongoDB 3.0版的兼容性.

There's an rmongodb issue in Github tracking this: Compatibility with version 3.0 of MongoDB.

直到rmongodb被更新,您的选择(从最少到最麻烦的顺序)包括:

Until rmongodb is updated your options (in order of least to most hasslesome) include:

使用MongoDB 2.6

use MongoDB 2.6

使用MongoDB 3.x,但降级到较早的MONGO-CR身份验证(并且不要使用WiredTiger或任何其他存储引擎)

use MongoDB 3.x but downgrade to the older MONGO-CR auth (and do not use WiredTiger or any alternative storage engines)

这篇关于rmongodb对MongoDB 3的支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆