Comments (8)
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.
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.
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.
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.
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.
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.
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.
@jaakkos I think this issue really describes two issues:
- reconnect logstash after one sided disconnection <-- this one you already handled
- 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)
- Logging to multiple logstash instances HOT 3
- Trouble parsing json HOT 1
- Restore connection when logstash is restarted HOT 2
- Improvement: force close method HOT 4
- Shouldn't throw exception when it fails to log to logstash? HOT 22
- winston-logstash and npm v3.3.5 result in 'Unmet Peer Dependency' HOT 3
- Looking for maintainers HOT 3
- Logs lost on ECONNRESET HOT 1
- Module export has unpredictable signature based on Winston dependency
- How to change timestamp format.
- Test are broken in Travis with node 8 issue with error "Uncaught Error: socket hang up" HOT 3
- Cannot get to work with winston 3 HOT 15
- winston.add() doesn't work? HOT 3
- Invalid transport, must be an object with a log method. HOT 1
- Winston didn't sent log to Logstash HOT 2
- How can i add application_name to the payload ? HOT 1
- ssl_enable doesnt work without setting rejectUnauthorized: false
- colors are not being stripped from messages and metadata anymore
- unsafe stringify and JSON circular structure
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 winston-logstash.