Troubleshooting
General Troubleshooting
I get this error:
subnet.dht.protocol.ValidationError: local time must be within 3 seconds of otherson WSL. What should I do?All clocks on all nodes need to be synchronized. Please set the date using an NTP server:sudo apt install ntpdatesudo ntpdate pool.ntp.orgThe server starts loading blocks and then prints:
Killed. What should I do? This happens since Windows doesn't allocate much RAM to WSL by default, so the server gets OOM-killed.To increase the memory limit, go toC:/Users/usernameand create the.wslconfigwith this content:[wsl2] memory=12GBThen reboot WSL (run
sudo rebootin the WSL console) and the node should operate.WSL clock tends to get out of synch, which prevents the server from launching with the error
subnet.dht.protocol.ValidationError: local time must be within 3 seconds of others.To sync the WSL clock, runsudo ntpdate pool.ntp.org. See more fixes discussed at stackverflow.
Running on Windows Using WSL
You can run the subnet template on Windows using WSL or Docker. In this guide, we will show you how to set up a subnet validator node on WSL (Windows Subsystem for Linux).
This tutorial is compatible with Windows 10-11
Launch Windows PowerShell as an Administrator, and install WSL 2:
wsl.exe --installUpdate WSL, if needed:
wsl.exe --updateIn WSL, install basic Python stuff:
sudo apt update sudo apt install python3-pip python-is-python3Then, clone the Subnet Template:
git clone https://github.com/hypertensor-blockchain/subnet-template.git
Making the server directly available
If you have a NAT or a firewall, the subnet template will use relays for NAT/firewall traversal by default, which negatively impacts performance. If your computer has a public IP address, we strongly recommend setting up port forwarding to make the server available directly.
We explain how to do it below:
Create the
.wslconfigfile in your user's home directory in Windows with the following contents:In the WSL command line interface, find out the
inetIP address of your WSL container (172.X.X.X):In Windows (PowerShell), allow traffic to be routed into the WSL container (replace
172.X.X.Xwith the IP address (inet) from step 2):Set up your firewall (e.g., Windows Defender) to allow traffic from the outside world to the port 31330/tcp.
You can also add an inbound rule for the port in the Windows Defender Firewall with Advanced Security settings.
If you have a router, set it up to allow connections from the outside world (port 31330/tcp) to your computer (port 31330/tcp).
In Windows, you can run netsh interface portproxy show all. The WSL IP and port of choice should be shown.
Last updated