v-man
v-man

Reputation: 51

Multiple substrate nodes but each only has a single peer

Following this tutorial I have a network of five nodes running, the boot node and four peers. The boot node shows four peers. Two nodes running on the same PC find each other and see two peers each. But the final two nodes show only a single peer, the boot node.

How do I get the nodes to see all other peers and not just the boot node?

I'm attempting to connect using the below with the node_name, IP, and xxxyyyzzz bits filled out correctly for my network.

./target/release/node-template \
--base-path /tmp/<node_name>   \
--chain ./customSpecRaw.json   \
--port 30333                   \
--ws-port 9945                 \
--rpc-port 9933                \
--validator                    \ 
--rpc-methods Unsafe           \
--name <other_node_name>       \
--bootnodes /ip4/<ip_addr>/tcp/30333/p2p/xxxyyyzzz

Upvotes: 4

Views: 939

Answers (1)

Squirrel
Squirrel

Reputation: 1276

Substrate nodes can find each other automatically if they're on the same machine. (This can be disabled with the --no-mdns flag.)

If you see this message then the IP is right but not the peer id: "The bootnode you want to connect to at ... provided a different peer ID than the one you expect"

If not I'd ping the IP and make sure there's network connectivity and that the 30333 port are open on any firewalls in-between. (You can use telnet to see if a particular port is listening)

Upvotes: 3

Related Questions