When I first installed the Network License Manager on my Windows operating system, I did not choose to setup as a service. Now when I try to use LMtools.exe to setup a service, I receive a "Failed to update the DACL settings" error. How can I avoid this error and configure the Network License Manager as a service?
MATLAB: Do I receive “Failed to update the DACL settings” when setting up a new License Manager service
Related Solutions
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/temp/ Conflict
- Incorrect 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 27000DAEMON 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 27050DAEMON 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/MATLAB_R20XXx.app/licenses/network.lic
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:
- Remove the lockMLM file and the lm_TMW files from /var/tmp.
- 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 lmps 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 MLM
To resolve this issue, make sure you’re running the latest version of FlexLM.
Follow these steps to check the version of FlexLM on Windows:
- Check the version of LMTools through Help > About
- Check in the "Config Services" tab that the paths are pointing to the latest versions of lmgrd and license.dat
- 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:
- Navigate to usr/local/MATLAB/R20XXx/etc or /Applications/MATLAB_R20XXx/etc
- Run the “lmver” command
- Check that you are running the latest version of license manager binaries.
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.
If your network license manager service didn't automatically configure during installation, you will need to add the entry and configure LMTOOLS manually. You can do this from the "Config Services" tab of LMtools program.
1) Open the lmtools.exe
2) Go to the "Config Services" Tab at the top
3) Once in this tab, delete anything already in the "Service Name" field and enter a name for this service (MATLAB License Server, for example). This will be how you identify this service on the "Service/License File" tab.
4) Once the service is named, enter the paths for the service.
A) First, browse to the lmgrd.exe file. This will likely be in your $MATLAB\etc\win{32|64} ($MATLAB\flexlm for releases prior to R2010b) directory.
(NOTE: $MATLAB refers to the directory where MATLAB is installed. In Windows, This is typically C:\Program Files\MATLAB\R20xxx by default.)
B) Next browse to your license.dat file (likely also in the same folder or in the \etc directory). This is the license file that is configured with your SERVER and DAEMON lines. If your license file does not have a SERVER and DAEMON line it, please refer to the following article for assistance adding them:
Why do I get "License Manager Error -13"?
https://www.mathworks.com/matlabcentral/answers/100538-why-do-i-receive-license-manager-error-13
C) Finally, create a plain text file to be the log file, and browse to it. It is recommended that you place this file in the same win{32|64} folder and call it lmlog.txt. (C:\Program Files\MATLAB\R2010b\win32\lmlog.txt) and make sure the "Use Services" and "Start Service at Power Up" boxes are checked.
5) After this is done, click on "Save Service".
Now the service will be in the "Service/License File" tab. Make sure it is highlighted and go to the "Start/Stop/Reread" tab to start as detailed in the installation guide. The "Start Server" button in the "Start/Stop/Reread" tab will start the license manager and allow it to serve out seats if everything else is configured correctly.
If you make any changes to any of the other files or tabs in LMTOOLS, you will want to first stop the server and then start it again in order to implement those changes. If the bar at the bottom of the tab says "Stopping Server", then you can consider the server stopped and start it again. As a note, MathWorks does not recommend using the "ReRead License File" button as it does not produce the desired output of using it. Stopping and starting the license manager in the "Start/Stop/Reread" is the most effective means to update the license manager with any changes you have made.
You can verify that the server is running by clicking the "Perform Status Enquiry" button on the "Server Status" tab. If, after configuring the license manager as a service, you are getting any errors, please contact the Installation and Licensing Team using the following link:
http://www.mathworks.com/support/service_request/
Related Question
- License Manager Error -15
- Is it possible to run the Network License Manager on a computer with other FlexNet applications
- Do I receive License Manager Error -95
- How to install the Network License Manager
- Do I get a Service Error when reinstalling the network license manager on Windows
- Do I receive License Manager Error -18
- How to prevent users from running lmdown, lmremove, or lmreread from a client machine
- How to migrate the MATLAB clients to a new license server when the license server changes
Best Answer