I Cannot get the two Substrate Nodes to Work together in a local Network between two different PC running on Win11 + WSL
I have followed the Tutorial and everything seems ok till the point that i am not getting any Peer Connections.
So my question is can the Substrate Node run in this setup or what i am doing wrong? i have checked Ports (See End of Post for Portcheck with netstat) can two PC communicate over 127.0.0.1? if not how do i set it up to run on a local Network like 192.168? or can i run it via ip4 or ip6 via the Internet?
Thanks to everybody in advance who can help.
What i have done so far:
I have followed the tutorial about ADD TRUSTED NODES
and i managed succssesfully to:
- Generate local Keys
- Custom Chain Specs (Added Aura and Grandpa Authorities and converted to RAW)
- Started Node01 on first PC (Windows11+WSL)`
./target/release/node-template \
--base-path /tmp/node01 \
--chain ./customSpecRaw.json \
--port 30333 \
--ws-port 9945 \
--rpc-port 9933 \
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \
--validator \
--rpc-methods Unsafe \
--name MyNode01 \
--password-interactive
- Added Keystore to Node01 (Keystore check works, Node ask for PW when starting if PW is correct Node is starting up and Waiting for other Peers)
This is the Output from Node 01 so Far:
2023-05-05 10:24:44 βοΈ version 4.0.0-dev-dbc8f3265f9
2023-05-05 10:24:44 π Chain specification: Chain-Testnet-DEV
2023-05-05 10:24:44 π· Node name: MyNode01
2023-05-05 10:24:44 π€ Role: AUTHORITY
2023-05-05 10:24:44 πΎ Database: RocksDb at /tmp/node01/chains/local_testnet/db/full
2023-05-05 10:24:44 β Native runtime: Network-Node-100 (Network-Node-1.tx1.au1)
2023-05-05 10:24:44 Using default protocol ID "sup" because none is configured in the chain specs
2023-05-05 10:24:44 π· Local node identity is: 12D3KooWSY3YykHtFbyYsMZGgrpYnupVFwstz6GnGQ21wUJH3BUH
2023-05-05 10:24:44 π» Operating system: linux
2023-05-05 10:24:44 π» CPU architecture: x86_64
2023-05-05 10:24:44 π» Target environment: gnu
2023-05-05 10:24:44 π» CPU: AMD Ryzen 7 5800X 8-Core Processor
2023-05-05 10:24:44 π» CPU cores: 8
2023-05-05 10:24:44 π» Memory: 15958MB
2023-05-05 10:24:44 π» Kernel: 5.15.90.1-microsoft-standard-WSL2
2023-05-05 10:24:44 π» Linux distribution: Ubuntu 22.04.1 LTS
2023-05-05 10:24:44 π» Virtual machine: yes
2023-05-05 10:24:44 π¦ Highest known block at #0
2023-05-05 10:24:44 γ½οΈ Prometheus exporter started at 127.0.0.1:9615
2023-05-05 10:24:44 Running JSON-RPC HTTP server: addr=127.0.0.1:9933, allowed origins=["http://localhost:*", "http://127.0.0.1:*", "https://localhost:*", "https://127.0.0.1:*", "https://polkadot.js.org"]
2023-05-05 10:24:44 Running JSON-RPC WS server: addr=127.0.0.1:9945, allowed origins=["http://localhost:*", "http://127.0.0.1:*", "https://localhost:*", "https://127.0.0.1:*", "https://polkadot.js.org"]
2023-05-05 10:24:49 π€ Idle (0 peers), best: #0 (0x84c0β¦87ca), finalized #0 (0x84c0β¦87ca), β¬ 0 β¬ 0
2023-05-05 10:24:54 π€ Idle (0 peers), best: #0 (0x84c0β¦87ca), finalized #0 (0x84c0β¦87ca), β¬ 0 β¬ 0
2023-05-05 10:24:59 π€ Idle (0 peers), best: #0 (0x84c0β¦87ca), finalized #0 (0x84c0β¦87ca), β¬ 0 β¬ 0
2023-05-05 10:25:04 π€ Idle (0 peers), best: #0 (0x84c0β¦87ca), finalized #0 (0x84c0β¦87ca), β¬ 0 β¬ 0
2023-05-05 10:25:04 β Error while dialing /dns/telemetry.polkadot.io/tcp/443/x-parity-wss/%2Fsubmit%2F: Custom { kind: Other, error: Timeout }
2023-05-05 10:25:09 π€ Idle (0 peers), best: #0 (0x84c0β¦87ca), finalized #0 (0x84c0β¦87ca), β¬ 0 β¬ 0
- Started Node02 on second PC (Windows11+WSL) Changed the NODE ID to my Node
./target/release/node-template \
--base-path /tmp/node02 \
--chain ./customSpecRaw.json \
--port 30334 \
--ws-port 9946 \
--rpc-port 9934 \
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \
--validator \
--rpc-methods Unsafe \
--name MyNode02 \
--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWSY3YykHtFbyYsMZGgrpYnupVFwstz6GnGQ21wUJH3BUH \
--password-interactive`
- Added Keystore to Node02 (also Keystore check works, Node ask for PW when starting, if PW is correct Node is starting.
here is the Output from Node02:
2023-05-05 10:40:01 βοΈ version 4.0.0-dev-66faadab556
2023-05-05 10:40:01 π Chain specification: Chain-Testnet
2023-05-05 10:40:01 π· Node name: reminiscent-father-3257
2023-05-05 10:40:01 π€ Role: FULL
2023-05-05 10:40:01 πΎ Database: RocksDb at /home/LOCALUSER/.local/share/node-template/chains/local_testnet/db/full
2023-05-05 10:40:01 β Native runtime: Network-Node-100 (Network-Node-1.tx1.au1)
2023-05-05 10:40:01 Using default protocol ID "sup" because none is configured in the chain specs
2023-05-05 10:40:01 π· Local node identity is: 12D3KooWCouowzeu2c6p8YqxTjtBCnf4Wt2iwFGUsVSuj3dSmeZV
2023-05-05 10:40:01 π» Operating system: linux
2023-05-05 10:40:01 π» CPU architecture: x86_64
2023-05-05 10:40:01 π» Target environment: gnu
2023-05-05 10:40:01 π» CPU: Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
2023-05-05 10:40:01 π» CPU cores: 4
2023-05-05 10:40:01 π» Memory: 7817MB
2023-05-05 10:40:01 π» Kernel: 5.15.90.1-microsoft-standard-WSL2
2023-05-05 10:40:01 π» Linux distribution: Ubuntu 22.04.2 LTS
2023-05-05 10:40:01 π» Virtual machine: yes
2023-05-05 10:40:01 π¦ Highest known block at #0
2023-05-05 10:40:01 γ½οΈ Prometheus exporter started at 127.0.0.1:9615
2023-05-05 10:40:01 Running JSON-RPC HTTP server: addr=127.0.0.1:9933, allowed origins=["http://localhost:*", "http://127.0.0.1:*", "https://localhost:*", "https://127.0.0.1:*", "https://polkadot.js.org"]
2023-05-05 10:40:01 Running JSON-RPC WS server: addr=127.0.0.1:9944, allowed origins=["http://localhost:*", "http://127.0.0.1:*", "https://localhost:*", "https://127.0.0.1:*", "https://polkadot.js.org"]
2023-05-05 10:40:06 π€ Idle (0 peers), best: #0 (0x4e7fβ¦66ca), finalized #0 (0x4e7fβ¦66ca), β¬ 0 β¬ 0
2023-05-05 10:40:11 π€ Idle (0 peers), best: #0 (0x4e7fβ¦66ca), finalized #0 (0x4e7fβ¦66ca), β¬ 0 β¬ 0
2023-05-05 10:40:16 π€ Idle (0 peers), best: #0 (0x4e7fβ¦66ca), finalized #0 (0x4e7fβ¦66ca), β¬ 0 β¬ 0
2023-05-05 10:40:21 π€ Idle (0 peers), best: #0 (0x4e7fβ¦66ca), finalized #0 (0x4e7fβ¦66ca), β¬ 0 β¬ 0
2023-05-05 10:40:26 π€ Idle (0 peers), best: #0 (0x4e7fβ¦66ca), finalized #0 (0x4e7fβ¦66ca), β¬ 0 β¬ 0
I have installed the netstat tool, started the node and checked Ports: Port Check on NODE01:
netstat -tuln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:40991 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:32853 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:9945 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:9933 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:9615 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:30333 0.0.0.0:* LISTEN
tcp6 0 0 :::30333 :::* LISTEN
udp 36864 0 0.0.0.0:5353 0.0.0.0:*
udp 0 0 127.0.0.1:323 0.0.0.0:*
udp6 0 0 ::1:323 :::*
Port Check on Node02:
netstat -tuln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:32803 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:9615 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:9944 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:9933 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:30333 0.0.0.0:* LISTEN
tcp6 0 0 :::30333 :::* LISTEN
udp 0 0 127.0.0.1:323 0.0.0.0:*
udp6 0 0 ::1:323 :::*