You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by Ralph Goers <ra...@dslextreme.com> on 2017/05/22 04:41:57 UTC

Re: Issues with log4j2 socket appender

Please do not send emails to individuals but please keep your mail on the Log4j mailing lists.

In case you are not aware most open source software projects are developed by people who are volunteering their time to do so. Some committers at the ASF are lucky in that their employers do pay them to work on their projects. In the case of Log4j we all work on this in our spare time - we don’t get any monetary compensation for what we do. Due to the nature of our paying jobs the amount of time we have varies quite a bit. I suspect that at the moment we are all busy. 

Log4j currently has about 450 unresolved issues. Many of these are enhancement requests but others are bugs that need to be addressed. It isn’t that we don’t want to fix them but we tend to work on what we either think are the biggest problems or what we find most interesting. 

So that said, any assistance you can offer will go a long way to moving towards a solution on this problem. For example, if you can provide a unit test that demonstrates this error it will make it easier to determine what the problem is and how to fix it. Even better, provide a patch. I do plan to look at this issue but I can provide no assurance on when that will be.

Ralph

> On May 21, 2017, at 8:51 PM, Kulkarni, Girish <Gi...@anz.com> wrote:
> 
> Hi Ralph,
>  
> I have got notification that you have closed the post which I have raised it for log4j2 socket appender issue https://issues.apache.org/jira/browse/LOG4J2-1918 <https://issues.apache.org/jira/browse/LOG4J2-1918> saying it is duplicate as already it has raised earlier (https://issues.apache.org/jira/browse/LOG4J2-1311 <https://issues.apache.org/jira/browse/LOG4J2-1311>).
>  
> Could you please let us know update on LOG4J2-1311. 
> 
> We have raised to log4j2-user group also on this issue and did not get any help.  We really appreciate your response for this as we are facing this from last 2 weeks. 
> 
> Regards,
> Girish Kulkarni
>  
> From: Gokhe, Pravin 
> Sent: 19 May 2017 09:37
> To: Kulkarni, Girish; log4j-user@logging.apache.org <ma...@logging.apache.org>; log4j-dev@logging.apache.org <ma...@logging.apache.org>
> Cc: Pyndah, Venkata Rama Krishna
> Subject: RE: Issues with log4j2 socket appender
> Importance: High
>  
> Hi Log4j team,
>  
> We really appreciate your response for below query. Please let us know if you need more details from our side.
> We are facing this issue for almost 2 weeks now and there is limited/no help available on internet
>  
> Thanks in advance.
>  
> Regards,
> Pravin
>  
> From: Kulkarni, Girish 
> Sent: 17 May 2017 20:59
> To: log4j-user@logging.apache.org <ma...@logging.apache.org>; log4j-dev@logging.apache.org <ma...@logging.apache.org>
> Cc: Gokhe, Pravin; Pyndah, Venkata Rama Krishna
> Subject: Issues with log4j2 socket appender
>  
> Hi Team,
>  
> We are facing intermittent lost of logs while sending logs to log target using log4j2 socket appender in our application. The detailed information is as below;
>  
> Our environment:
> 1) In our application, we are using log4j2 (2.7 version jar) framework and SocketAppender (async appender under socket appender) to send logs to Splunk ( Enterprise Logging tool) via radware(load balancer). 
> 2) So our application connects to Radware over TCPIP socket using SocketAppender; Radware is used to load balance load among 4 target Splunk servers.
> 3) Radware Server is configured to timeout if connection is idle for one minute (configurable at radware and set to 1 minute)
> 4) The configuration of log4j2 config file is as below 
>  
>  
> <?xml version="1.0" encoding="UTF-8"?>
> <Configuration status="trace" monitorInterval="5">
> <Appenders>
> <Socket name="socket" host="10.52.214.26" port="1514" reconnectDelayMillis="30000" immediateFail="false" bufferedIo="true" bufferSize="204800" protocol="TCP" immediateFlush="false">
> <PatternLayout></PatternLayout>
> </Socket>
> <Async name="SplunkAsync" bufferSize="204800">
> <AppenderRef ref="socket"/>
> </Async>
> </Appenders>
> <Loggers>
> <Root level="warn">
> <AppenderRef ref="SplunkAsync"/>
> </Root>
> <Logger name="SplunkInfoLogger" level="info" additivity="false">
> <AppenderRef ref="SplunkAsync"/>
> </Logger>
> <Logger name="SplunkDebugLogger" level="debug" additivity="false">
> <AppenderRef ref="SplunkAsync"/>
> </Logger>
> <Logger name="SplunkWarnLogger" level="warn" additivity="false">
> <AppenderRef ref="SplunkAsync"/>
> </Logger>
> </Loggers>
> </Configuration>
>  
>  
> The process/steps of meeting problem:
> 
> 1) Splunk servers, radware server and our application servers are up, and the application servers send logs to radware in turn splunk servers successfully.
> 2) As we didn't do any operation, there is no logs come into radware in one minute ( 1 minute as we set) and radware breaks the connection between it and application server.
> 3) We did an operation so that application server will write one log. However nothing happens, This log didn't come into radware and splunk servers at all.
> 4) We did a second operation so that application server will write the second log. This time also logs did not  come into radware and splunk either.
> 5) After counting for 30 sec (reconnectDelayMillis="30000" in log4j2 config file) from first failed log ( i.e the log triggered after radware breaks connection) we did a third operation so that application server will write the third log. This time SocketAppender works well and this log came into radware and splunk servers. This is primarily because application server is able to re-establish connection to Radware after 30 sec as reconnectDelayMillis="30000"
>  
> I would like to know why initial logs are lost which are sent after radware connection becomes idle. Ideally, tcp connection created by log4j2 should keep the data in buffer when connection is broken and should send data from buffer when reconnection is established after 30 secs (reconnectDelayMillis="30000" )
>  
> We tried setting up parameters like immediateFail="false" bufferedIo="true" bufferSize="204800", so that data can be stored in buffer when radware times out tcp connection and can be sent later when reconnection to radware is established, Unfortunately which is not happening.
>  
> Are we missing any configurations because which we are facing this type of behaviour or is it known defect.
>  
> The similar kind of issue is also observed by others and raised in apache jira(https://issues.apache.org/jira/browse/LOG4J2-1311 <https://issues.apache.org/jira/browse/LOG4J2-1311>)
>  
> Trace log of  log4j2 console file is attached for your reference.
>  
> We can provide you if any further details required from our side to analyse this issue.
>  
> Thanks in advance and hoping for positive response from you side.
>  
> Regards,
> Girish Kulkarni
> 
> This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ Bank New Zealand Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication.