<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>What version of c-ares is installed?</p>
<p>What DNS servers are configured on your MacOS system when its not
operating properly? The output of "scutil --dns" would be helpful
here.<br>
</p>
<div class="moz-cite-prefix">On 1/17/24 12:09 PM, Nicholas Chammas
via c-ares wrote:<br>
</div>
<blockquote type="cite"
cite="mid:73621E7C-0E39-450B-B1B7-8CCE8BB2B115@gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto"
style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hello,
<div><br>
</div>
<div>I am trying to troubleshoot a problem as an end-user of
c-ares. I use a library (<a
href="https://spark.apache.org/docs/latest/spark-connect-overview.html"
moz-do-not-send="true">Apache Spark Connect</a>) that uses
gRPC, which in turn uses c-ares. I am two levels removed from
c-ares itself and am a little out of my depth.</div>
<div><br>
</div>
<div>I have a little Python script that connects to a remote
Apache Spark cluster via Spark Connect and runs a test query.
When I run this script on my home network, it takes over 20
seconds to run. When I tether my workstation to my phone
(which is connected via LTE), the same script runs in a second
or two. In both cases the script runs successfully.</div>
<div><br>
</div>
<div>I enabled some gRPC debug flags which print out a lot of
information. This led me to c-ares, as I believe the
difference in runtime is related somehow to DNS.</div>
<div><br>
</div>
<div>I’ve extracted the <a
href="https://gist.github.com/nchammas/a4c9873d8158c323796e9b47c064e63a"
moz-do-not-send="true">log lines output by gRPC related to
c-ares</a>. (Be sure to scroll down to see both files; there
is one for home and one for LTE.) The gRPC codebase is hosted
on GitHub, where you can find the <a
href="https://github.com/grpc/grpc/blob/v1.60.0/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc"
moz-do-not-send="true">grpc_ares_wrapper.cc</a> file
mentioned in the log files.</div>
<div><br>
</div>
<div>I tried changing the DNS servers configured in my home
router but that didn’t seem to help. Interestingly, however,
if I set the same DNS servers already configured in my home
router directly on the network interface I’m using, the 20
second delay disappears:</div>
<div><br>
</div>
<div>```</div>
<div>
<div>networksetup -setdnsservers “My Network" 1.1.1.1 1.0.0.1</div>
</div>
<div>```</div>
<div><br>
</div>
<div>But this setting doesn’t persist across restarts, and only
Spark Connect seems to have this problem. It seems there is
some kind of bad interaction between c-ares and my router.</div>
<div><br>
</div>
<div>How can I dig deeper to understand what’s going wrong with
my home network? I checked the <a
href="https://c-ares.org/docs.html" moz-do-not-send="true">c-ares
docs</a> but I don’t see a way for an end-user to enable
debug output from c-ares, e.g. via an environment variable.</div>
<div><br>
</div>
<div>Any suggestions? I’m running macOS 14.2.1. The router is an
Apple AirPort.</div>
<div><br>
</div>
<div>Nick</div>
<div><br>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
</blockquote>
</body>
</html>