Skip to content

cli: "no such host" error when starting CRDB on Mac #66426

Open
@andy-kimball

Description

@andy-kimball

Repro:
On Mac, start CRDB using this command line:

./cockroach start-single-node --insecure

EXPECTED: No error, the node should start.
ACTUAL: ERROR: failed to start server: invalid --advertise-addr: lookup AndyK-MacBook-Pro: no such host

This ping command fails on my Mac, and is presumably the reason why the host fails to resolve:

AndyK-MacBook-Pro:server andyk$ ping $(hostname)
ping: cannot resolve AndyK-MacBook-Pro: Unknown host

We should consider not using the default hostname if it doesn't resolve. Even if we can't do that for some reason, we should change the error so that it does not reference a flag that was not actually provided.

Jira issue: CRDB-8043

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cli-serverCLI commands that pertain to CockroachDB server processesA-server-networkingPertains to network addressing,routing,initializationA-server-start-drainPertains to server startup and shutdown sequencesB-os-macosIssues specific to macOS.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-server-and-securityDB Server & Security

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions