# 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?**&#x41;ll clocks on all nodes need to be synchronized. Please set the date using an [NTP server](https://en.wikipedia.org/wiki/Network_Time_Protocol):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](https://stackoverflow.com/questions/65086856/wsl2-clock-is-out-of-sync-with-windows).

## 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:

   <pre data-overflow="wrap"><code><strong>git clone https://github.com/hypertensor-blockchain/subnet-template.git
   </strong></code></pre>

### Making the server directly available <a href="#making-the-server-directly-available" id="making-the-server-directly-available"></a>

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:

   ```
   [wsl2]
   localhostforwarding=true
   ```
2. **In the WSL** command line interface, find out the `inet` IP address of your WSL container (`172.X.X.X`):

   ```
   sudo apt install net-tools
   ifconfig
   ```
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):

   <pre data-overflow="wrap"><code>netsh interface portproxy add v4tov4 listenport=31330 listenaddress=0.0.0.0 connectport=31330 connectaddress=172.X.X.X
   </code></pre>
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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hypertensor.org/subnet-template/troubleshooting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
