-
Notifications
You must be signed in to change notification settings - Fork 60
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
GeflUdpAppender throws ClosedChannelException #20
Comments
From my understanding this can only happen if the DatagramChannel has been closed by the method Is the exception thrown all the times after this first minute or does it stop at some point? Furthermore, the whole stack trace would be interesting. It might contain additional information... |
Thanks for having a look into this.
I googled a bit, would you please have a look at: |
Ok, I need some more time to investigate. I tried to reproduce this by shutting down the graylog server and starting it again, but as expected it did not result in any exception. What operating system and Java version do you use with logback-gelf? |
Cannot reproduce here. Can you try the branch https://github.com/osiegmar/logback-gelf/tree/udp-reopen (version 1.1.1-SNAPSHOT)? I'm testing for |
similar problem here. Only it appears after quite long time (weeks) and only sporadic. Will try the "robust" version ... |
Did the udp-reopen branch solved the issue for someone? |
I am sorry, I could not test it. We switched to TCP which works with no
problems so far. Please close and reopen when needed.
Oliver Siegmar <[email protected]> schrieb am Fr., 28. Sep. 2018,
20:48:
… Did the udp-reopen branch solved the issue for someone?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AOfj0Ad1nL_zlB2UsIggrSnEgMdGyVTRks5ufmzkgaJpZM4VOvje>
.
|
Similar here :-( sorry. For the installation in question, we switched to logging to stdout and let docker the forwarding to graylog. |
Please reopen this ticket if someone can test the branch |
Had similar problem with version 1.x under docker container. After certain activities GELF appender stopped sending messages to Graylog with exception: java.nio.channels.ClosedChannelException. |
+1 |
We had the very same issue and have tested your branch successfully. We had lost GELF messages after an uptime of about 1-2 days, e.g. no more GELF messages were sent by our applications. In our log files we have encountered the stated ClosedChannelException. We use the GELF Appender within various Spring Boot applications that are deployed as Docker containers and send logs via GELF to Graylog. This issue was solved by building and including your fix (https://github.com/osiegmar/logback-gelf/tree/udp-reopen). Since about 2 weeks no GELF messages were lost on various environments. Thanks a lot for your effort. We would kindly appreciate if you merge the fix into the master and include it within one of your next releases. Thanks! |
@skreuzhuber Thanks for your test and for confirming, that the udp-reopen branch fixes the problem! |
Hi, when logging to Graylog with logback-gelf-1.1.0.jar it stops logging after a minute.
By debugging I see that gelf throws a ClosedChannelException. Maybe gelf needs to check the state of channel and reopen if closed?:
The text was updated successfully, but these errors were encountered: