elasticsearch-river-mongodb icon indicating copy to clipboard operation
elasticsearch-river-mongodb copied to clipboard

ELASTICSEARCH connect MONGOLAB BDD seems empty

Open gsarfati opened this issue 9 years ago • 0 comments

Hello, I'm trying to connect elasticsearch hosted on aws ec2 to my database Mongo DB hosted on MongoLab with elasticsearch-river-mongodb , I created a user oplog..

There is no problem when connect elasticsearch with mongodb hosted in the same server without credentials, there is no problem when connect to hosted mongodb via mongo driver too but when I'm trying to connect with mongolab there is no error but the bdd seems empty. I think my credential syntax with elasticsearch-river-mongodb is wrong , can you help me ? Thank you !

elasticsearch version 1.7.3 mongodb version 2.6.12 elasticsearch-river-mongodb version 2.0.11 elasticsearch-mapper-attachments version 2.7.1

curl -XPUT "127.0.0.1:9200/_river/Customer/_meta" -d '
{
  "type": "mongodb",
  "mongodb": {
    "servers": [
      { 
        "host": "ds012345-a0.mlab.com",
        "port": 19202
      }
    ],
     "credentials": [
      { "db": "production", "user": "api", "password": "XXX" },
      { "db": "admin", "user": "elasticsearch", "password": "XXXX" }
    ],
    "options": { "secondary_read_preference": true },
    "db": "production",
    "collection": "Customer"
 },
  "index": {
    "name": "Customer",
    "type": "Customer"
  }
}'

gsarfati avatar May 10 '16 08:05 gsarfati