You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Bhavesh Patel (Jira)" <ji...@apache.org> on 2021/12/16 22:23:00 UTC

[jira] [Updated] (LOG4J2-3248) Error while appending a message after Stopping/Restarting KafkaAppender

     [ https://issues.apache.org/jira/browse/LOG4J2-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bhavesh Patel updated LOG4J2-3248:
----------------------------------
    Description: 
As a part of this commit, [https://github.com/apache/logging-log4j2/commit/97db5743a3b10e9017bf70794d6275b21553dd44], the thread leak issue was fixed. But it seems to have introduced a bug.
 
What if the KafkaAppender is stopped? In the calls hierarchy, the KafkaManager.stop() is called. This in turn calls KakfaManager.releaseSub() which calls KafakManager.closeProducer(). The closeProducer() closes the producer. Now when you try to restart the KafkaAppender and append a message using KafkaAppender.append() the following message is seen
 
"Cannot perform operation after producer has been closed".
 
This used to work before the above mentioned fix.

  was:
As a part of this commit, [https://github.com/apache/logging-log4j2/commit/97db5743a3b10e9017bf70794d6275b21553dd44], the thread leak issue was fixed. But it seems to have introduced a bug?
 
What if the KafkaAppender is stopped? In the calls hierarchy, the KafkaManager.stop() is called. This in turn calls KakfaManager.releaseSub() which calls KafakManager.closeProducer(). The closeProducer() closes the producer. Now when you try to restart the KafkaAppender and append a message using KafkaAppender.append() the following message is seen
 
"Cannot perform operation after producer has been closed".
 
This used to work before the above mentioned fix.


> Error while appending a message after Stopping/Restarting KafkaAppender
> -----------------------------------------------------------------------
>
>                 Key: LOG4J2-3248
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3248
>             Project: Log4j 2
>          Issue Type: Bug
>            Reporter: Bhavesh Patel
>            Priority: Major
>
> As a part of this commit, [https://github.com/apache/logging-log4j2/commit/97db5743a3b10e9017bf70794d6275b21553dd44], the thread leak issue was fixed. But it seems to have introduced a bug.
>  
> What if the KafkaAppender is stopped? In the calls hierarchy, the KafkaManager.stop() is called. This in turn calls KakfaManager.releaseSub() which calls KafakManager.closeProducer(). The closeProducer() closes the producer. Now when you try to restart the KafkaAppender and append a message using KafkaAppender.append() the following message is seen
>  
> "Cannot perform operation after producer has been closed".
>  
> This used to work before the above mentioned fix.



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