cockroachdb / cockroachdb/cockroach
Commands that require the RPC port should default to port 26357
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
**Is your feature request related to a problem? Please describe.**
There's a clear push to separate the RPC and SQL ports in CockroachDB where previously they were one and the same port.
Currently, upon startup of cockroach, if the SQL port is not specified, it defaults to `26257`. Similarly, commands like `cockroach sql` default to connecting to `localhost:26257`.
This behaviour is not mirrored with the RPC port.
Many of the commands that require access to the RPC port will fail with their defaults if the RPC and SQL port are separated.
**Describe the solution you'd like**
Upon using `cockroach start`, perhaps have defaults like these if not specified:
```
--listen-addr=:26357 --sql-addr=:26257
```
In addition, the various CLI commands that require RPC access (`cockroach node decommission`, `cockroach debug zip`, `cockroach init` etc) should default to trying to connect to the RPC port instead of the SQL port. For example, right now the default for `--host` appears to be `localhost:26257`, but if it's an RPC command, it should default to `localhost:26357`.
Jira issue: CRDB-22546
Contributor guide
Assessment
This issue has not been assessed yet.