Clear Filters
Clear Filters

Updating license file on License server

37 views (last 30 days)
I installed a network license server for Matlab 2023a and it is up and running. I now need to change the license as some academics want to use 2023b. I have generated the new license and copied over the top 2 lines. I beleive looking at the binaries for the server and the vendor daemons that they are the same as those currently available. My question is there are 71 licenses currently checked out on the server. If I stop the server and update the license file and restart will this affect those users?
  1 Comment
Stuart Findlay
Stuart Findlay on 27 Oct 2023
This is what I ended up doing got no complaints so all good. thanks

Sign in to comment.

Accepted Answer

Jaswanth on 27 Oct 2023
Hi Stuart Findlay,
I understand that you would like to know if stopping the server and updating the licenses would affect the users who are currently checked out on the server. It is recommended to update license files on the network server at a time when users are least likely to be accessing a MATLAB license, as the procedure requires you to stop and start the network license manager.
Please refer the following documentation on Update or Modify Network License Files” for further information:
Hope this Helps.

More Answers (1)

Walter Roberson
Walter Roberson on 27 Oct 2023
Historically the FlexM license manager provided a utility named lmreread that would tell the MLM to re-read the license file without stopping the license manager. However, the Mathwork's-provided version of that utility says to use lmstart instead -- which does stop the license manager and restart it.
When the license manager is stopped, all active licenses effectively are invalidated -- and if matters are as they were when I was adminstering, no log entry will be made indicating the termination of the license.
Active MATLAB sessions check in with the license manager about every 10 minutes. If they suceed iin contacting the MLM and MLM says "your license is not valid anymore", then the clients would (IIRC) ask MLM for a new license. If the client is sucessful, then there would either be no message at all given to them, or else at most it would give a message saying that it had lost the license and was retrying it.
The client would be unsucessful in re-contacting MLM the first time if the license server were down for long enough. If it were down for more than 10 minutes then some of the sessions should fail to renew at least once. But just by chance it is possible that a client was trying to renew even just in a 1 or 2 second interval during which the license manager was being re-launched, so even a relatively fast manager restart could potentially end up with a renewal failure.
If a renewal fails, then MATLAB will issue a warning message that it will keep retrying 3 (IIRC) times. It will permit the user to keep using MATLAB during the retry time. If it does not manage to get back in touch by the end of the half hour, it will give the user about 10 minutes to save their work and then will exit MATLAB.
Now, because this process loses existing license connections, then due to "race conditions", if you are tight on licenses, it could happen that someone who did not have a license before would be granted a license, potentially making it unavailable for someone who had a license before the restart.
For example if you had 3 Image Processing Toolbox licenses and they are all checked out, normally the next person who asked for one would be refused. But if you bounce the license manager, then in the (up to 10 minutes) before the three existing sessions ask for the license, someone else might ask for a license, and because as far as the manager is concerned no licenses are checked out yet, the new person might be granted the license. If that happened, the last of the three people whose license were being automatically renewed would be told that no licenses were available... and might potentially be given 10 minutes to save and exit (not sure, it's been rather some time, perhaps the functions just stop running if it isn't a MATLAB license itself involved.)


Find more on Manage Products in Help Center and File Exchange




Community Treasure Hunt

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

Start Hunting!