MATLAB Answers

Why do I receive error 1731 during activation?

15 views (last 30 days)
Why do I receive error 1731 during activation saying "Activations are not allowed when License Management is set to Online Licensing?"

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 1 Mar 2019
Edited: MathWorks Support Team on 1 Mar 2019
This error occurs when trying to activate a license/trial (e.g. Login Named User Trial) that does not allow activations.
During an install for a Login Named User trial, a license_info.xml file will get created in the user profile for the user performing the install. If the installation was performed under a different user account (e.g. account with Admin rights) then the license_info.xml file, which is required by MATLAB, will only be found by MATLAB when logged into the computer as that user.
To fix this installation:
1. Download the attached license_info.xml from the link below this Answer (Note, if your browser opens the file instead of downloading it, please download the .zip file instead and extract the license_info.xml from it).
2. Place license_info.xml into {matlabroot}/licenses (where {matlabroot} is your MATLAB installation directory):
C:\Program Files\MATLAB\R20XXx\licenses (Windows)
/usr/local/MATLAB/R20XXx/licenses (Linux)
/Applications/MATLAB_R20XXx.app/licenses (macOS) (Right click on the MATLAB application and click show package contents to open the MATLAB_R20XXx.app folder.)
3. Start MATLAB. You should now be prompted to provide your MathWorks Account login information to access your trial.
Alternatively, the "-licmode online" startup flag can be used to start MATLAB in LNU mode without the need for an xml file. To launch MATLAB with a startup flag, open a command prompt/terminal window and enter the path to the MATLAB executable and the “-licmode online” flag.
Windows:
"$MATLAB\bin\win64\MATLAB.exe" -licmode online
Linux or Mac:
./matlab -licmode online

  6 Comments

Show 3 older comments
Walter Roberson
Walter Roberson on 31 Jan 2016
Guilherme, you might need to use your browser's "Save Link As" feature.
If that does not work, then copy the below into a file named license_info.xml
<?xml version="1.0" encoding="UTF-8"?>
<root>
<ActivationEntry hostname="*" idnumber="1"
matlabroot="*" user="*">
<licmode>online</licmode>
</ActivationEntry>
</root>
Thomas PADIOLEAU
Thomas PADIOLEAU on 25 Feb 2016
Hi, I am also using Ubuntu and I have a error message ("An error has occured") when I try to log in. However I have a proxy, is there any modification to make in the .xml file to take it into account ?
Thank you
Scott
Scott on 4 May 2016
Hi Thomas,
At this time Login Named User licenses do not support proxy-based authentication. If you need to change your activation type to something that will work behind a proxy, please contact MathWorks support:
Thanks,
-Scott
MathWorks Installation & Licensing Support

Sign in to comment.

More Answers (8)


Misha
Misha on 15 Mar 2016
I am also facing same problem and I have tried the license_info.xml way out as suggested by Walter but it didn't work. Plz suggest what else can be done.

  1 Comment

Scott
Scott on 5 May 2016
Hi Misha,
If you are still unable to launch MATLAB after placing this license_info.xml file in your licenses folder, please contact MathWorks support:
Thanks,
-Scott
MathWorks Installation & Licensing Support

Sign in to comment.


Andris Szalai
Andris Szalai on 19 Feb 2017
Try to type into start: 'Matlab activation', then:
Matlab activation (right click) >> Open file location >> Matlab R2016b
It worked for me. I think the activation was successful, but the icon Matlab didn't show, only the one for the activation, and the error was thrown because I tried to "re-activate" it.

  0 Comments

Sign in to comment.


Simon du Plooy
Simon du Plooy on 10 Mar 2017
I had the same issue, however fix was different. I had a trial license but select the designated user license as opposed to the designated computer license. Mathworks had to change the license and then the activation work. Details: Trial License, Matlab R2016b, Mac OS El Capitan

  0 Comments

Sign in to comment.


GIZEM TERCANLI
GIZEM TERCANLI on 14 Dec 2017
Hi, I am also getting the same error.How can I donwload the license_info.xml as .zip file? Because my browser opens the file directly.

  1 Comment

Walter Roberson
Walter Roberson on 14 Dec 2017
In most browsers you can right click the link and choose Save As

Sign in to comment.


Sean Pavlik
Sean Pavlik on 22 Dec 2017
Sorry that I'm not getting this. Do I put the license_info.xml file into the license folder of the matlab application package?

  2 Comments

Walter Roberson
Walter Roberson on 22 Dec 2017
You put the xml file into the licences (with 's') folder that is directly under the top level MATLAB installation folder.
Sean Pavlik
Sean Pavlik on 22 Dec 2017
Alright, I did this and was still given the error.

Sign in to comment.


feili yuan
feili yuan on 31 Jul 2018
I had the same error when I had applied a applicable vision , I chosed the option "Enter the full path to your license file, including the file name "in the login interface and selected license_info(C:\Program Files\MATLAB\R2018a\licenses),then it succeed.

  0 Comments

Sign in to comment.


Sergio Serrano Diaz
Sergio Serrano Diaz on 24 Oct 2018
Im having the same problem, cant fix it by any of the options listed, is there any other possible solution?

  5 Comments

Show 2 older comments
Walter Roberson
Walter Roberson on 25 Oct 2018
This 1731 problem can occur in two circumstances.
One of them involves trial licenses, which typically require internet access to validate the trial each time MATLAB is started; at the moment I do not know how licensing is handled for trials that have to be run with no internet connection.
The second circumstance involves Login Named User licensing, which is used with MDCS (Distributed Computing server) and when running MATLAB on cloud services such as Azure or AWS. Not all licenses can use Distributed Computing or cloud services, and even when the license is entitled, there is a special setup step.
Do either of these situations match your case?
Sergio Serrano Diaz
Sergio Serrano Diaz on 25 Oct 2018
Yes, mine is a trial license but i do have an internet connection at all times
Justin Ghetti
Justin Ghetti on 9 Nov 2018
Hi,
If you are still experiencing this issue, please contact MathWorks support:
-Justin

Sign in to comment.

Tags

No tags entered yet.

Products