Open kirill1722 opened 7 years ago
@kirill1722
This looks like a DB / driver issue.
http://stackoverflow.com/questions/7839907/no-more-data-to-read-from-socket-error
http://www.dba-oracle.com/t_no_more_data_to_read_from_socket.htm - although in this link there are two conflicting answers.
I kinda agree that there should be some protection against this, however the plugin is new and we have not had an opportunity to collect a list errors are really retry worthy.
Some Logstash plugins do have a whitelist of exceptions worthy of a retry but those lists are collected on the battlefield. There are actually very many, maybe 100s, exceptions that can be thrown and there is no definitive list.
Question: as this is event enhancement, would it be acceptable to trap/rescue any error and tag the event and move on? With this behaviour one could implement your own retry by having a second identical jdbc_streaming instance inside a conditional block that tests for the exception tag.
@guyboertje
My Logstash App is running inside Openshift / Kubernetes Pod, Docker Container. It resolves some Foreign Keys, Lookups, Data Denormalization of some business data. So I have to restart it, if I know that some Data is missing.
I have the following ideas:
1. Is it possible that the plugin kills Logstash, if this error occurs? The error says "..restart logstash"
The liveness check of Openshift would restart the Container, if Logstash would not responding.
2. There is new Monitoring API from Logstash. So a (custom) Monitoring App could detect that the pipeline is broken and restart the container. Didnt try this out. https://www.elastic.co/guide/en/logstash/current/monitoring.html
reducing jdbc_connection_timeout. So maybe it reconnects.
retry mechanism which you have described
The plugin refreshes the connections if this error occurs.
using http filter plugin for lookups
Hello
After some time we get the following Exception and Data is lost.
Exception in pipelineworker, the pipeline stopped processing new events, please check your filter configuration and restart Logstash "exception"=>java.sql.SQLRecoverableException: No more data to read from socket
Version Oracle 11.2.0.4.0
To fix it the plugin should handle Network or Sql Exceptions with retry. Or validate / refresh connection when SQL Exception occurs.
Thanks