我正在尝试连接这 2 个 docker 容器:
nsqd:https ://registry.hub.docker.com/u/mreiferson/nsqlookupd/ nsqlookupd:https ://registry.hub.docker.com/u/mreiferson/nsqlookupd/
这些是 nsqd 和 nsqlookupd 的官方 docker 容器。
问题是当我在 nsqd 中创建主题时,我在 nsqlookupd 中看不到该主题。
IE
curl -d 'hello world 1' 'http://172.17.42.1:4151/put?topic=test' // to create the test topic
curl http://172.17.42.1:4151/stats // shows that I have messages with topic = test
curl http://172.17.42.1:4161/topics // ??? shows that I have no topic.
我像这样启动我的 2 个容器(172.17.42.1 是我的 docker 主机 IP):
docker run --name lookupd -p 4160:4160 -p 4161:4161 mreiferson/nsqlookupd
docker run --name nsqd -p 4150:4150 -p 4151:4151 -e BROADCAST_ADDRESS=172.17.42.1:4160 mreiferson/nsqd
我显然错误地连接了 2 个容器。我将如何正确连接它们?