Skip to content
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

TLS/TCP connection errors due to timeout #6

Open
robertvazan opened this issue Oct 2, 2015 · 1 comment
Open

TLS/TCP connection errors due to timeout #6

robertvazan opened this issue Oct 2, 2015 · 1 comment

Comments

@robertvazan
Copy link

I am using logback-syslog4j and it prints the following error to console whenever I log some message after a period of inactivity (a few minutes of no logging):

SSLTCPNetSyslog: DOWN (org.productivity.java.syslog4j.SyslogRuntimeException: java.net.SocketException: Software caused connection abort: socket write error)
INFO <14>Oct  2 21:24:10 HorsePower viewbox: INFO  ServerConnector: Stopped ServerConnector@43bd930a{HTTP/1.1,[http/1.1]}{127.0.0.1:8080}
 [org.productivity.java.syslog4j.SyslogRuntimeException: java.net.SocketException: Software caused connection abort: socket write error]
SSLTCPNetSyslog: UP

So whenever I log a burst of say 10 messages, only 9 of them will make it to the syslog server (papertrail in this case). The first log message is lost. Solo messages are lost altogether.

Is there any setting I can tweak to keep the connection alive or to make logback retry the failed log message?

@liskin
Copy link

liskin commented Nov 25, 2015

It seems like a hack, but setting /proc/sys/net/ipv4/tcp_keepalive_time to less than 2 hours may help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants