What I need to do for the CentOS in order to allow incoming connections to CRDB?

I have 3 nodes n1, n2, n3 - Mac-mini.
Added 3 more n4, n5, n6 - CentOS.

On the Mac-mini I had to allow incoming connection with the firewall.

What I need to do for the CentOS in order to allow incoming connections to CRDB?

n4
W180525 05:00:36.122533 538328 vendor/google.golang.org/grpc/clientconn.go:1158 grpc: addrConn.createTransport failed to connect to {xxx.xxx.xxx.xx1:26257 0 }. Err :connection error: desc = “transport: Error while dialing dial tcp xxx.xxx.xxx.xx1:26257: connect: connection refused”. Reconnecting…
n5
W180525 05:00:36.122533 538328 vendor/google.golang.org/grpc/clientconn.go:1158 grpc: addrConn.createTransport failed to connect to {xxx.xxx.xxx.xx2:26257 0 }. Err :connection error: desc = “transport: Error while dialing dial tcp xxx.xxx.xxx.xx2:26257: connect: connection refused”. Reconnecting…
n6
W180525 05:00:36.122533 538328 vendor/google.golang.org/grpc/clientconn.go:1158 grpc: addrConn.createTransport failed to connect to {xxx.xxx.xxx.xx3:26257 0 }. Err :connection error: desc = “transport: Error while dialing dial tcp xxx.xxx.xxx.xx3:26257: connect: connection refused”. Reconnecting…

I figured out what to do:

  1. ssh in the node which you want to add firewall rules to.
  2. sudo yum install iptables-services
  3. sudo iptables-save > /etc/sysconfig/iptables
  4. sudo nano /etc/sysconfig/iptables
  5. add the following line:
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 26257 -j ACCEPT

Now other nodes can communicate to this one

all but one node connected, only one node got following errors when trying to connect to from others
:W180525 07:29:47.488865 354218 vendor/google.golang.org/grpc/clientconn.go:1158 grpc: addrConn.createTransport failed to connect to {xxx.xxx.xxx.xxx:26257 0 }. Err :connection error: desc = “transport: Error while dialing dial tcp xxx.xxx.xxx.xxx:26257: connect: connection refused”. Reconnecting…

More on that error here: https://www.cockroachlabs.com/docs/stable/common-errors.html#connection-refused. This typically happens if the node’s not able to access the cluster, or if the cockroach start command is missing a --host or --port parameter.

Let me know if that helps. If not, let me know what commands you’re using to start each node, and which node is having the issue, and please attach logs from the node that’s having the issue.