Troubleshooting

General Troubleshooting

  1. I get this error: subnet.dht.protocol.ValidationError: local time must be within 3 seconds of others on 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.org

  2. The 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 to C:/Users/username and create the .wslconfig with this content:

    [wsl2]
    memory=12GB

    Then reboot WSL (run sudo reboot in the WSL console) and the node should operate.

  3. 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, run sudo 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).

  1. This tutorial is compatible with Windows 10-11

  2. Launch Windows PowerShell as an Administrator, and install WSL 2:

    wsl.exe --install
  3. Update WSL, if needed:

    wsl.exe --update
  4. In WSL, install basic Python stuff:

    sudo apt update
    sudo apt install python3-pip python-is-python3
  5. Then, 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:

  1. Create the .wslconfig file in your user's home directory in Windows with the following contents:

  2. In the WSL command line interface, find out the inet IP address of your WSL container (172.X.X.X):

  3. In Windows (PowerShell), allow traffic to be routed into the WSL container (replace 172.X.X.X with the IP address (inet) from step 2):

  4. Set up your firewall (e.g., Windows Defender) to allow traffic from the outside world to the port 31330/tcp.

    1. You can also add an inbound rule for the port in the Windows Defender Firewall with Advanced Security settings.

  5. 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