For the following code:
var elasticsearch = require('elasticsearch');
var client = new elasticsearch.Client({
host: '127.0.0.1:9200'
});
client.ping({
requestTimeout: 1000,
hello: "elasticsearch!"
}, function (error) {
if (error) {
console.log(error);
console.error('elasticsearch cluster is down!');
} else {
console.log('All is well');
}
});
Result in 0.11.10:
Elasticsearch ERROR: 2014-02-16T06:23:10Z
Error: Request error, retrying -- connect ENOENT
at Log.error (/Users/selva/my_repos/node_something/node_modules/elasticsearch/src/lib/log.js:213:60)
at checkRespForFailure (/Users/selva/my_repos/node_something/node_modules/elasticsearch/src/lib/transport.js:185:18)
at HttpConnector.<anonymous> (/Users/selva/my_repos/node_something/node_modules/elasticsearch/src/lib/connectors/http.js:137:7)
at ClientRequest.bound (/Users/selva/my_repos/node_something/node_modules/elasticsearch/node_modules/lodash-node/modern/internals/baseBind.js:52:17)
at ClientRequest.EventEmitter.emit (events.js:101:17)
at Socket.socketErrorListener (_http_client.js:239:9)
at Socket.EventEmitter.emit (events.js:101:17)
at net.js:434:14
at process._tickCallback (node.js:599:11)
Elasticsearch WARNING: 2014-02-16T06:23:10Z
Unable to revive connection: http://127.0.0.1:9200/
Elasticsearch WARNING: 2014-02-16T06:23:10Z
No living connections
{ [Error: No Living connections] message: 'No Living connections' }
elasticsearch cluster is down!
Whereas in v0.10.25
All is well
@mikeal
Potential issue with forever-agent v0.5.2.
Setting config keepAlive to false is working without issues.
Sounds like the same issue from #46. I don't plan to support 0.11 (an unstable version by definition) but would be happy to accept a PR if you could track down the issue.
I am using v0.10.25 still getting this .It was working fine 2 days ago .
Elasticsearch ERROR: 2014-03-19T08:05:18Z
Error: Request error, retrying -- connect ECONNREFUSED
at Log.error (/home/ajay/node_modules/elasticsearch/src/lib/log.js:213:60)
at checkRespForFailure (/home/ajay/node_modules/elasticsearch/src/lib/transport.js:185:18)
at HttpConnector.
at ClientRequest.bound (/home/ajay/node_modules/elasticsearch/node_modules/lodash-node/modern/internals/baseBind.js:56:17)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at Socket.socketErrorListener (http.js:1547:9)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:441:14
at process._tickCallback (node.js:415:13)
Elasticsearch WARNING: 2014-03-19T08:05:18Z
Unable to revive connection: http://127.0.0.1:9200/
Elasticsearch WARNING: 2014-03-19T08:05:18Z
No living connections
{ message: 'No Living connections' }
elasticsearch cluster is down!
@spalger I am using node v 4.2.1 and I still see this error:
Elasticsearch ERROR: 2016-03-11T09:53:50Z
Error: Request error, retrying -- connect ECONNREFUSED 192.168.99.100:9200
at Log.error (/Users/ara/dev/iteam/dm-crawler/node_modules/elasticsearch/src/lib/log.js:218:56)
at checkRespForFailure (/Users/ara/dev/iteam/dm-crawler/node_modules/elasticsearch/src/lib/transport.js:211:18)
at HttpConnector.<anonymous> (/Users/ara/dev/iteam/dm-crawler/node_modules/elasticsearch/src/lib/connectors/http.js:153:7)
at ClientRequest.wrapper (/Users/ara/dev/iteam/dm-crawler/node_modules/lodash/index.js:3095:19)
at emitOne (events.js:77:13)
at ClientRequest.emit (events.js:169:7)
at Socket.socketErrorListener (_http_client.js:259:9)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at emitErrorNT (net.js:1253:8)
at doNTCallback2 (node.js:439:9)
at process._tickCallback (node.js:353:17)
Elasticsearch WARNING: 2016-03-11T09:53:50Z
Unable to revive connection: http://docker:9200/
Elasticsearch WARNING: 2016-03-11T09:53:50Z
No living connections
What could be the issue?
Most helpful comment
@spalger I am using node v 4.2.1 and I still see this error:
What could be the issue?