[Error: Failed to create producer: TimeOut]
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- docker, docker-compose, javascript, node.js
- 领域
- api, backend, networking
调研方向
使用提供的 docker-compose 服务和 Node.js 客户端,通过 pulsar://host.docker.internal:6650 重现该问题;首先结合 createProducer 调用检查 broker 连接日志。完成的标准是确定 broker 关闭连接的原因,并记录经过验证的修复或配置更改。
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- C++
- 星标
- 164
- 派生
- 99
- 平均合并
- 5 天 18 小时
- 30 天内合并 PR
- 2
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/pulsar-client-node 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 35/100
apache/pulsar-client-node#477 ·
-
难度 4/5 3-5 天 新手友好度 35/100
apache/pulsar-client-node#455 · 3 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
apache/pulsar-client-node#432 · 2 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 38/100
apache/pulsar-client-node#431 · 3 条评论 ·
-
难度 3/5 1-2 天 新手友好度 35/100
apache/pulsar-client-node#429 · 1 条评论 ·
查看 apache/pulsar-client-node 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
Component: GLib
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 65/100
brave/brave-browser#59300 ·
-
Mute ydb/tests/functional/dstool/test_canonical_requests.py.Test.test_group_take_snapshot in main 未关闭ai_reviewed
难度 2/5 1-3 小时 新手友好度 70/100
ydb-platform/ydb#53974 · 3 条评论 ·