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

Veera edited comment on KAFKA-6153 at 11/6/17 1:10 PM:
-------------------------------------------------------

Hi All,

We are also facing the same issue in windows but not tested in linux.  Attached 
the log files for reference.   It is observed that there is an exception pasted 
as below while committing the transaction.  Your quick help in this regard 
really helpful to migrate Kafka to 0.11.0.1.


[2017-11-06 18:32:56,192] DEBUG TransactionalId my-Txn-Id complete transition 
from Ongoing to TxnTransitMetadata(producerId=3004, producerEpoch=0, 
txnTimeoutMs=60000, txnState=PrepareCommit, 
topicPartitions=Set(TopRatedContent2-0), txnStartTimestamp=1509973373689, 
txnLastUpdateTimestamp=1509973376190) 
(kafka.coordinator.transaction.TransactionMetadata)
[2017-11-06 18:32:56,192] DEBUG TransactionalId my-Txn-Id complete transition 
from Ongoing to TxnTransitMetadata(producerId=3004, producerEpoch=0, 
txnTimeoutMs=60000, txnState=PrepareCommit, 
topicPartitions=Set(TopRatedContent2-0), txnStartTimestamp=1509973373689, 
txnLastUpdateTimestamp=1509973376190) 
(kafka.coordinator.transaction.TransactionMetadata)
[2017-11-06 18:32:56,192] DEBUG [Transaction State Manager 0]: Updating 
my-Txn-Id's transaction state to TxnTransitMetadata(producerId=3004, 
producerEpoch=0, txnTimeoutMs=60000, txnState=PrepareCommit, 
topicPartitions=Set(TopRatedContent2-0), txnStartTimestamp=1509973373689, 
txnLastUpdateTimestamp=1509973376190) with coordinator epoch 2 for my-Txn-Id 
succeeded (kafka.coordinator.transaction.TransactionStateManager)
[2017-11-06 18:32:56,192] DEBUG [Transaction State Manager 0]: Updating 
my-Txn-Id's transaction state to TxnTransitMetadata(producerId=3004, 
producerEpoch=0, txnTimeoutMs=60000, txnState=PrepareCommit, 
topicPartitions=Set(TopRatedContent2-0), txnStartTimestamp=1509973373689, 
txnLastUpdateTimestamp=1509973376190) with coordinator epoch 2 for my-Txn-Id 
succeeded (kafka.coordinator.transaction.TransactionStateManager)
[2017-11-06 18:32:56,193] DEBUG TransactionalId my-Txn-Id prepare transition 
from PrepareCommit to TxnTransitMetadata(producerId=3004, producerEpoch=0, 
txnTimeoutMs=60000, txnState=CompleteCommit, topicPartitions=Set(), 
txnStartTimestamp=1509973373689, txnLastUpdateTimestamp=1509973376192) 
(kafka.coordinator.transaction.TransactionMetadata)
[2017-11-06 18:32:56,193] DEBUG TransactionalId my-Txn-Id prepare transition 
from PrepareCommit to TxnTransitMetadata(producerId=3004, producerEpoch=0, 
txnTimeoutMs=60000, txnState=CompleteCommit, topicPartitions=Set(), 
txnStartTimestamp=1509973373689, txnLastUpdateTimestamp=1509973376192) 
(kafka.coordinator.transaction.TransactionMetadata)
[2017-11-06 18:32:56,194] DEBUG Connection with /192.168.10.73 disconnected 
(org.apache.kafka.common.network.Selector)
java.io.EOFException
        at 
org.apache.kafka.common.network.NetworkReceive.readFromReadableChannel(NetworkReceive.java:87)
        at 
org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:75)
        at 
org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:203)
        at 
org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:167)
        at 
org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:381)
        at org.apache.kafka.common.network.Selector.poll(Selector.java:326)
        at kafka.network.Processor.poll(SocketServer.scala:500)
        at kafka.network.Processor.run(SocketServer.scala:435)
        at java.lang.Thread.run(Thread.java:748)
[2017-11-06 18:32:56,194] DEBUG Connection with /127.0.0.1 disconnected 
(org.apache.kafka.common.network.Selector)
java.io.EOFException
        at 
org.apache.kafka.common.network.NetworkReceive.readFromReadableChannel(NetworkReceive.java:87)
        at 
org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:75)
        at 
org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:203)
        at 
org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:167)
        at 
org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:381)
        at org.apache.kafka.common.network.Selector.poll(Selector.java:326)
        at kafka.network.Processor.poll(SocketServer.scala:500)
        at kafka.network.Processor.run(SocketServer.scala:435)
        at java.lang.Thread.run(Thread.java:748)
[2017-11-06 18:32:56,238] DEBUG Searching offset for timestamp -2 
(kafka.log.Log)


was (Author: vmallavarapu):
Hi All,

We are also facing the same issue in windows but not tested in linux.  Attached 
the log files for reference.   It is observed that there is an exception pasted 
as below while committing the transaction.  Your quick help in this regard 
really helpful to migrate Kafka to 0.11.0.1.

> Kafka Transactional Messaging does not work on windows but on linux
> -------------------------------------------------------------------
>
>                 Key: KAFKA-6153
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6153
>             Project: Kafka
>          Issue Type: Bug
>          Components: consumer, producer 
>    Affects Versions: 0.11.0.1
>            Reporter: Changhai Han
>            Priority: Critical
>
> As mentioned in title, the kafka transaction messaging does not work on 
> windows but on linux.
> The code is like below:
> {code:java}
>  stringProducer.initTransactions();
>         while(true){
>             ConsumerRecords<String, String> records = 
> stringConsumer.poll(2000);
>             if(!records.isEmpty()){
>                 stringProducer.beginTransaction();
>                 try{
>                     for(ConsumerRecord record : records){
>                         LOGGER.info(record.value().toString());
>                         stringProducer.send(new ProducerRecord<String, 
> String>("kafka-test-out", record.value().toString()));
>                     }
>                     stringProducer.commitTransaction();
>                 }catch (ProducerFencedException e){
>                     LOGGER.warn(e.getMessage());
>                     stringProducer.close();
>                     stringConsumer.close();
>                 }catch (KafkaException e){
>                     LOGGER.warn(e.getMessage());
>                     stringProducer.abortTransaction();
>                 }
>             }
>         }
> {code}
> When I debug it, it seems to it stuck on committing the transaction. Does 
> anyone also experience the same thing? Is there any specific configs that i 
> need to add in the producer config? Thanks.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to