Find other nodes

How is cockroachDB suppose to find other nodes.

I appear to have a issues where I believe it is not able to find the first node. These are KVM VM’s all running on the same machine. I have shut down the firewall, and they are able to communicate with each other.

I170529 11:29:23.709320 34 vendor/ grpc: addrConn.resetTransport failed to create client transport: connection error: desc = “transport: dial tcp [::1]:26257: getsockopt: connection refused”; Reconnecting to {localhost:26257 }

Hi @doane! Can you provide the commands you’re using to start your nodes?

In general, CockroachDB adds nodes to a cluster when you start a node with the --join flag set to the host:port that CockroachDB is using on an existing node.

For example, if my first node is running cockroach on, when I start my second node I would use something like:

cockroach start --insecure --host= --join=

I now realize how much of armature question it was. I figured out that the problem was because the first database was not listening for connections from outside the vm.

I needed to add


so it would listen to connections from outside the VM and the other two vm’s that where directed to connect to cockroach1 connected right away.

@doane Glad you figured it out! All of these things depend on your environment’s hostnames/DNS/networking interfaces, so it can be really tricky.