dylt-dev / diggo

diggo CLI
0 stars 0 forks source link

`diggo srv` sometimes fails to unmarshal SRV records #1

Open chrislalos opened 2 months ago

chrislalos commented 2 months ago
diggo srv hello.dylt.dev
Getting SRVs
Fail
lookup hello.dylt.dev on [fe80::a4c3:37ff:fea4:7564%en0]:53: cannot unmarshal DNS message

I first saw this error when trying diggo srv on a new Wifi (actually over an iPhone hot spot). It had always succeeded in the past. It appears that the problem is with the DNS server(s) I happen to be using via this Hotspot.

Adding 8.8.8.8 to the beginning of /etc/resolv.conf made the issue go away. Then removing 8.8.8. from /etc/resolv.conf brought the error back. It appears to be reliable.

diff'ing the output of dig _etcd-client._tcp.hello.dylt.dev and dig 8.8.8.8 _etcd-client._tcp.hello.dylt.dev srv confirms there is a difference in the output of the commands. Presumably this difference is meaningful for Go's net/LookupSRV function.

chrislalos commented 2 months ago

dig.srv.8.8.8.8.txt dig.srv.txt

Output from dig, with and without 8.8.8.8