Skip to content
Troubleshooting

Troubleshooting

Exit codes

CodeMeaning
0The command succeeded
1The command failed, such as a network error or a --server ID that speedtest.net does not list. Errors go to standard error
2A setting is invalid, or a settings file cannot be read or decoded
130The run was interrupted with Ctrl-C, and no report was written

A second Ctrl-C ends a run that does not stop after the first.

Invalid settings

An invalid setting stops the command before it runs, exits with code 2, and names where the value came from: a flag, an environment variable, or a settings file key. Every invalid setting is reported at once.

ErrorFix
An unknown --ping-mode, --protocol, or --unit valueUse one of the values the CLI Reference lists
A negative --threadUse 0 for the default, or a positive number
More than one of --json, --jsonl, and --unixChoose one output format
--city and --location both setUse one of them
--city, --location, or --search with --server or --custom-urlLeave the location settings out, since the servers are already chosen
--filter-cc with --server or --custom-urlLeave the filter out, since the servers are already chosen
--proxy with --protocol tcpUse HTTP transfers, since TCP connections cannot go through an HTTP proxy
A --source that is neither an IP address nor a network interfaceUse an address of this host or an interface name
A --dl-size or --ul-size outside its tableUse a size from Transfer sizes
An unknown key, a repeated key, or a value of the wrong type in the settings fileFix the named key. See Configuration for the keys
A settings file named by --config or SPEEDTEST_GO_CONFIG that does not existFix the path, or leave the setting out to use the default file

Server errors

ErrorCause
A --server ID is not listedspeedtest.net does not list that server near you. Run speedtest-go list to see the available IDs
No servers in the selected countries--filter-cc left no servers. Check the codes, or remove the filter
Cannot determine your country for --filter-cc autospeedtest.net did not report your country. Name the countries instead, or set --city

Network errors

SymptomCause
--ping-mode icmp failsICMP needs raw sockets, so it needs root or CAP_NET_RAW on Linux. In a container, use http or tcp
Binding to an interface fails on LinuxKernels before 5.7 allow it only with the CAP_NET_RAW capability
A nonzero --dscp is rejectedDSCP marking works only on Linux, macOS, and the BSDs
Packet loss shows N/AThe server received none of the test packets. Packet loss is measured over UDP, which does not go through a proxy, and which a firewall may block

Debug output

--debug writes the client’s debug messages to standard error, and shows plain lines instead of the live progress:

speedtest-go --debug