Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch ERROR: 2020-04-14T15:05:58Z Error: Request error, retrying HEAD http://localhost:9200/ => connect ECONNREFUSED 127.0.0.1:9200 at Log.error (C:\workspace\insign-billing\node_modules\elasticsearch\src\lib\log.js:226:56) at checkRespForFailure (C:\workspace\insign-billing\node_modules\elasticsearch\src\lib\transport.js:259:18) at HttpConnector.<anonymous> (C:\workspace\insign-billing\node_modules\elasticsearch\src\lib\connectors\http.js:164:7) at ClientRequest.wrapper (C:\workspace\insign-billing\node_modules\lodash\lodash.js:4929:19) at ClientRequest.emit (events.js:321:20) at ClientRequest.EventEmitter.emit (domain.js:485:12) at Socket.socketErrorListener (_http_client.js:432:9) at Socket.emit (events.js:321:20) at Socket.EventEmitter.emit (domain.js:485:12) at emitErrorNT (internal/streams/destroy.js:84:8) at processTicksAndRejections (internal/process/task_queues.js:84:21) #132

Open
bijanzohouri opened this issue Apr 14, 2020 · 0 comments

Comments

@bijanzohouri
Copy link

I am using following verisons of winston and winston-elasticsearch
"winston": "^3.2.1",
"winston-elasticsearch": "^0.7.0"
my Logger.js file is like this:
var winston = require('winston')
// var expressWinston = require('express-winston')
var WinstonGraylog2 = require('winston-graylog2')
var Elasticsearch = require('winston-elasticsearch')

module.exports = {
logger: winston.createLogger({
format: winston.format.combine(
winston.format.errors({ stack: true }),
winston.format.metadata(),
winston.format.json()
),
meta: true,
transports: [
new Elasticsearch({
level: 'error',
clientOpts: {
node: 'elasticsearch'
},
indexPrefix: 'billing',
indexSuffixPattern: 'YYYY-MM-DD'
})
].concat(files)
})
}
When I run npm run lint is get following error, though it says 'Done no lint issue found!'
image
The same problem occures for npm run build as well.
Even if you run an elastic on http://localhost:9200 it hangs there and you have to terminate the process.
Any body has any idea where would I fix this!

@bijanzohouri bijanzohouri changed the title Elasticsearch ERROR: 2020-04-14T14:56:19Z Error: Request error, retrying Elasticsearch ERROR: 2020-04-14T15:05:58Z Error: Request error, retrying HEAD http://localhost:9200/ => connect ECONNREFUSED 127.0.0.1:9200 at Log.error (C:\workspace\insign-billing\node_modules\elasticsearch\src\lib\log.js:226:56) at checkRespForFailure (C:\workspace\insign-billing\node_modules\elasticsearch\src\lib\transport.js:259:18) at HttpConnector.<anonymous> (C:\workspace\insign-billing\node_modules\elasticsearch\src\lib\connectors\http.js:164:7) at ClientRequest.wrapper (C:\workspace\insign-billing\node_modules\lodash\lodash.js:4929:19) at ClientRequest.emit (events.js:321:20) at ClientRequest.EventEmitter.emit (domain.js:485:12) at Socket.socketErrorListener (_http_client.js:432:9) at Socket.emit (events.js:321:20) at Socket.EventEmitter.emit (domain.js:485:12) at emitErrorNT (internal/streams/destroy.js:84:8) at processTicksAndRejections (internal/process/task_queues.js:84:21) Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant