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

Change/fix [DeadLetterQueueReader] java.nio.file.NoSuchFileException logs #15399

Closed
edmocosta opened this issue Oct 6, 2023 · 0 comments · Fixed by #16204
Closed

Change/fix [DeadLetterQueueReader] java.nio.file.NoSuchFileException logs #15399

edmocosta opened this issue Oct 6, 2023 · 0 comments · Fixed by #16204

Comments

@edmocosta
Copy link
Contributor

The DeadLetterQueueReader is noisily generating java.nio.file.NoSuchFileException WARN logs when it tries to execute the age police and invokes compareByFileTimestamp with already deleted segments. It happens more often when dead_letter_queue.storage_policy is set to drop_older raising this exception.

It seems to be expected as the file was dropped by the writer. But this logger is noisy, and we should reconsider if it really needs to be a WARN as there's no action users can take to remediate it.

Raise this exception is also avoidable and fixing it would be an option.

[2023-08-25T00:00:24,648][WARN ][org.logstash.common.io.DeadLetterQueueReader][test][4196a11abbf21202155069807a4472eb6e89a5dfb2989cea89d38f66a3656de1] Error reading file's timestamp for /var/lib/logstash/test/test/41.log
java.nio.file.NoSuchFileException: /var/lib/logstash/test/test/41.log
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) ~[?:?]
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?]
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]
	at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) ~[?:?]
	at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:148) ~[?:?]
	at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99) ~[?:?]
	at java.nio.file.Files.readAttributes(Files.java:1851) ~[?:?]
	at java.nio.file.Files.getLastModifiedTime(Files.java:2402) ~[?:?]
	at org.logstash.common.io.DeadLetterQueueReader.compareByFileTimestamp(DeadLetterQueueReader.java:389) ~[logstash-core.jar:?]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants