Comments (10)
I doubt that this is related to exit handlers.
Signals are recognized (SIGINT, SIGQUIT, SIGTERM).
https://github.com/sematext/logagent-js/blob/1.x/bin/logagent.js#L524-#L526
The invalid position is from the tailForever.unwatch() (or a bug in reading the postion before it gets stored). https://github.com/sematext/logagent-js/blob/master/lib/fileManager.js#L141
Was the file renamed? How can this error be re-produced?
from logagent-js.
You could get some more log messages (on stderr, stored e.g. in /var/log/upstart/logagent.log when you use the upstart service). Set following environment variables
export LOG_TAIL_FILE_INFO=1
export DEBUG=1
from logagent-js.
Thanks, that will help. By the way, I'm running this as a spawned process in the shell and not daemonized. Not renaming files, although I ran it multiple times against different files (full log file vs a small subset). I'll figure out how to reproduce and probably submit a PR. A PR for this should go against 1.x branch?
from logagent-js.
Yes please 1.x - 2.x needs to get in shape, working on plugins.
Do you use --diskBufferDir /tmp/logagent
? The file is always stored in this directory. So you run it with different file sets. I could imagine that an old file gets into the list (it was stored), but LA never started a tail process on it, then it tries to unwatch - but I did not check this.
from logagent-js.
I think I was able to narrow down the issue. My nodejs-fu is not strong enough to add much more insight at this point. I worry about getting a response since that repo has no commits for almost 2 years. Hopefully someone here has some insight.
from logagent-js.
Published on npm - I will watch the tailF repository. We should consider a fork or alternative library.
from logagent-js.
Thanks for the workaround but I worry it will try to read the entire file into memory since maxSize defaults to -1. I think I have a fix in this PR.
from logagent-js.
Thanks for catching this! Please ping when a new npm version is available. So I will remove "bufferSize: -1" again.
from logagent-js.
Oh, its on npm already:tail-forever 0.3.12 :)
from logagent-js.
Made a quick test and release with updated dependency. Release: 1.2.25.
from logagent-js.
Related Issues (20)
- Stop watching a log file after it's been rotated HOT 1
- Go stack traces are not shipped HOT 2
- Java Exception not parsed well HOT 2
- logagent-js unix_stream help HOT 2
- Document how to rename a field HOT 1
- Logagent doesn't parse incoming lines in some cases
- ERR_STREAM_WRITE_AFTER_END HOT 1
- Add Node.js v15 to CI
- Add possibility to configure publish options in MQTT output plugin HOT 3
- [BUG] Wrong url for output-http plugin page HOT 1
- File-access via Windows UNC Path fails
- BrokerNotAvailableError: Broker not available HOT 4
- logagent failling on using azure eventhub plugin HOT 3
- logagent to load credentials from EC2 role instead of aws_config.json HOT 5
- Cannot connect to opensearch.
- input-filter-grok
- Heroku "Missing Logsene Token" error even when using custom LOG_RECEIVER_URL
- Logagent temporary file location for windows HOT 2
- Latest releases not on dockerhub HOT 3
- v3.0.58+ Dropeventsfilter plugin ignoring Debug flag settings in config file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from logagent-js.