--sql-advertise-addr has no effect if you don't also set --sql-addr alongside it #87040
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
O-community
Originated from the community
T-server-and-security
DB Server & Security
X-blathers-triaged
blathers was able to find an owner
Describe the problem
I tried setting
--sql-advertise-addr
on a cluster purely in order to improve the output ofcockroach node status
and related debug endpoints so that they would include a useful identifying hostname that makes reading their output easier (the cluster is using IP addresses for its normal listen/advertise addr for reasons that are unimportant here). But found that it had zero effect, not even in the initial "CockroachDB node starting at ..." message that gets printed out when a node starts up. The non-sql--advertise-addr
was instead used as the advertised SQL address.And you can't cheekily work around it by setting
--sql-addr
to the same thing as--listen-addr
, because cockroach reasonably assumes that you want it to bind to the two addresses separately, so it fails to bind both during startup.I previously mentioned this in #52266 (comment), but haven't personally take the time to fix it myself, so I'm creating a separate issue in case it's helpful given that it isn't really the same issue as #52266 and it bothered me again recently.
To Reproduce
Expected behavior
I'd expect the various places that the SQL address is printed such as the
cockroach start
output andcockroach node status
to uselocalhost
in the SQL address, but both use127.0.0.1
.Additional data / screenshots
Environment:
Jira issue: CRDB-19116
The text was updated successfully, but these errors were encountered: