You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cli: "no such host" error when starting CRDB on Mac
When CockroachDB is started without `--advertise-addr`,
it fallbacks to `--listen-addr`. If the latter is also
unspecified, it defaults to the `hostname`.
Subsequently, `validateAdvertiseAddr` attempts to
resolve the hostname. If the resolution fails, the server
aborts the startup sequence. This is a safe default because
node discovery is compromised without a functioning DNS.
On Mac, `hostname` is resolved via mDNS / Bonjour.
Unless it's suffixed with `.local`, it doesn't resolve.
An obvious workaround is to add it to /etc/hosts, or to change
it via `sudo hostname $USER.local`.
To make the (DEV) experience on Mac more seamless, this PR
replaces DNS resolution error with a warning. Since we can't
unambiguously determine if the user is running in DEV-mode,
we assume that `--insecure` on Mac implies exactly that.
We also update `roachprod` to explicitly use `--advertised-addr`
with `127.0.0.1`. This also fixes `roachtest` in local mode.
Fixes: #66426Fixes: #149469
Release note: None
0 commit comments