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
Bug: _update_offset_file
should use filehandle()
and not filename
#38
Comments
@bgreenlee Let me know if you agree with the change and I'll be happy to submit a PR. Cheers! |
Hm, I just hit the problem where *.offset file contains new inode number but old (big) offset, for example:
And now new run of pygtail processes nothing (because pygtail cannot handle such Bad news is that I'm using pygtail with your proposed change included, so bad inode |
I am running few python scripts under supervisord which are emitting Recently, I met with a case with two of my deployments stopped seeing new lines. I checked the offset file, and came across below findings: 1st deployment showed:
2nd deployment showed:
Any clue what might be wrong here? I restarted my instances, and things worked like before. |
_update_offset_file
currently uses the following assignment for inode calculation:However, this should be:
This covers the case in
next
when we are not at the end of a file:Without it, we may be processing
_rotated_logfile
or a renamed file and incorrectly associate the current inode.The text was updated successfully, but these errors were encountered: