zhr85210078 / node-mongodb-es-connector

nodejs mongodb elasticsearch synchrodata(mongodb和es同步数据)
https://zhr85210078.github.io/node-mongodb-es-connector/#/
MIT License
77 stars 17 forks source link

dataResults in mongodb and DataConfig Master document has some problems #11

Closed sushantrahate closed 6 years ago

sushantrahate commented 6 years ago

Hello, Im getting following error

error: {"cluster":"http://localhost:9200","index":"myplaces","msg":"there is no dataResults in mongodb, FileName is : places.json"}
error: {"cluster":"http://localhost:9200","index":"places","msg":"DataConfig Master document has some problems, FileName is : places.json"}
{
    "mongodb": {
        "m_database": "placesdb",
        "m_collectionname": "place",
        "m_filterfilds": {
            "version": "2.0"
        },
        "m_connection": {
            "m_servers": [
                "localhost:27017"
            ],
            "m_authentication": {
                "username": "",
                "password": "",
                "ssl": false
            }
        },
        "m_url": "mongodb://localhost:27017/placesdb",
        "m_documentsinbatch": 5000,
        "m_delaytime": 1000
    },
    "elasticsearch": {
        "e_index": "newplace",
        "e_type": "place",
        "e_connection": {
            "e_server": "http://localhost:9200",
            "e_httpauth": {
                "username": "",
                "password": ""
            }
        },
        "e_pipeline": false,
        "e_iscontainattachment": false
    }
}

Im not able figure out whats worng! Please help me solve this

treemore commented 6 years ago

try to clear the m_filterfilds . like

"m_filterfilds":{
}
zhr85210078 commented 6 years ago

"m_filterfilds":null

sushantrahate commented 6 years ago

Thank you so much @treemore and @zhr85210078 . both solution worked :) But getting this error now,
error: {"cluster":"http://10.21.32.76:9200","index":"newplace","msg":"oplog errors: Error: query parameter undefined is an incomplete value pair\nReconnecting..."}

zhr85210078 commented 6 years ago

You have to change the mongodb into a replica structure! pls read this links: https://www.compose.com/articles/the-mongodb-oplog-and-node-js/ and https://docs.mongodb.com/manual/core/replica-set-members/

I hope help you.

sushantrahate commented 6 years ago

Thank you so much @zhr85210078