我目前有一个docker-compose.yml
文件,它带来了许多服务。其中一个服务是 pulsar,另一个是通过 websocket 连接的网络服务器。当我启动这些服务时,websocket 容器不起作用。它的日志说:Error Checking/Getting Partition Metadata while Subscribing on persistent://public/default/test
。我没有使用分区,所以我很难弄清楚这一点。
到目前为止,我已经做了很多谷歌搜索,发现这个问题没有答案,但看起来与我的问题相似。
这是我的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
我真的很想弄清楚这一点。我提前感谢任何帮助!