Pulsar:订阅持久化时出现错误 Checking/Getting 分区元数据://public/default/test
Pulsar: Error Checking/Getting Partition Metadata while Subscribing on persistent://public/default/test
我目前有一个 docker-compose.yml
文件,它提供了许多服务。其中一个服务是 pulsar,另一个是通过 websocket 连接的网络服务器。当我启动这些服务时,websocket 容器不起作用。它的日志说:Error Checking/Getting Partition Metadata while Subscribing on persistent://public/default/test
。我没有使用分区,所以我很难解决这个问题。
到目前为止,我已经进行了大量的谷歌搜索,发现这个 question 没有答案,但看起来与我的问题相似。
这是我的 docker-compose.yml
文件:
version: '3.2'
services:
pulsar:
image: apachepulsar/pulsar:latest
command: bin/pulsar standalone
ports:
- "6650"
- "8080"
ios_pos_ws_input:
depends_on:
- pulsar
environment:
- PULSAR_HOST=pulsar
image: dock.gastrofix.com/bridge/ios_pos_ws_input:${VERSION:-latest}
restart: always
ports:
- "8765"
command: python3 -m wait_for_pulsar "python3 -m inputs.ios_pos.web_sockets.ws_server"
ios_pos_ws_sink:
depends_on:
- pulsar
environment:
- PULSAR_HOST=pulsar
image: dock.gastrofix.com/bridge/ios_pos_ws_sink:${VERSION:-latest}
restart: always
ports:
- "8765"
command: python3 -m wait_for_pulsar "python3 -m sinks.ios_pos_ws"
volumes:
pulsar:
当我检查 ios_pos_ws_input
和 ios_pos_ws_sink
的日志时,我看到了这个:
2019-05-15 14:12:52.809 INFO ClientConnection:300 | [172.28.0.5:53624 -> 172.28.0.2:6650] Connected to broker
2019-05-15 14:12:52.920 ERROR ClientConnection:726 | [172.28.0.5:53624 -> 172.28.0.2:6650] Failed partition-metadata lookup req_id: 1 error: 1
2019-05-15 14:12:52.920 ERROR ClientImpl:394 | Error Checking/Getting Partition Metadata while Subscribing on persistent://public/default/test -- 5
2019-05-15 14:12:52.921 INFO ClientImpl:492 | Closing Pulsar client
2019-05-15 14:12:54.922 INFO Client:88 | Subscribing on Topic :test
2019-05-15 14:12:54.923 INFO ConnectionPool:72 | Created connection for pulsar://pulsar:6650
我真的很想弄清楚这个问题。感谢您提前提供的帮助!
当客户端尝试使用时,public/default
名称空间似乎尚未创建。
我已经尝试使用这个简单的组合文件来设置更大的延迟,以确保独立服务在客户端启动时完全准备就绪:
version: '3.2'
services:
pulsar:
image: apachepulsar/pulsar:latest
command: bin/pulsar standalone
ports:
- "6650"
- "8080"
client:
depends_on:
- pulsar
image: apachepulsar/pulsar:latest
command: python -c "import pulsar, time; time.sleep(30); c = pulsar.Client('pulsar://pulsar:6650'); p = c.create_producer('my-topic')"
我目前有一个 docker-compose.yml
文件,它提供了许多服务。其中一个服务是 pulsar,另一个是通过 websocket 连接的网络服务器。当我启动这些服务时,websocket 容器不起作用。它的日志说:Error Checking/Getting Partition Metadata while Subscribing on persistent://public/default/test
。我没有使用分区,所以我很难解决这个问题。
到目前为止,我已经进行了大量的谷歌搜索,发现这个 question 没有答案,但看起来与我的问题相似。
这是我的 docker-compose.yml
文件:
version: '3.2'
services:
pulsar:
image: apachepulsar/pulsar:latest
command: bin/pulsar standalone
ports:
- "6650"
- "8080"
ios_pos_ws_input:
depends_on:
- pulsar
environment:
- PULSAR_HOST=pulsar
image: dock.gastrofix.com/bridge/ios_pos_ws_input:${VERSION:-latest}
restart: always
ports:
- "8765"
command: python3 -m wait_for_pulsar "python3 -m inputs.ios_pos.web_sockets.ws_server"
ios_pos_ws_sink:
depends_on:
- pulsar
environment:
- PULSAR_HOST=pulsar
image: dock.gastrofix.com/bridge/ios_pos_ws_sink:${VERSION:-latest}
restart: always
ports:
- "8765"
command: python3 -m wait_for_pulsar "python3 -m sinks.ios_pos_ws"
volumes:
pulsar:
当我检查 ios_pos_ws_input
和 ios_pos_ws_sink
的日志时,我看到了这个:
2019-05-15 14:12:52.809 INFO ClientConnection:300 | [172.28.0.5:53624 -> 172.28.0.2:6650] Connected to broker
2019-05-15 14:12:52.920 ERROR ClientConnection:726 | [172.28.0.5:53624 -> 172.28.0.2:6650] Failed partition-metadata lookup req_id: 1 error: 1
2019-05-15 14:12:52.920 ERROR ClientImpl:394 | Error Checking/Getting Partition Metadata while Subscribing on persistent://public/default/test -- 5
2019-05-15 14:12:52.921 INFO ClientImpl:492 | Closing Pulsar client
2019-05-15 14:12:54.922 INFO Client:88 | Subscribing on Topic :test
2019-05-15 14:12:54.923 INFO ConnectionPool:72 | Created connection for pulsar://pulsar:6650
我真的很想弄清楚这个问题。感谢您提前提供的帮助!
当客户端尝试使用时,public/default
名称空间似乎尚未创建。
我已经尝试使用这个简单的组合文件来设置更大的延迟,以确保独立服务在客户端启动时完全准备就绪:
version: '3.2'
services:
pulsar:
image: apachepulsar/pulsar:latest
command: bin/pulsar standalone
ports:
- "6650"
- "8080"
client:
depends_on:
- pulsar
image: apachepulsar/pulsar:latest
command: python -c "import pulsar, time; time.sleep(30); c = pulsar.Client('pulsar://pulsar:6650'); p = c.create_producer('my-topic')"