Comments (2)
@niekosau can you show your logstash log of input.s3? May be i have a same problem
from logstash-input-s3.
I'm using logstash 7.17.4 with plugin version 3.8.3
I think the comparison logic is the culprit here. In my case it is comparing timestamps which end with different local formats.
Before this I added
::File.open('/tmp/debug.log', 'a') { |file| file.write("object.last_modified: ", object.last_modified, ", log.last_modified: ", log.last_modified, "\n") }
Which gives me:
object.last_modified: 2021-06-25 16:38:23 +0000, log.last_modified: 2021-06-25 16:38:23 UTC
I'm not familiar with ruby but when comparing the dates it probably casts them to the above string representations which are not the same.
In the first step I fixed it on my side by comparing the unix time stamps
if object.last_modified.to_i == log.last_modified.to_i
Still this works not 100% as expected. The logic applied here is to save the latest timestamp seen in s3 to the sincedb. If you do not delete your files in the s3 you will always import all files which have the same timestamp as stored in the sincedb path. Which means you will import the latest file again and again.
To fix this issue I always add 1s to the timestamp written to the sincedb, after this line
since = since + 1
I'm not sure if there will be any side effects when simply adding +1 to the timestamp (at least it works for me now as expected).
One should probably fix the comparising logic.
from logstash-input-s3.
Related Issues (20)
- logstash s3 input enable use_accelerate_endpoint failed
- Logstash S3 input plugin assume role not working HOT 9
- backup_to_dir backups rotation
- seahorse::client:: networking error HOT 2
- S3 input plugin is not reading AWS-KMS (CMK) encrypted bucket HOT 2
- Large files are very slow to read locally HOT 2
- Files being unprocessed with the same last modified timestamp HOT 6
- Could not fetch objects from "requester pays" enabled bucket HOT 1
- logstash-input-s3 3.6.0 restarting due to unrecoverable error with CipherSuites array issue HOT 1
- s3 input plugin not handling shutdown correctly, leading to duplicates once started again HOT 2
- Files being unprocessed because of cutoff time calculation part
- logstash-input-s3 Error: Net::OpenTimeout 没人解决就关闭问题吗?
- [Logstash 7.16.2] S3 input plugin replaces the region in endpnt url HOT 7
- [Docs] Document workaround when using s3 private link endpoints with us-east-1
- S3 input plugin does not work with IAM role WebIdentity HOT 3
- Plugin dont process objects correctly, dont delete or backup HOT 11
- Files with same last modified timestamp miss processing HOT 1
- Constant and frequent s3 plugin restart due to TCP connection failure
- java.util.concurrent.ScheduledThreadPoolExecutor related to S3 input resulting in all pipeline logstash failure. HOT 1
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 logstash-input-s3.