sematext / logagent-js

Extensible log shipper with input/output plugins, buffering, parsing, data masking, and small memory/CPU footprint

Home Page:https://sematext.com/logagent

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERR_STREAM_WRITE_AFTER_END

mqw opened this issue · comments

commented

We use logagent in a container logging using GELF to Graylog, and after working for a while it stars filling container log so fast it fills the docker partition.
This log keeps spamming, restarting container brings it back to working state.
Possibly Unhandled Rejection at: Promise Promise {
Error [ERR_STREAM_WRITE_AFTER_END] [ERR_STREAM_WRITE_AFTER_END]: write after end
at writeAfterEnd (_stream_writable.js:266:14)
at RotatingFileStream.Writable.write (_stream_writable.js:315:5)
at OutputFile.eventHandler (/lib/plugins/output/files.js:67:14)
at LogEventEmitter.emit (/node_modules/eventemitter3/index.js:203:33)
at LogEventEmitter.parsedEvent (/lib/core/logEventEmitter.js:22:8)
at processOutput (/bin/logagent.js:619:31) {
code: 'ERR_STREAM_WRITE_AFTER_END'
}
} reason: Error [ERR_STREAM_WRITE_AFTER_END] [ERR_STREAM_WRITE_AFTER_END]: write after end
at writeAfterEnd (_stream_writable.js:266:14)
at RotatingFileStream.Writable.write (_stream_writable.js:315:5)
at OutputFile.eventHandler (/lib/plugins/output/files.js:67:14)
at LogEventEmitter.emit (/node_modules/eventemitter3/index.js:203:33)
at LogEventEmitter.parsedEvent (/lib/core/logEventEmitter.js:22:8)
at processOutput (/bin/logagent.js:619:31) {
code: 'ERR_STREAM_WRITE_AFTER_END'
}
Error [ERR_STREAM_WRITE_AFTER_END] [ERR_STREAM_WRITE_AFTER_END]: write after end
at writeAfterEnd (_stream_writable.js:266:14)

Hey @mqw ! Thanks for reporting this issue. I'll take a look at it today.
Can you explain to me a bit more about your setup? You're running Logagent as a container in Docker Swarm/Compose or Kubernetes? What container engine are you using, Docker or Containerd? Also, I'd like to know what your logagent.conf looks like, if you're using a custom config.