-
Notifications
You must be signed in to change notification settings - Fork 133
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
No logging if ELK stack is not fully up #43
Comments
Noticed the same thing (technically while running the dockerized version of this). Re-created a logstash container and had to restart this logspout container in order to make it work. I'm also talking from logspout to logstash over UDP so I would expect those requests to just kind of fail if logstash wasn't running, then start working when logstash came back online. That is not the behavior I'm seeing though. |
I would happily merge a PR if anyone wants to submit a fix for this. |
I'm working on a change that lets logspout-logstash retry when starting (connecting for the first time) and when sending data. Looks ok when the logspout-logstash is started and logstash isn't ready; it just waits and then starts logging. The part I'm not sure about is retrying when sending - it recovers when using UDP and the target does not change. It doesn't recover when using TCP since the connection is broken, and it won't survive if the address of the log target changes. So perhaps I shouldn't try that, just let logspout die and have docker restart the container. Unfortunately if I understand the way logspout plugins work correctly, forcing a reconnect in that situation isn't possible. In any case, log lines would be lost. Any opinions or suggestions about that? |
For completeness, my log:
|
@iljaweis: I think exiting the container would be a acceptable workaround until some real solution is found. Also maybe it needs to refresh the DNS addresses somehow? |
@luckydonald that's what I did in #48 which has been merged. |
Could #51 help with this you think? |
Seems like no ones looked into this for awhile. I'm still seeing the issue when the log target's IP changes. Is there any update or are you still looking for a PR? |
I’m not using the lib right now so a PR would be welcome! |
Well I can replicate the problem easily but I can't pin-point the problem exactly. Its definitely a Logspout proper issue and not an issue with this plugin. Building logspout from the root of it's repository instead of the |
I was using a dockerhub image that is a self-contained ELK stack. I was trying to run the ELK stack and Logspout-Logstash from a single docker-compose.yml.
Seems that if the ELK stack is not FULLY up, Logspout-Logstash never starts logging. Restarting the logspout container does correct it. So, just noting that here, it would be nice if it would do re-tries or something. Unless perhaps it's an issue with my setup.
Here is my docker-compose file
The text was updated successfully, but these errors were encountered: