cockroachdb / cockroachdb/cockroach

GRPC error when attempting to generate a diagnostic bundle for an in-memory demo cluster

Open
#120,382 0 comments 1 reaction 0 assignees View on GitHub
C-bug
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Describe the problem**

I needed to test something about working with a diagnostic bundle, so I thought I would just run `cockroach demo` and generate a bundle locally. But it seems that cockroach debug zip connects over the gRPC port, no matter what `--url` or `--host` you use, and it seems that the `demo` cluster does not listen for gRPC connections.

**To Reproduce**

1. Start a demo cluster: `cockroach demo --insecure`.
2. In a new terminal, run:

```
$ ./cockroach debug zip foo.zip --insecure
[cluster] discovering virtual clusters...
E240312 19:30:47.583788 27 2@rpc/peer.go:601 [rnode=?,raddr=localhost:26257,class=system,rpc] 1 failed connection
attempt (last connected 0s ago): grpc: connection error: desc = "error reading server preface: read tcp 127.0.0.1:61168-
>127.0.0.1:26257: read: connection reset by peer" [code 14/Unavailable]
[cluster] discovering virtual clusters: error:initial connection heartbeat failed: grpc: connection error: desc = "error reading
server preface: read tcp 127.0.0.1:61168->127.0.0.1:26257: read: connection reset by peer" [code 14/Unavailable]
ERROR: server closed the connection.
Is this a CockroachDB node?
initial connection heartbeat failed: grpc: connection error: desc = "error reading server preface: read tcp 127.0.0.1:61168-
>127.0.0.1:26257: read: connection reset by peer" [code 14/Unavailable]
Failed running "debug zip"
```
3. Try adding various `--host`, `--url`, `--port` flags, same error.
4. Use `cockroach start` to start a single-node normal cluster, successfully run `cockroach debug zip` and get a diagnostic bundle.

**Expected behavior**
A diagnostic bundle is generated by connecting to localhost:26257 (which is after the default), or an error message clearly states that it's not possible to create a diagnostic bundle for a demo cluster.

**Additional data / screenshots**
n/a

**Environment:**
- CockroachDB v23.2
- Server OS: macOS ARM (not relevant)
- Client app: cockroach command

**Additional context**
N/A

Jira issue: CRDB-36658

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.