[Error: Failed to create producer: TimeOut]
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- docker, docker-compose, javascript, node.js
- Domain
- api, backend, networking
Research direction
Reproduce the issue with the provided docker-compose services and Node.js client using pulsar://host.docker.internal:6650; start by checking the broker connection log alongside the createProducer call. Done means identifying why the broker closes the connection and recording a verified correction or configuration change.
Written by the indexing model from the issue text.
Description
I'm not able to create producer or consumer. I only get the error [Error: Failed to create producer: TimeOut]. I see opening and closing connection in broker log. I'm able to connect pulsar broker with Pulsar-Manager (the same netrwork, docker-compose).
used docker-compose:
services:
pulsar:
image: apachepulsar/pulsar:3.3.1
command: sh -c "bin/apply-config-from-env.py conf/standalone.conf && bin/pulsar standalone"
hostname: pulsar-local
ports:
- "8080:8080"
- "6650:6650"
restart: unless-stopped
volumes:
- "./conf:/pulsar/conf"
dashboard:
image: apachepulsar/pulsar-manager:v0.4.0
ports:
- "9527:9527"
- "7750:7750"
depends_on:
- pulsar
links:
- pulsar
environment:
SPRING_CONFIGURATION_FILE: /pulsar-manager/pulsar-manager/application.properties
used nodejs client app:
const Pulsar = require("pulsar-client");
async function produceTest(timeout) {
const client = new Pulsar.Client({
serviceUrl: "pulsar://host.docker.internal:6650"
});
console.log('Create producer....');
try {
const producer = await client.createProducer({
topic: "persistent://public/default/test1",
sendTimeoutMs: 30000
});
console.log('before');
await new Promise((resolve, reject) => {
setTimeout(() => {
producer.send({
data: Buffer.from("My Message")
});
resolve();
}, timeout);
});
} catch(e) {
console.error(e);
}
console.log('after');
await client.close();
}
produceTest(1000);
Pulsar broker log:
2024-09-17 12:47:18 2024-09-17T10:47:18,331+0000 [pulsar-io-18-15] INFO org.apache.pulsar.broker.service.ServerCnx - [/172.22.0.1:37994] connected with clientVersion=Pulsar-CPP-v3.5.1, clientProtocolVersion=20, proxyVersion=null
2024-09-17 12:47:18 2024-09-17T10:47:18,333+0000 [pulsar-io-18-15] INFO org.apache.pulsar.broker.service.ServerCnx - Closed connection from /172.22.0.1:37994
- Dominant language
- C++
- Stars
- 164
- Forks
- 99
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/pulsar-client-node
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
apache/pulsar-client-node#477 ·
-
公司网络无法访问海外站点,如何解决? Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
apache/pulsar-client-node#455 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
apache/pulsar-client-node#432 · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
apache/pulsar-client-node#431 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
apache/pulsar-client-node#429 · 1 comment ·
All issues in apache/pulsar-client-node
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
Component: GLib
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Mute ydb/tests/functional/dstool/test_canonical_requests.py.Test.test_group_take_snapshot in main Openai_reviewed
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
ydb-platform/ydb#53974 · 3 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
google/libultrahdr#485 ·