Resolve TCP/IP Server Connection Errors
If you are unable to create a TCP/IP server using the
interface, follow these troubleshooting steps.
Make sure that your network adapter is enabled and connected.
Check that the IP address you specify is available on your machine. To see valid IP addresses for your machine, run the following command in MATLAB® on Windows®.
On Linux® and macOS, run the following command.
Verify that the specified IP address or host name is valid by using
resolvehost. If the output is empty, the specified IP address or host name is invalid. For example, if the host name is
en.wikipedia.org, run the following.
[name,address] = resolvehost("en.wikipedia.org")
name = 'en.wikipedia.org' address = '18.104.22.168'
Make sure that you do not specify a port that is already in use. In addition, you can only create one server object for a given address and port combination. To see all TCP/IP ports in use, run the following command in MATLAB.
!netstat -a -n -p TCP