1

I am trying to connect these 2 docker containers:

nsqd: https://registry.hub.docker.com/u/mreiferson/nsqlookupd/ nsqlookupd: https://registry.hub.docker.com/u/mreiferson/nsqlookupd/

These are the official docker containers for nsqd and nsqlookupd.

The problem is that when I create a topic in nsqd, I do not see that topic in nsqlookupd.

i.e.

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.

I start my 2 containers like so (172.17.42.1 is my docker host 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

I'm obviously connecting the 2 containers incorrectly. How would I go about connecting them properly?

rexposadas
  • 3,109
  • 3
  • 27
  • 49

2 Answers2

2

I ended up creating my own nsqd docker container to solve my issue: https://github.com/rexposadas/nsqd

Scott Stensland
  • 26,870
  • 12
  • 93
  • 104
rexposadas
  • 3,109
  • 3
  • 27
  • 49
0

Link the nsqd container to the nslookupd container and tell it where to find nslookupd. For you this should look something like this:

docker run -d --name nsqd -p 4150:4150 -p 4151:4151 --link nslookupd:nslookupd mreiferson/nsqd --lookupd-tcp-address=nslookupd:4160 --broadcast-address=172.17.42.1

Also, any reason why you used the mreiferson and not the nsqio/* images?

Oliver
  • 11,857
  • 2
  • 36
  • 42