You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Loganathan (Jira)" <ji...@apache.org> on 2022/01/31 11:38:00 UTC

[jira] [Created] (LOG4J2-3380) Log4j syslog appender misses writing the 1st event after syslog service is restarted

Loganathan created LOG4J2-3380:
----------------------------------

             Summary: Log4j syslog appender misses writing the 1st event after syslog service is restarted
                 Key: LOG4J2-3380
                 URL: https://issues.apache.org/jira/browse/LOG4J2-3380
             Project: Log4j 2
          Issue Type: Bug
          Components: Appenders
         Environment: CentOS 7.9 + RSyslog Service, Application deployed in Tomcat and running on Java 11, Log4j2 version is 2.17.1
            Reporter: Loganathan


Hi Team,

We configured our application to push certain log messages to the local system Syslog. We used the Syslog appender with RFC format. There is no problem in writing the log to the Syslog file. But when the Syslog service is restarted, the next message from the application is not written to the Syslog. But subsequent messages are getting pushed properly.

I enabled the debug level log for Log4j but there is no trace of any exception/errors when this first message is missed. I checked in the threaddump but there is no Reconnector running.

One more thing, after restarting of Syslog service, when the 2nd message is pushed the following log message is captured,

 

{{2022-01-27 18:07:40,120 ajp-nio-0.0.0.0-8009-exec-3 DEBUG Reconnecting localhost/127.0.0.1:514}}

{{2022-01-27 18:07:40,121 ajp-nio-0.0.0.0-8009-exec-3 DEBUG Creating socket localhost/127.0.0.1:514}}

{{2022-01-27 18:07:40,122 ajp-nio-0.0.0.0-8009-exec-3 DEBUG Closing SocketOutputStream java.net.SocketOutputStream@1a769d7}}

{{2022-01-27 18:07:40,122 ajp-nio-0.0.0.0-8009-exec-3 DEBUG Connection to localhost:514 reestablished: Socket[addr=localhost/127.0.0.1,port=514,localport=57852]}}

 

I am not sure what files to be attached, please let me know if any additional details or files are required.  

Thanks, Loganathan T



--
This message was sent by Atlassian Jira
(v8.20.1#820001)