Borrar filtros
Borrar filtros

Why do I receive License Manager Error -97?

1.771 visualizaciones (últimos 30 días)
MathWorks Support Team
MathWorks Support Team el 21 de Abr. de 2011
Editada: MathWorks Support Team el 22 de Feb. de 2023
Why do I receive the following error?
ERROR: License Manager Error -97.
The desired vendor daemon is down.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 22 de Feb. de 2023
Editada: MathWorks Support Team el 22 de Feb. de 2023
This issue generally indicates that the MATLAB License Manager (MLM) process failed to start because the required ports are not available. The cause of this error may be due to one of the following:
  • Port Conflict
  • /var/tmp/ Conflict
  • Incorrect or Outdated MLM
  • Incorrect Host ID
  • Expired License

Port Conflict

When the port defined by the server license file is already in use, the License Manager will not be permitted to start.
To resolve this issue, you must set different ports for each license manager that you are running. Ports are defined in the first two lines of the license.dat file used by the license manager.
For example, in this license.dat file:
SERVER license-server-name 0123456789AB 27000
DAEMON MLM "C:\Program Files\MATLAB\R20XXx\etc\win64\mlm.exe"
  • lmgrd.exe is set use port 27000.
  • MLM.exe uses a random port by default, unless a port is manually defined.
If the license.dat file is edited as follows:
SERVER license-server-name 0123456789AB 27050
DAEMON MLM "C:\Program Files\MATLAB\R20XXx\etc\win64\mlm.exe" port=27051
  • lmgrd.exe will now use port 27050.
  • MLM.exe will now use port 27051.
After the license.dat file is updated, you must restart the network license manager:
Next, change the port number used by MATLAB on the network client.
Update the client's network.lic file. This file is one of the following:
  • (Windows) - $MATLAB\R20XXx\licenses\network.lic
  • (Linux) - /usr/local/MATLAB/R20XXx/licenses/network.lic
  • (MacOS) - /Applications/
Update the SERVER line in the client license files to match the SERVER line in the license file for the license manager.
There may also be a port conflict if the firewall is blocking the port. To verify that the firewall is the cause, temporarily disable it—if it is safe to do so.
If disabling the firewall allows licenses to be checked out, you will need to allow the MLM and LMGRD to pass through. It is possible to create program-based exceptions to the firewall in Windows and  MacOS allowing any port from the MLM vendor daemon. On Linux, you must use the port number.

/var/tmp Conflict

To resolve this issue, follow these steps:
  1. Remove the lockMLM file and the lm_TMW files from /var/tmp.
  2. After these files are removed, restart the license manager.
If you still receive the same error, an existing license manager or vendor daemon process might be the cause. The $MATLAB/etc/lmdown script shuts down a running lmgrd and MLM process. Sometimes the lmdown script can fail in its task.
If this occurs, the most effective way to shut down the license manager daemon is to use the UNIX "kill" command as follows:
1. Determine whether the license daemons are operating.
Depending on your system, use one of the following commands:
ps -ef | grep lm
ps agx | grep lm
2. Check the output to see if any LMGRD and "LM" or "MLM" associated with MATLAB are running. If so, kill all daemons manually by executing (root user may be required) the following command for each process.
kill <pid of daemon>
3. Restart the daemons by running $MATLAB/etc/lmstart.
If the error still remains at this point, it is also possible that the vendor daemon is trying to run on an occupied port. To resolve this, see the above solution for Port Conflict for changing the ports used by the SERVER and DAEMON lines.

Incorrect or Outdated MLM

To resolve this issue, make sure you’re running the latest version of FlexLM. Version 11.18.1 is the minimum required to serve licenses for R2022a and newer.
Follow these steps to check the version of FlexLM on Windows:
  1. Check the version of LMTools through Help > About
  2. Check in the "Config Services" tab that the paths are pointing to the latest versions of lmgrd and license.dat
  3. Confirm the license.dat has the DAEMON line pointed to the latest MLM.exe
Follow these steps to check the version of FlexLM on Linux and MacOS:
  1. Navigate to usr/local/MATLAB/R20XXx/etc or /Applications/MATLAB_R20XXx/etc
  2. Run the “lmver” command
  3. Check that you are running the latest version of license manager binaries.
    1. You should also make sure you are correctly referencing the vendor daemon. Pointing to the wrong file or not specifying that the vendor daemon being used is MLM will cause this error. Remember that MLM is specified as the vendor daemon and then its file location is specified.
For instructions on updating the License Manager, please refer to the following article:

Incorrect HostID

To resolve this issue, verify that the Host ID of the license server matches the license.dat and network.lic files. For more information on Host ID, see the following Article:

Expired License

To resolve this issue, please obtain an updated license that is not expired.
  1 comentario
Walter Roberson
Walter Roberson el 15 de Sept. de 2017
"To specify an open port for the vendor daemon, please edit the DAEMON line in the license.dat file found in the $MATLAB/etc directory [...]"

Iniciar sesión para comentar.

Más respuestas (1)

Bill Tubbs
Bill Tubbs el 22 de Jul. de 2020
Editada: Bill Tubbs el 22 de Jul. de 2020
This is far too complicated and there are too many potential solutions.
I have this error after installing MATLAB on a second computer (due to needing to take the original one in for a service). It worked fine after first install, but then I needed to run MATLAB on the original computer one more time before sending it for service and now (even after fully shutting it down and restarting the second computer) I get this error when I try to launch MATLAB on the second computer.
Some advice would be appreciated. E.g. which of the 5 possible causes is most likely given my situation decribed above?
My setup: Mac OS X 10.13.6 with MATLAB 2019b on a Université Laval license using Cisco AnyConnect VPN
Diagnostic Information:
Feature: MATLAB
License path: /Users/billtubbs/Library/Application Support/MathWorks/MATLAB/R2019b_licenses:/Applications/
Licensing error: -97,121.


Más información sobre Manage Products en Help Center y File Exchange.


Aún no se han introducido etiquetas.


Community Treasure Hunt

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

Start Hunting!

Translated by