Skip to content

Updater : Elastic search database needed even if using MongoDB #40

Open
@ftrastour

Description

Running

node updater.js

fails with the following error:

events.js:397
EventEmitter.listenerCount = function(emitter, type) {
^

RangeError: Maximum call stack size exceeded
at Function.EventEmitter.listenerCount (events.js:397:38)
at Log.listenerCount (/apps/landsat-api-master/node_modules/landsat-meta-updater/node_modules/elasticsearch/src/lib/log.js:68:25)
at Function.EventEmitter.listenerCount (events.js:399:20)
at Log.listenerCount (/apps/landsat-api-master/node_modules/landsat-meta-updater/node_modules/elasticsearch/src/lib/log.js:68:25)
at Function.EventEmitter.listenerCount (events.js:399:20)
at Log.listenerCount (/apps/landsat-api-master/node_modules/landsat-meta-updater/node_modules/elasticsearch/src/lib/log.js:68:25)
at Function.EventEmitter.listenerCount (events.js:399:20)
at Log.listenerCount (/apps/landsat-api-master/node_modules/landsat-meta-updater/node_modules/elasticsearch/src/lib/log.js:68:25)
at Function.EventEmitter.listenerCount (events.js:399:20)
at Log.listenerCount (/apps/landsat-api-master/node_modules/landsat-meta-updater/node_modules/elasticsearch/src/lib/log.js:68:25)
at Function.EventEmitter.listenerCount (events.js:399:20)
at Log.listenerCount (/apps/landsat-api-master/node_modules/landsat-meta-updater/node_modules/elasticsearch/src/lib/log.js:68:25)
at Function.EventEmitter.listenerCount (events.js:399:20)
at Log.listenerCount (/apps/landsat-api-master/node_modules/landsat-meta-updater/node_modules/elasticsearch/src/lib/log.js:68:25)
at Function.EventEmitter.listenerCount (events.js:399:20)
at Log.listenerCount (/apps/landsat-api-master/node_modules/landsat-meta-updater/node_modules/elasticsearch/src/lib/log.js:68:25)
at Function.EventEmitter.listenerCount (events.js:399:20)
at Log.listenerCount (/apps/landsat-api-master/node_modules/landsat-meta-updater/node_modules/elasticsearch/src/lib/log.js:68:25)
at Function.EventEmitter.listenerCount (events.js:399:20)
at Log.listenerCount (/apps/landsat-api-master/node_modules/landsat-meta-updater/node_modules/elasticsearch/src/lib/log.js:68:25)
at Function.EventEmitter.listenerCount (events.js:399:20)
at Log.listenerCount (/apps/landsat-api-master/node_modules/landsat-meta-updater/node_modules/elasticsearch/src/lib/log.js:68:25)

even if DB_TYPE=mongo in the .env file.

Commenting the following lines from /node_modules/landsat-meta-updater/libs/connections.js:

// Connection to Elastic Search
//module.exports.elasticsearch = new elasticsearch.Client({
// host: process.env.ES_HOST || 'localhost:9200',
// Note that this doesn't abort the query.
// requestTimeout: process.env.ES_TIMEOUT || 50000 // milliseconds
//});

solved the problem (but this is probably not a good solution when DB_TYPE is es).
This code should probably be executed only when DB_TYPE is es.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions