Why do I get the error "Failed to open the TCP port number in the license" when starting the License Manager?

194 visualizzazioni (ultimi 30 giorni)
Why do I get the error "Failed to open the TCP port number in the license" in the debug log file when starting the License Manager?
"Failed to open the TCP port number in the license"

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 11 Gen 2024
Modificato: MathWorks Support Team il 11 Gen 2024
The most common causes of this error are: 
  1. Port Conflicts
  2. The License Manager was restarted too soon after shutdown
  3. The hosts file not containing the hostname
1. To resolve the port conflict issue: 
Check whether or not the specified port on the "SERVER" line of the server license file (license.dat) is being by another process.
An example SERVER line would look like this, where 27000 is the port number that lmgrd will use:
SERVER ServerName 0adbdea7de8d 27000
You can use the following commands to verify the port is not in use: 
Linux:
  • "netstat -anp | grep port#" or "netstat -tulpn | grep port#"
    • For example to verify the port "27000" is not in use:
      • "netstat -anp | grep 27000" or "netstat -tulpn | grep 27000"
  • Any output indicates the port is being used by a different service.
macOS:
  • netstat -anv | grep port#
  • Any output indicates the port is being used by a different service
Windows:
  • netstat -aon | find ":port number"
    • For example: netstat -aon | find ":27000"
  • Any output indicates the port is being used by a different service
To resolve the issue, you can either change the port number in the license.dat (restarting the license manager to save the changes), or try killing the service running in the port.
For information about which ports the license manager requires, see the related solution:  "What ports does the Network License Manager use, and how can I set those ports?" at the following link: http://www.mathworks.com/matlabcentral/answers/96756
2. To resolve the license manager started too soon:
  • This expected behavior after stopping the service the port is held for a certain amount of time by the OS.
  • This is likely to happen if the license manager was shut down using the 'kill -9 lmgrd' command on Linux rather than using the 'lmdown' command. In this case, you might have to wait at least 60 seconds from the time when the License Manager is shutdown until restarting. This will allow the OS to recognize that the license server port is available to use.
  • If you are still unable to restart the license manager, you need to restart the license server machine itself.
3. To resolve the hosts file not containing your machine's hostname:
  • This error may occur on newer Linux distributions such as Fedora if the computer's hostname is missing in the /etc/hosts file.
  • To resolve this confirm that the /etc/hosts file has an entry for the hostname of the computer. For example, if the computer's hostname is "license1", you should have the following line in the /etc/hosts/ file:
127.0.0.1 localhost license1
  • If you have the 127.0.0.1 line and the computer's hostname is not on this line, add it after "localhost".
  • If the computer's hostname is on another line in the file, move the hostname to the 127.0.0.1 line.
  • Once updated, try restarting the network license manager.

Più risposte (0)

Categorie

Scopri di più su Manage Products in Help Center e File Exchange

Tag

Non è stata ancora inserito alcun tag.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by