MATLAB: Do I receive a “FLEXlm error: -17,XXX. System Error: 10038 “Winsock: Specified socket is invalid” when trying to start MATLAB

MATLAB

Why do I receive the following error when I try to launch MATLAB?
License Manager Error -17
Cannot write data to license server
Or
"Cannot write data to license server." FLEXlm error: -17,13
System Error: 10038 "Winsock: Specified socket is invalid."

Best Answer

This error is most likely due one of the following reasons:
1. There is an error in the license.dat file
Make sure that both the hostname and port number in the SERVER line of your license file are correctly listed.
2. There is an issue communicating with the license server.
The client machines must be able to "see" the network license manager. Please verify that the server can be resolved from the client machine by running the following command:
tracert $license_server
(where $license_server is the name of your license server as it appears in the license file)
The name of your license server will be found in the SERVER line of your license file immediately after the word SERVER.
3. There is a port conflict with the license manager.
Make sure that the port number in the SERVER line in the license file on the client matches the one on the license server. If they do match, make sure the port is valid and not in use by another application. To determine if the port address is available:
On UNIX, type the following command at your UNIX prompt:
netstat -P tcp
On Windows, type the following command in a DOS prompt:
netstat -p tcp
The Foreign or Remote Address column contains a list of machine names or IP addresses followed by a period or colon and then a port number. If the local machine is on this list, then the port number listed is being used.