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

Error running any commands: no such file or directory './drivers' #103

Closed josegonzalez closed 9 years ago

josegonzalez commented 9 years ago

Here is a sample (import) command that fails on master:

node --nouse-idle-notification \
     --expose-gc /tmp/node_modules/elasticsearch-exporter/exporter.js \
     --source file \
     --sourceFile /tmp/api-es \
     --targetHost localhost \
     --targetIndex seatgeek-1 \
     --max-old-space-size=700

stacktrace

Elasticsearch Exporter - Version 2.0.0
Caught exception in Main process: Error: ENOENT, no such file or directory './drivers'
Error: ENOENT, no such file or directory './drivers'
    at Object.fs.readdirSync (fs.js:666:18)
    at Object.exports.find (/tmp/node_modules/elasticsearch-exporter/drivers.js:130:20)
    at /tmp/node_modules/elasticsearch-exporter/options.js:196:17
    at /tmp/node_modules/elasticsearch-exporter/node_modules/async/lib/async.js:125:13
    at Array.forEach (native)
    at _each (/tmp/node_modules/elasticsearch-exporter/node_modules/async/lib/async.js:46:24)
    at Object.async.each (/tmp/node_modules/elasticsearch-exporter/node_modules/async/lib/async.js:124:9)
    at Object.exports.read (/tmp/node_modules/elasticsearch-exporter/options.js:195:11)
    at Array.exports.readOptions [as 0] (/tmp/node_modules/elasticsearch-exporter/exporter.js:70:13)
    at /tmp/node_modules/elasticsearch-exporter/node_modules/async/lib/async.js:487:38

This used to work (as of march) but doesn't anymore. Using the latest stable release results in a different bug - Caught exception in Main process: SyntaxError: Unexpected token u - that I think was since fixed but since I can't get npm to install a specific tarball (grr), I'm stuck with master or stable :(

mallocator commented 9 years ago

have you tried running the script in the exporter directory? Otherwise there's also an option to specify the drivers directory in which to look for. In any case this can be made more robust and path independent so thank you for reporting.

josegonzalez commented 9 years ago

Sorry, how was this fixed?

mallocator commented 9 years ago

commit 931d155 should fix the problem.