How to Troubleshoot a Network Connection
Overview
dxFeed API solutions such as Java, C, C#, Python, and FIX use the QD endpoint as a gateway for data feeds. This endpoint includes addresses and ports (e.g., demo.dxfeed.com:7300). dxFeed uses a whitelist to filter the incoming traffic to the endpoints.
Network issues generally have a root cause, including issues with:
Whitelist configuration on our side
Firewall configurations on your side (e.g., the company’s network policy)
Network routing between your host and the endpoint
This guide will help you troubleshoot these and similar network connection issues.
Troubleshooting
To troubleshoot your connection, follow these steps:
Check that you're connecting from the whitelisted IP (to see how to request an IP address addition, check this How to Add IP Address to dxFeed Whitelist article)
Substitute the
demo.dxfeed.com
demo address with the provided endpoint's address (for example, it might look like: rt1.ec2.dxfeed.com)Substitute the
7300 <port>
with the provided endpoint's port (for example, 7899)Try to connect to
demo.dxfeed.com:7300
if you can't connect to your endpoint address using the tools (this demo endpoint isn't protected by whitelist and can be used to check for routing issues)
If nothing helps, report the issue with the tools' output for both a public demo and your endpoint.
Network connection tools
PowerShell, Netcat, and Telnet are tools for checking network connections on ports. If you can connect from your host to the endpoint using one of them, your application should have no issues with the connection.
PowerShell
PowerShell is a tool for Windows, macOS, and Linux. Windows PowerShell is installed on Windows by default.
Open PowerShell prompt
Enter the Test-NetConnection command
Test-NetConnection -ComputerName <address> -Port <port>
If the connection passes, a
TcpTestSucceeded: True
message displays something similar to the followingComputerName : demo.dxfeed.com 7300 RemoteAddress : 208.93.103.170 RemotePort : 7300 InterfaceAlias : Wi-Fi SourceAddress : 192.168.17.182 TcpTestSucceeded : True
Netcat
Netcat is a tool for macOS and Linux. The tool reads from and writes network connections using TCP or UDP. Netcat is installed on macOS and Linux by default. So, the steps below work for both:
Open Terminal
Enter the command
nc -vz <address> <port>
If the connection passes
For macOS, a
CONNECTED
message displays something similar to the following:nc -vz demo.dxfeed.com 7300 found 0 associations found 1 connections: 1: flags=82<CONNECTED,PREFERRED> outif en4 src 192.0.0.0 port 59064 dst 192.0.2.0 port 7300 rank info not available TCP aux info available
For Linux, a success message displays something similar to the following:
Connection to demo.dxfeed.com 7300 port [tcp/https] succeeded!
Telnet
Telnet is a tool for Windows, macOS( High Sierra 10.13 and later), and Linux. Use Telnet for communication over the internet or a LAN using a virtual terminal connection. Telnet is installed on Linux and older Mac operating systems by default. But for Windows and macOS, you must install it yourself.
Install Telnet if it isn't already installed
Open the command prompt
For Windows:
Select Start
Choose Run or Search
Enter: cmd.exe
For OS X: Select Utilities > Terminal
For Linux: Open Terminal
Enter the command
telnet <address> <port>
If the connection passes, this will be the outputs
telnet demo.dxfeed.com 7300 Trying 208.93.103.170... Connected to demo.dxfeed.com. Escape character is '^]'. Connection closed by foreign host.
For Linux or Mac OS
For Windows: the successful connection message scrolls by quickly, and you get a blinking cursor on a blank screen. Press Enter to return to the command prompt