[ 
https://issues.apache.org/jira/browse/KAFKA-8882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17102683#comment-17102683
 ] 

Marcos Maia edited comment on KAFKA-8882 at 5/11/20, 8:16 AM:
--------------------------------------------------------------

Hi, I have the same issue, I have configured producer retries for the stream 
but still get stuck in PENDING_SHUTDOWN? Wich specific retries do you suggest / 
mean?I tried many but no success,  I couldn't find a good fix for this issue, 
for now it requires a full application restart(it's a spring boot application 
in my case) . Any suggestions on how to best approach this?

This is a very annoying issue which requires human intervention and we might 
have to stop using streams in some cases while this is not fixed. 

 

Thanks. 


was (Author: marcosmaia):
Hi, I have the same issue, I have configured producer retries for the stream 
but still get stuck in PENDING_SHUTDOWN? Wich specific retries do you suggest / 
mean? I couldn't find a good fix for this issue, for now it requires a full 
application restart(it's a spring boot application in my case) . Any 
suggestions on how to best approach this?

This is a very annoying issue which requires human intervention and we might 
have to stop using streams in some cases while this is not fixed. 

 

Thanks. 

> It's not possible to restart Kafka Streams using StateListener
> --------------------------------------------------------------
>
>                 Key: KAFKA-8882
>                 URL: https://issues.apache.org/jira/browse/KAFKA-8882
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 2.2.1
>         Environment: Linux, Windows
>            Reporter: Jakub
>            Priority: Major
>
> Upon problems with connecting to a Kafka Cluster services using Kafka Streams 
> stop working with the following error message:
> {code:java}
> Encountered the following unexpected Kafka exception during processing, this 
> usually indicate Streams internal errors (...)
> Caused by: org.apache.kafka.common.errors.TimeoutException: Aborted due to 
> timeout
> (...)
> State transition from PENDING_SHUTDOWN to DEAD
> (...)
> All stream threads have died. The instance will be in error state and should 
> be closed.
> {code}
>  
> We tried to use a StateListener to automatically detect and work around this 
> problem. 
>  However, this approach doesn't seem to work correctly:
>  # KafkaStreams correctly transitions from status Error to Pending Shutdown, 
> but then it stays in this status forever.
>  # Occasionally, after registering a listener the status doesn't even change 
> to Error.
>  
> {code:java}
> kafkaStreams.setStateListener(new StateListener() {
>       public void onChange(State stateNew, State stateOld) {
>               if (stateNew == State.ERROR) {
>                       kafkaStreams.cleanUp();
>                       kafkaStreams.close();
>                       
>               } else if (stateNew == State.PENDING_SHUTDOWN) {                
>         
>                       // this message is displayed, and then nothig else 
> happens
>                       LOGGER.info("State is PENDING_SHUTDOWN");
>                       
>               } else if (stateNew == State.NOT_RUNNING) {
>                       // it never gets here
>                       kafkaStreams = createKafkaStreams();
>                       kafkaStreams.start();
>               }
>       }
> });
> {code}
>  
> Surprisingly, restarting KafkaStreams outside of a listener works fine.
>  I'm happy to provide more details if required.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to