apache / apache/pulsar

[Bug] Error while producing messages

Open
#19,269 7 comments 0 reactions 0 assignees View on GitHub
Stale type/bug
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.

### Version

2.10.3, 3 nodes cluster

### Minimal reproduce step

bin/pulsar-client produce my-topic --messages "hello-pulsar"

### What did you expect to see?

send message success

### What did you see instead?

image
2023-01-18T05:46:22,260+0000 [pulsar-timer-6-1] INFO org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [pulsar-cluster-zk-0-321] Message send timed out. Failing 1 messages
2023-01-18T05:46:22,264+0000 [main] ERROR org.apache.pulsar.client.cli.PulsarClientTool - Error while producing messages
2023-01-18T05:46:22,264+0000 [main] ERROR org.apache.pulsar.client.cli.PulsarClientTool - The producer pulsar-cluster-zk-0-321 can not send message to the topic my-topic within given timeout : createdAt 30.003 seconds ago, firstSentAt 30.001 seconds ago, lastSentAt 30.001 seconds ago, retryCount 1
org.apache.pulsar.client.api.PulsarClientException$TimeoutException: The producer pulsar-cluster-zk-0-321 can not send message to the topic my-topic within given timeout : createdAt 30.003 seconds ago, firstSentAt 30.001 seconds ago, lastSentAt 30.001 seconds ago, retryCount 1
at org.apache.pulsar.client.api.PulsarClientException.unwrap(PulsarClientException.java:1008) ~[org.apache.pulsar-pulsar-client-api-2.10.3.jar:2.10.3]
at org.apache.pulsar.client.impl.TypedMessageBuilderImpl.send(TypedMessageBuilderImpl.java:90) ~[org.apache.pulsar-pulsar-client-original-2.10.3.jar:2.10.3]
at org.apache.pulsar.client.cli.CmdProduce.publish(CmdProduce.java:309) ~[org.apache.pulsar-pulsar-client-tools-2.10.3.jar:2.10.3]
at org.apache.pulsar.client.cli.CmdProduce.run(CmdProduce.java:241) ~[org.apache.pulsar-pulsar-client-tools-2.10.3.jar:2.10.3]
at org.apache.pulsar.client.cli.PulsarClientTool.run(PulsarClientTool.java:184) ~[org.apache.pulsar-pulsar-client-tools-2.10.3.jar:2.10.3]
at org.apache.pulsar.client.cli.PulsarClientTool.main(PulsarClientTool.java:220) ~[org.apache.pulsar-pulsar-client-tools-2.10.3.jar:2.10.3]
2023-01-18T05:46:22,268+0000 [main] INFO org.apache.pulsar.client.cli.PulsarClientTool - 0 messages successfully produced

### Anything else?

how can i solve this error?

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the `bin/pulsar-client produce my-topic --messages "hello-pulsar"` command against the reported 3-node cluster. Read `CmdProduce.publish` and the `ProducerImpl` timeout logs shown in the stack trace, then trace why the send does not complete. Done means the command succeeds or the failure is reported with a verified, actionable cause and regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
cli, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.