Closed yufan022 closed 3 years ago
@yufan022 Could you please confirm the available bookies greater than the ensemble size that you are using?
@codelipenghui I checked again, I have to restart broker before debezium restart, It will succeed. Broker config:
managedLedgerDefaultAckQuorum=2
managedLedgerDefaultEnsembleSize=2
managedLedgerDefaultWriteQuorum=2
My deployment topology:
pod/pf-public-3428-exchange-core-0 1/1 Running 0 29s
pod/pulsar-mini-bookie-0 1/1 Running 0 139m
pod/pulsar-mini-bookie-1 1/1 Running 0 140m
pod/pulsar-mini-bookie-2 1/1 Running 0 140m
pod/pulsar-mini-bookie-init-fc96s 0/1 Completed 0 4d
pod/pulsar-mini-broker-0 1/1 Running 0 2m32s
pod/pulsar-mini-grafana-77c7888bd6-7njwj 1/1 Running 0 4d
pod/pulsar-mini-prometheus-5d78c66d5f-x8x6r 1/1 Running 0 3d23h
pod/pulsar-mini-proxy-0 1/1 Running 0 3d21h
pod/pulsar-mini-pulsar-init-4g2px 0/1 Completed 0 3d23h
pod/pulsar-mini-pulsar-manager-6d7d86d78b-n9dtj 1/1 Running 0 4d
pod/pulsar-mini-recovery-0 1/1 Running 0 3d21h
pod/pulsar-mini-toolset-0 1/1 Running 0 3d16h
pod/pulsar-mini-zookeeper-0 1/1 Running 0 19h
pod/pulsar-mini-zookeeper-1 1/1 Running 0 19h
pod/pulsar-mini-zookeeper-2 1/1 Running 0 19h
@codelipenghui more log broker.log pulsarfunctiondebezium.log
I think it is not caused by broker error Bookie handle is not available
, I tested 2.6.0 2.7.0 and multi-node or single-node it can be reproduced.
Open debug log of Broker
and Debezium
.
// Debezium
02:22:49.000 [pulsar-client-io-7-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0xca74dac6, L:/10.42.3.36:50100 - R:pulsar-mini-broker-0.pulsar-mini-broker.pulsar.svc.cluster.local/10.42.3.36:6650] Received a message from the server: org.apache.pulsar.common.api.proto.PulsarApi$CommandMessage@a075ae2
02:22:49.000 [pulsar-client-io-7-1] DEBUG org.apache.pulsar.client.impl.ConsumerImpl - [public/3426/offset-topic][reader-86b2926c2c] Received message: 6/1999
02:22:49.000 [pulsar-client-io-7-1] DEBUG org.apache.pulsar.client.impl.ConsumerImpl - [reader-86b2926c2c] [0d080] processing message num - 0 in batch
02:22:49.000 [pulsar-client-io-7-1] DEBUG org.apache.pulsar.client.impl.ConsumerImpl - [reader-86b2926c2c] [0d080] enqueued messages in batch. queue size - 878, available queue size - 2147483647
...
02:23:17.730 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [localhost/127.0.0.1:6650] Received cmd PING
02:23:17.730 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarHandler - [[id: 0x474729d9, L:/127.0.0.1:38340 - R:localhost/127.0.0.1:6650]] Replying back to ping message
02:23:17.741 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarHandler - [[id: 0x474729d9, L:/127.0.0.1:38340 - R:localhost/127.0.0.1:6650]] Sending ping message
02:23:17.744 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [localhost/127.0.0.1:6650] Received cmd PONG
02:23:17.938 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarHandler - [[id: 0xd7d4d92a, L:/10.42.3.36:50094 - R:pulsar-mini-broker-0.pulsar-mini-broker.pulsar.svc.cluster.local/10.42.3.36:6650]] Sending ping message
02:23:17.939 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [pulsar-mini-broker-0.pulsar-mini-broker.pulsar.svc.cluster.local/10.42.3.36:6650] Received cmd PONG
02:23:17.943 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [pulsar-mini-broker-0.pulsar-mini-broker.pulsar.svc.cluster.local/10.42.3.36:6650] Received cmd PING
...
02:23:48.318 [pulsar-client-io-7-1] DEBUG org.apache.pulsar.common.protocol.PulsarHandler - [[id: 0xca74dac6, L:/10.42.3.36:50100 - R:pulsar-mini-broker-0.pulsar-mini-broker.pulsar.svc.cluster.local/10.42.3.36:6650]] Replying back to ping message
02:23:48.442 [pulsar-timer-10-1] INFO org.apache.pulsar.client.impl.ConsumerStatsRecorderImpl - [public/3426/offset-topic] [reader-86b2926c2c] [0d080] Prefetched messages: 878 --- Consume throughput received: 18.70 msgs/s --- 0.03 Mbit/s --- Ack sent rate: 0.00 ack/s --- Failed messages: 0 --- batch messages: 0 ---Failed acks: 0
// Broker
02:22:48.984 [pulsar-io-24-2] DEBUG org.apache.pulsar.broker.service.PulsarCommandSenderImpl - [persistent://public/3426/offset-topic-PersistentSubscription{topic=persistent://public/3426/offset-topic, name=reader-86b2926c2c}] Sending message to consumerId 0, msg id 6-1996
02:22:48.984 [pulsar-io-24-2] DEBUG org.apache.pulsar.broker.service.PulsarCommandSenderImpl - [persistent://public/3426/offset-topic-PersistentSubscription{topic=persistent://public/3426/offset-topic, name=reader-86b2926c2c}] Sending message to consumerId 0, msg id 6-1997
02:22:48.984 [pulsar-io-24-2] DEBUG org.apache.pulsar.broker.service.PulsarCommandSenderImpl - [persistent://public/3426/offset-topic-PersistentSubscription{topic=persistent://public/3426/offset-topic, name=reader-86b2926c2c}] Sending message to consumerId 0, msg id 6-1998
02:22:48.984 [pulsar-io-24-2] DEBUG org.apache.pulsar.broker.service.PulsarCommandSenderImpl - [persistent://public/3426/offset-topic-PersistentSubscription{topic=persistent://public/3426/offset-topic, name=reader-86b2926c2c}] Sending message to consumerId 0, msg id 6-1999
02:22:48.984 [broker-topic-workers-OrderedScheduler-4-0] DEBUG org.apache.pulsar.broker.service.persistent.PersistentDispatcherSingleActiveConsumer - [persistent://public/3426/offset-topic / reader-86b2926c2c-Consumer{subscription=PersistentSubscription{topic=persistent://public/3426/offset-topic, name=reader-86b2926c2c}, consumerId=0, consumerName=0d080, address=/10.42.3.36:50100}] Consumer buffer is full, pause reading
02:22:50.014 [AsyncHttpClient-timer-57-1] DEBUG org.asynchttpclient.netty.channel.DefaultChannelPool - Entry count for : http://pulsar-mini-broker-0.pulsar-mini-broker.pulsar.svc.cluster.local:8080 : 1
02:22:50.689 [pulsar-ordered-OrderedExecutor-1-0-SendThread(pulsar-mini-zookeeper:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x104fca0f218003c, packet:: clientPath:/ serverPath:/ finished:false header:: 319,3 replyHeader:: 319,4212,0 request:: '/,F response:: s{0,0,0,0,0,9,0,0,0,11,120}
When Debezium blocked, I found ...Consumer buffer is full, pause reading
logs on Broker and Consume throughput received...
on Debezium connector.
Then I have to restart broker
to keep Debezium
working.
https://github.com/apache/pulsar/blob/ed5d94ccfdf4eba77678454945a2c3719dce2268/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherSingleActiveConsumer.java#L359 https://github.com/apache/pulsar/blob/ed5d94ccfdf4eba77678454945a2c3719dce2268/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherSingleActiveConsumer.java#L457 @sijie @codelipenghui Could anyone help me work out this issue?
@yufan022 The consumer buffer full means the consumer does not have more space(recieverQueueSize) for the new messages, could you please check the topic stats and internal-stats of the topic that debezium connector used? bin/pulsar-admin topics stats
and bin/pulsar-admin topics stats-internal
@yufan022 I will close this issue first. Feel free to reopen it if needed.
Describe the bug Starting debezium for the first time and everything is OK. When restart debezium after running for a while, it often fails to start. There's a very small chance that it will success. If I clean up
offset-topic
or restart broker, It will start successfully.To Reproduce Steps to reproduce the behavior:
or
offset-topic
or restart brokerScreenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
debezium pod log
broker pod log