Ubuntu 20.04 users often rely on the Speedtest CLI tool to monitor their network’s latency and speed. However, some users have reported encountering an error message stating, “ERROR: Unable to connect to servers to test latency.” In this article, we’ll explore the possible reasons behind this issue and provide solutions to resolve it.
The "ERROR: Unable to connect to servers to test latency" message in Speedtest CLI on Ubuntu 20.04 is usually caused by network issues or firewall settings. To resolve the issue, check your internet connection, adjust your firewall settings, use the official Speedtest CLI program, or try alternative speed testing programs.
Understanding the Issue
The error message “ERROR: Unable to connect to servers to test latency” usually indicates a problem with the network connection or firewall settings. It suggests that the Speedtest CLI tool is unable to establish a connection with the servers it uses to measure latency and speed.
Possible Causes and Solutions
1. Internet Connection Issues
Check your internet connection: Before diving into more complex troubleshooting, it’s essential to ensure that your internet connection is stable. You can do this by trying to access various websites or online services. If you’re having trouble connecting to the internet, the issue might be with your network, not the Speedtest CLI tool.
2. Firewall Settings
Check your firewall settings: Firewalls are designed to block unauthorized access to or from a private network. If you have a firewall enabled, it might be preventing the Speedtest CLI tool from connecting to its servers. You can temporarily disable the firewall to see if it resolves the issue.
In Ubuntu, you can disable the firewall using the
sudo ufw disable
If this solves the problem, you can add an exception for the Speedtest CLI tool in your firewall settings instead of keeping the firewall disabled.
3. Use the Official Speedtest CLI Program
Use the official Speedtest CLI program: If the above solutions don’t work, consider downloading the official Speedtest CLI program from Ookla’s website. They provide both .deb and .tgz files for Ubuntu.
To install the .deb file, use the following command:
sudo dpkg -i speedtest-cli.deb
speedtest-cli.deb with the actual filename of the downloaded package.
4. Try Alternative Speed Testing Programs
Try alternative speed testing programs: If you’re still having trouble, there are other command-line speed testing programs available. One popular option is
fast, which can be installed using the
snap package manager:
snap install fast
Once installed, you can run it with the command
In conclusion, the “ERROR: Unable to connect to servers to test latency” message is typically caused by network issues or firewall settings. By checking your internet connection, adjusting your firewall settings, using the official Speedtest CLI program, or trying an alternative program, you should be able to resolve the issue and continue monitoring your network’s latency and speed.
To check your internet connection in Ubuntu 20.04, you can try accessing various websites or online services. If you’re able to browse the web and access online content without any issues, your internet connection is likely stable.
To disable the firewall in Ubuntu 20.04, you can use the
ufw command. Open a terminal and run the following command:
sudo ufw disable. This will temporarily disable the firewall. Remember to re-enable it after troubleshooting.
You can download the official Speedtest CLI program for Ubuntu from Ookla’s website. They provide both .deb and .tgz files. Visit their website, navigate to the downloads section, and choose the appropriate file for your system.
To install a .deb file in Ubuntu 20.04, you can use the
dpkg command. Open a terminal, navigate to the directory where the .deb file is located, and run the following command:
sudo dpkg -i filename.deb. Replace
filename.deb with the actual name of the .deb file you want to install.
To install the
fast speed testing program using
snap in Ubuntu 20.04, open a terminal and run the following command:
snap install fast. This will download and install the
fast program on your system. Once installed, you can run it by typing
fast in the terminal.