From 28dbeaf5c7614c2e53ceaad1cdd165b4ec0c277b Mon Sep 17 00:00:00 2001 From: Pierce Lopez Date: Thu, 29 Dec 2016 13:07:25 -0500 Subject: [PATCH] nsqd: log errors if no nsqlookupd broadcast address --- nsqd/lookup.go | 3 +++ nsqd/nsqd.go | 2 ++ 2 files changed, 5 insertions(+) diff --git a/nsqd/lookup.go b/nsqd/lookup.go index d0242e8aa..58d2974fc 100644 --- a/nsqd/lookup.go +++ b/nsqd/lookup.go @@ -37,6 +37,9 @@ func connectCallback(n *NSQD, hostname string, syncTopicChan chan *lookupPeer) f n.logf("LOOKUPD(%s): ERROR parsing response - %s", lp, resp) } else { n.logf("LOOKUPD(%s): peer info %+v", lp, lp.Info) + if lp.Info.BroadcastAddress == "" { + n.logf("LOOKUPD(%s): ERROR - no broadcast address", lp) + } } } diff --git a/nsqd/nsqd.go b/nsqd/nsqd.go index 95b85bb79..4c5ba90fe 100644 --- a/nsqd/nsqd.go +++ b/nsqd/nsqd.go @@ -456,6 +456,8 @@ func (n *NSQD) GetTopic(topicName string) *Topic { } t.getOrCreateChannel(channelName) } + } else if len(n.getOpts().NSQLookupdTCPAddresses) > 0 { + n.logf("ERROR: no available nsqlookupd to query for channels to pre-create for topic %s", t.name) } t.Unlock()