kmtong / logback-redis-appender

Logback Redis Appender
Apache License 2.0
114 stars 64 forks source link

Every log posted to Redis (hosted on AWS) via the redis logback appender is throwing Readtimeout execption #14

Open bhwanip opened 9 years ago

bhwanip commented 9 years ago

Every log posted to Redis via the logback appender is throwing Readtimeout execption, Redis is feeding the ELK stack we can see all logs passing through to Elastic and Kibana, so there is no loss of logs. But could not understand the reason for below exception. Any pointers/help please?

Redis is running on AWS EC2 instance and the log posting app is on my local set up. Strangely this error is not observed when log are posting from a client running with in AWS on another EC2 instance.

Using the logback Redis appender for posting logs to Redis com.cwbase logback-redis-appender 1.1.2

at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:201) at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40) at redis.clients.jedis.Protocol.process(Protocol.java:132) at redis.clients.jedis.Protocol.read(Protocol.java:196) at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:288) at redis.clients.jedis.Connection.getIntegerReply(Connection.java:213) at redis.clients.jedis.Jedis.rpush(Jedis.java:797) at com.cwbase.logback.RedisAppender.append(RedisAppender.java:43) at com.cwbase.logback.RedisAppender.append(RedisAppender.java:16) at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:88) at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:48) at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:273) at ch.qos.logback.classic.Logger.callAppenders(Logger.java:260) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:442) at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:396) at ch.qos.logback.classic.Logger.info(Logger.java:600) at org.wmc.sampletest.App.main(App.java:24) Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:152) at java.net.SocketInputStream.read(SocketInputStream.java:122) at java.net.SocketInputStream.read(SocketInputStream.java:108) at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:195) ... 16 more

kmtong commented 9 years ago

I've no experience in running Redis on AWS. Have you tried different timeout settings in the log configuration?

bhwanip commented 9 years ago

Have tried with timeout of 60000(1 minute) but still the same issue..