-
Notifications
You must be signed in to change notification settings - Fork 4.1k
cli: cockroach sql fails after successful connect and start-single-node without arguments #61616
Copy link
Copy link
Open
Labels
A-authenticationPertains to authn subsystemsPertains to authn subsystemsA-cli-adminCLI commands that pertain to controlling and configuring nodesCLI commands that pertain to controlling and configuring nodesA-cli-clientCLI commands that pertain to using SQL featuresCLI commands that pertain to using SQL featuresA-securityC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.S-3-ux-surpriseIssue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.T-server-and-securityDB Server & SecurityDB Server & Security
Description
The following two commands succeed without any additional arguments:
% cockroach connect --single-node
% cockroach start-single-node
Then after issuing the following command, which was recommended by the output of connect:
% ./cockroach cert create-client root --ca-key=~/.cockroach-certs/ca-client.key
invocation of cockroach sql without argument fails:
% ./cockroach sql
[...]
ERROR: x509: certificate is valid for kenax, not localhost
Failed running "sql"
This is because of a design mismatch:
connectandstartcommands use the "hostname" of the machinesqland other client commands default tolocalhostconnectcommand does not populatelocalhostinto the cert unless requested explicitly
What to do about this?
Part of #60632
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-authenticationPertains to authn subsystemsPertains to authn subsystemsA-cli-adminCLI commands that pertain to controlling and configuring nodesCLI commands that pertain to controlling and configuring nodesA-cli-clientCLI commands that pertain to using SQL featuresCLI commands that pertain to using SQL featuresA-securityC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.S-3-ux-surpriseIssue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.T-server-and-securityDB Server & SecurityDB Server & Security