Giter VIP home page Giter VIP logo

Comments (8)

jaakkos avatar jaakkos commented on August 10, 2024

Hi!

I don't have any direct advice, but I'll try to reproduce the issue and figure out the problem. I'll get back when I have some thing to share. 👍

from winston-logstash.

jaakkos avatar jaakkos commented on August 10, 2024

I started to write test cases for the config reload when I noticed an issue with the reload when there was output with TCP configuration. It doesn't reload the configuration because it can't start the TCP server because the port is still in use. Have you noticed a similar case? my draft pr #76

logstash-logstash-1 | [2023-03-18T08:20:23,286][ERROR][logstash.outputs.tcp ][main] Could not start tcp server: Address in use {:host=>"0.0.0.0", :port=>9999}

from winston-logstash.

hassan379 avatar hassan379 commented on August 10, 2024

No
I can not see your error log in my logstash console
I am using logstash 8.6.2 and elasticsearch 8.6.2 on Windows
and this is my .conf file

    input {
        tcp { port => 28777 }
    }
    output {
      elasticsearch {
        hosts => ["http://localhost:9200/"]
        user => "elastic"
        password => "PASSWORD"
        index => "dummy_index"
      }
      stdout { }
    }

    filter {
        json {
          source => "message"
        }
        json {
          source => "message"
          remove_field => [ "message","event","timestamp" ]
        }
    }

from winston-logstash.

jaakkos avatar jaakkos commented on August 10, 2024

My current test setup uses TCP output, which leads the reload case to this known bug https://discuss.elastic.co/t/tcp-output-plugin-blocking-port-across-configuration-reload/163732 . So I need to go around it to write the test case for config reloading.

from winston-logstash.

jaakkos avatar jaakkos commented on August 10, 2024

While I failed to write a failing test due to the bug, I created a sandbox setup where I reproduced the scenario. On the reload, the Logstash closes the connection without any error, which leads to a case where the code is not retrying. Next, I need to figure out if adding the retry logic might break the backward compatibility; if not, it's a straightforward change.

from winston-logstash.

jaakkos avatar jaakkos commented on August 10, 2024

A working solution is now for reconnecting to logstash after it closes the connection in draft #76. I still need to figure out the best way to write some tests and check if the change is backwards compatible.

from winston-logstash.

jaakkos avatar jaakkos commented on August 10, 2024

I just released a new version which addressed this issue. If you still have issues with the reconnect don't hesitate to re-open the issue. 😄

from winston-logstash.

nitzan-blink avatar nitzan-blink commented on August 10, 2024

@jaakkos I think this issue really describes two issues:

  1. reconnect logstash after one sided disconnection <-- this one you already handled
  2. all other transports are getting paralyzed, when using max_connect_retries: -1

the second issue is still relevant, easily reproducible, and very dangerous in production.
while winston-logstash tries to reconnect, all other transports do not work at all.
imagine logstash going down for 5 minutes - NOTHING is getting logged anywhere (in the first post there are TWO more transports - console and file), until it either returns, or the retry limit reached (in which case nothing further will log, unless you manually remove and add transports, in an error handler).
why is there such a strong coupling between the transports?

from winston-logstash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.