- Veeam Support Knowledge Base
- How to Test Port Connectivity
How to Test Port Connectivity
Purpose
Most connection errors involving ports in the 61xx, 93xx, 94xx, and 10xxx ranges are related to Veeam product services. Determine whether the port in the connection error is associated with a Veeam product service. If so, verify that the service is running on the target machine specified in the error.
Each product's user guide includes a comprehensive list of all the ports utilized by the respective product. Below are convenient links to the most frequently accessed port lists for popular products.
- Veeam Backup & Replication Ports
- Veeam ONE Ports
- Veeam Agent for Microsoft Windows Ports
- Veeam Agent for Linux Ports
Ports 2500-3300 are dedicated to data transport. Those ports will only be associated with a VeeamAgent.exe process when data is actively being transferred. When testing connection issues related to ports in that range, you will likely have to start a listener on the target machine manually.
Troubleshooting with Veeam Software Appliance and Veeam Infrastructure Appliance
When troubleshooting connectivity for the Veeam Software Appliance or Linux Infrastructure deployed using the Veeam Infrastructure Appliance ISO, consider the following:
- All troubleshooting should be performed using the Root Shell, available via the Terminal UI.
Note: You cannot access the TUI root shell through SSH. Only local connections via a physical console or a virtual remote console are supported. - Netcat (
nc) is used for troubleshooting but is not installed by default. Netcat can be installed from the official Veeam Appliance repository using the following command:
dnf install nmap-ncat
- After testing is complete, netcat must be removed. Use the following command to remove netcat:
dnf remove nmap-ncat
Solution
Check Port Ownership
To test the connection to a specific port, you must first ensure that a process is actively listening on that port.
- If a process is associated with the port, proceed to the Testing Connection section of this article.
- If no process is associated with the port specified, proceed to the Creating a Listener section of this article.
Check Port Ownership in Windows
Use the following PowerShell command to check which process is locking a specific port.
Update the -LocalPort value to specify the port being tested.
Get-Process -Id (Get-NetTCPConnection -LocalPort 6160).OwningProcess
Legacy OS Method
The Get-NetTCPConnection cmdlet is not available in older versions of PowerShell installed with Windows Server 2012 or earlier. For those legacy operating systems, the following netstat command can be used to find the process ID, which can then be manually associated with a process in Task Manager.
Use the following command to list processes associated with the specified port:
Replace the port placeholder in this example with the port being tested.
netstat -aon | findstr :port | findstr LISTENING | findstr /C:":"
Check Port Ownership in Linux
Note: When troubleshooting a Veeam Appliance, reference the Troubleshooting with Veeam Software Appliance and Veeam Infrastructure Appliance section at the beginning of this article.
Use the following command to check which process is associated with a specific port.
Replace the portnumber placeholder with the port being tested.
sudo lsof -i :portnumber
Creating a Listener
If the port you are testing does not currently have a process associated with it, you must create a listener to own that port before attempting to test if the port can be reached.
Creating a Listener in Windows
Use the following PowerShell command to start a listener on the specified port.
Replace 6160 in this example with the port you are testing.
$listener = [System.Net.Sockets.TcpListener]6160; $listener.Start();
The above command will start a process in the background on the specified port. You can reuse the command from the Check Port Ownership in Windows section to verify that the port is now associated with a process.
Below is an example of:
- Identifying that no process is associated with a port.
- Creating a listener on that port.
- Verifying the port ownership.
$listener.Stop();
Creating a Listener in Linux
Note: When troubleshooting a Veeam Appliance, reference the Troubleshooting with Veeam Software Appliance and Veeam Infrastructure Appliance section at the beginning of this article.
Use the following command to start a listener on the specified port.
Replace 6160 in this example with the port you are testing.
nc -l -v -k -p 6160
This example uses Netcat (nc), which may not be installed by default on all Linux systems. Although other applications can also be used, Netcat is a commonly used tool for this purpose.
To stop the netcat listener, use Ctrl+C to stop the process.
Testing Connection
When testing connectivity to a port, it's important to test first from the machine that Veeam used to initiate communication. If the test fails, test locally from the target machine, and then test from other machines. Testing from multiple locations is recommended because firewalls within the environment may allow connections from some sources while blocking others.
Testing Connection From Windows
The following native PowerShell command will test connectivity to the specified computer and port.
Update the -ComputerName and -Port values.
Test-NetConnection -ComputerName TargetMachine -Port ####
Legacy OS Method
The Test-NetConnection cmdlet is not available in older versions of PowerShell installed with Windows Server 2012 or earlier. For those legacy operating systems, use the following command to test the connection:
Replace the targetmachine and port placeholders in this example.
(New-Object System.Net.Sockets.TcpClient).Connect("targetmachine", port)
Testing Connection From Linux
Note: When troubleshooting a Veeam Appliance, reference the Troubleshooting with Veeam Software Appliance and Veeam Infrastructure Appliance section at the beginning of this article.
The following command will test connectivity to the specified computer and port.
Replace the targetmachine and port placeholders in this example.
nc -zv targetmachine port
nc), which may not be installed by default on all Linux systems. Although other applications can also be used, Netcat is a commonly used tool for this purpose.
Interpreting the Results
If the connection test is successful, but the task within Veeam still fails, do the following:
- Review the error and determine which machine Veeam was using to initiate the connection, and test with that machine.
It's important to note that some Veeam products rely on a central control server with components on other machines. Therefore, it's possible that the primary Veeam server is not at fault and that the issue lies with one of the remote component machines. - In environments with a signature-based firewall, the test packets may be permitted to pass, but Veeam traffic may be blocked. Review Troubleshooting Signature-Based Firewalls for more information.
After a failed connection test, do the following:
- Double-check that you specified the correct IP address and port.
- Double-check that there is a process on the target machine listening on the port.
- Run the connection test command from the target machine to test if it can talk to itself on that port.
- Run the connection test command from another remote machine in the environment to isolate whether the port connection is blocked for all remote machines or only the first machine you tested from.
If the target machine can test the port to itself successfully, but remote machines cannot reach that same port, a firewall is likely blocking connections.
Windows Test Results
Below are a series of screenshots demonstrating the results displayed while testing.
Successful Connection Test
This is an example of a complete success, indicated by TcpTestSucceeded : True.
Failed Connection Test
The Test-NetConnection cmdlet will first attempt to connect to the port. If that fails, the cmdlet will attempt to ping the remote machine. While a successful ping is not a requirement of Veeam, in the first example it shows that some connection is possible, just not to the port specified.
Linux Test Results
Successful Connection Test
This is an example of a success, indicated by the line:
Ncat: Connected to x.x.x.x:xxxx.
Failed Connection Test
The following example is of a complete failure due to a port connection timeout, as indicated by the line:
Ncat: TIMEOUT.
If this KB article did not resolve your issue or you need further assistance with Veeam software, please create a Veeam Support Case.
To submit feedback regarding this article, please click this link: Send Article Feedback
To report a typo on this page, highlight the typo with your mouse and press CTRL + Enter.