I am running meteor application in a localhost on port 3000 and I can't connect R with my MongoDB. ( I checked this code for MongoDB running on port 27017 without meteor - just pure database and it's working properly). Meteor create an own database which is calling meteor and inside are my collections ( including images in this sample).
library(RMongo)
mongo<- mongoDbConnect("meteor", host="127.0.0.1", port=3000) #error
#mongo<- mongoDbConnect("meteor", host="127.0.0.1", port=27017)# - that's work
output <- dbGetQuery(mongo, 'images', '{}')
print(output)
I have this error:
error in '.jcall(rmongo.object@javaMongo, "S", "dbGetQuery", collection, ':
com.mongodb.MongoException$Network: Read operation to server /127.0.0.1:3000 failed on database meteor
dbGetQuery ... dbGetQueryForKeys -> dbGetQueryForKeys -> .jcall -> .jcheck -> .Call
EDIT: the same problem with any other R packages like mongolite
No suitable servers found (
serverSelectionTryOnce
set): [connection closed calling ismaster on 'localhost:3000']