title: why server can't find pihole.service.consul: NXDOMAIN and how can I fix this?
body: <p>I have following configuration for consul.</p>
  <pre><code>{
    &quot;service&quot;: {
      &quot;name&quot;: &quot;pihole&quot;,
      &quot;Address&quot;: &quot;192.168.0.15&quot;,
      &quot;tags&quot;: [
        &quot;pi&quot;
      ],
      &quot;port&quot;: 8165,
      &quot;check&quot;: {
        &quot;args&quot;: [
          &quot;curl&quot;,
          &quot;192.168.0.15&quot;
        ],
        &quot;interval&quot;: &quot;10s&quot;
      }
    }
  }
  </code></pre>
  <p>using dig i get no error now,</p>
  <pre><code>$ dig @127.0.0.1 -p 8600 pihole.service.consul
  
  ; &lt;&lt;&gt;&gt; DiG 9.9.7-P3 &lt;&lt;&gt;&gt; @127.0.0.1 -p 8600 pihole.service.consul
  ; (1 server found)
  ;; global options: +cmd
  ;; Got answer:
  ;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 63573
  ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
  ;; WARNING: recursion requested but not available
  
  ;; OPT PSEUDOSECTION:
  ; EDNS: version: 0, flags:; udp: 4096
  ;; QUESTION SECTION:
  ;pihole.service.consul.     IN  A
  
  ;; ANSWER SECTION:
  pihole.service.consul.  0   IN  A   192.168.0.15
  
  ;; Query time: 0 msec
  ;; SERVER: 127.0.0.1#8600(127.0.0.1)
  ;; WHEN: Sun Aug 30 23:02:34 BST 2020
  ;; MSG SIZE  rcvd: 66
  </code></pre>
  <p>but when I do nslookup, i get the error <code>server can't find pihole.service.consul: NXDOMAIN</code></p>
  <pre><code>$ nslookup pihole.service.consul
  Server:     192.168.0.15
  Address:    192.168.0.15#53
  
  ** server can't find pihole.service.consul: NXDOMAIN
  </code></pre>
  <p>I actually have a pihole running at this ip address 192.168.0.15
  on the consul health check is passing.</p>
  <pre><code>2020-08-30T23:10:58.707+0100 [DEBUG] agent: Check status updated: check=service:pihole status=passing
  </code></pre>