mallocator / Elasticsearch-Exporter

A small script to export data from one Elasticsearch cluster into another.
Apache License 2.0
593 stars 112 forks source link

Caught exception in Main process: TypeError: Object #<Object> has no method 'retry' #95

Closed lighta closed 9 years ago

lighta commented 9 years ago

Test= 1) root@imgramDashboard:/opt/asci/Elasticsearch-Exporter# nodejs exporter.js -t file -sh localhost:9200 -si crashs -st crash -tf $BASE_PATH/repos/dumps/crashs.dump Elasticsearch Exporter - Version 2.0.0 Caught exception in Main process: TypeError: Object # has no method 'retry' TypeError: Object # has no method 'retry' at Array.exports.resetSource as 1 at /usr/lib/nodejs/async.js:449:38 at Array.forEach (native) at _each (/usr/lib/nodejs/async.js:32:24) at Object.async.auto (/usr/lib/nodejs/async.js:425:9) at Object.exports.run (/opt/asci/Elasticsearch-Exporter/exporter.js:288:11) at Object. (/opt/asci/Elasticsearch-Exporter/exporter.js:308:13) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) Exit code 2: Uncaught Exception Fetched Entries: 0 documents Processed Entries: 0 documents Source DB Size: 0 documents

Details= 1) Ok it's quite easy you just need to do : npm install async But it will be nice to check if we have all the required module really present before trying to do some job, as I'm not sure everyone will solve the issue right away. (Or just Override the error msg to tell how to fix it) Not a big issue but just a suggestion.

mallocator commented 9 years ago

Did you run npm install after checking out v2.0 of the project? It's defined in the dependencies, so I'd be surprised if that process doesn't work.

Also note that v2.0 does not work yet. The generic stuff seems to be fine to test, but the ElasticSearch driver is not ready yet.

mallocator commented 9 years ago

Oh and even less so with the file driver, that one is pretty much just copied over from v1.0

lighta commented 9 years ago

with v1 installed I think it will work as well but I didn't try. I just always spawn a new VM for the test. so it's an installation from nothing.

my vagrant provider is basically this :

!/bin/bash

install nodejs

apt-get -y --force-yes --quiet install nodejs apt-get -y --force-yes --quiet install npm apt-get -y --force-yes --quiet install git cd /opt/asci

npm install elasticsearch-exporter --production

cd node_modules/elasticsearch-exporter

git clone https://github.com/mallocator/Elasticsearch-Exporter.git cd Elasticsearch-Exporter/ git checkout v2.0.0 npm install colors npm install through

What was missing after this point was : npm install async npm install util

NB2: Ok my bad it's working, I never tryed 'npm install' alone, but it seem to take all dependancy correctly =)