matryer/goblueprints

Need to specify loaclhost or IP on Mac for a nsqd, or messages cannot be consumed.

Opened this issue · 1 comments

first of all I really enjoy reading @matryer book and praise Mat`s effort on making it, big thanks!

Problem

Followed the book recipe I run nslookupd, nsqd, twittervotes,

nsq_tail --topic="votes" --lookupd-http-address=localhost:4161

resulted in this:

$ nsq_tail --topic=votes --lookupd-http-address=localhost:4161
2019/11/26 19:14:29 Adding consumer for topic: votes
2019/11/26 19:14:29 INF    1 [votes/tail818577#ephemeral] querying nsqlookupd http://localhost:4161/lookup?topic=votes
2019/11/26 19:14:29 ERR    1 [votes/tail818577#ephemeral] error querying nsqlookupd (http://localhost:4161/lookup?topic=votes) - got response 404 Not Found "{\"message\":\"TOPIC_NOT_FOUND\"}"

Due to issue nsqio/nsq#400 "nsqd tcp timeout on osx when bonjour is not active (localhost dev)"
and all bonjour sharing options on new Mac are off. (I have no idea about why all bonjour sharing options on my Mac are off, and I am new to OSX.)

Solution

I specified IP address for a nsqd:

nsqd --lookupd-tcp-address=127.0.0.1:4160

This was sufficient to make chapter 5 program twittervotes working.

P.S. Also I saw that #59 have another understanding of a problem and a way to solve it that I personally don't like to do since I am worried about security of allowing filesharing for my work`s Mac.

just want to tell you thanks! you really give a big help!! thank you.