MATLAB Answers

60

Why do I receive License Manager Error -9?

When I try to launch MATLAB, I get the following error:
License checkout failed. Invalid host. License Manager Error -9

Tags

No tags entered yet.

Products

35 Answers

Answer by MathWorks Support Team on 2 Oct 2019
Edited by MathWorks Support Team on 2 Oct 2019
 Accepted Answer

The best way to resolve a License Manager Error -9 is by reactivating MATLAB with the activation client.
Windows
The activation client is located here:
C:\Program Files\MATLAB\R20XXx\bin\winXX\activate_matlab.exe
Mac
  • Open Finder.
  • Go to "Applications".
  • Right-click or control-click on the MATLAB application icon. (e.g. MATLAB_R2015b.app)
  • Click on "Show Package Contents".
  • Open "Activate.app".
Linux
The activation client is located here:
/usr/local/MATLAB/R20XXx/bin/activate_matlab.sh
Once you have launched the MATLAB activation client:
  1. Select "Activate automatically using the internet."
  2. Log into your MathWorks account.
  3. Select the correct license.
  4. The username field should auto-populate with the correct user name. Leave it as is.
  5. Confirm the activation information.
  6. Click "finish" to complete the activation process.
  7. Restart MATLAB.
Still seeing a License Manager Error -9?
  • The username in the license file does not match
  • The Host ID in the license file does not match
  • You have a Designated Computer MATLAB license and MATLAB is already running under a different user account on this computer.
Confirm your Username and Host ID using the activation client:
  1. Run the activation client and select "Activate manually without using the Internet."
  2. Choose “I do not have a license file. Help me with the next steps.”
  3. Copy your Host ID and Computer Login Name.
  4. Click the back arrow 2 times and choose “Activate automatically using the Internet” then input the appropriate username.
  5. Launch MATLAB using the appropriate user account.
Activation client requires elevated privileges to run? Connection error when Activating automatically? Still seeing a License Manager Error – 9?
How do I activate MATLAB without an internet connection?

  38 Comments

Hi,
If you are still experiencing this issue, please contact MathWorks support:
-Justin
Its showing no file or directory found . Please help me with this
Contact Mathworks for free installation support.

Sign in to comment.


Answer by Dandan Zhang on 12 Mar 2016

Note: It's your Windows User Name rather than Microsoft Account Name.
You can determine your Windows username as follows:
  1. 1.While sitting at the host computer with press and hold the Windows key and press the letter R on your keyboard.
  2. 2.The Run box will appear.
  3. 3.In the box, type cmd and press Enter. The command prompt window will appear.
  4. 4.Type echo %username% and press Enter. (there is a space between echo and %username%)
  5. 5.Your current username will be displayed.

  20 Comments

If I have taken a wrong Windos User's Name,what should I do?
Follow the steps about activating MATLAB in the main Answer.
thank you, problem solved

Sign in to comment.


Answer by Scott Ruffner on 25 Feb 2017
Edited by Scott Ruffner on 25 Feb 2017

I was able to fix the error on my MacBook Pro with the advise above from Scott on the MathWorks Installation & Licensing Support team. I've added a few tips and step by step clarifications for others that may have the same issue.
I was receiving the -9 error. I'm running OS X Yosemite 10.10.5
It seems that you need to know which user on your Mac you are using. To find this out open a terminal window and type "whoami". Copy that result. You will need that at last step of the activation process.
I installed MATLAB in the /Applications folder.
In the terminal window go to wherever you installed MATLAB and find the bin sub-directory. For me this was /Applications/MATLAB_R2016b.app/bin
In the terminal I ran the activation script again by typing "./activate_matlab.sh"
Then I went through the steps "Login to MathWorks" [email/password] >> Next Selected the pre-selected license. >> Next Provide a user name/Login Name: (Paste the user name that you copied when you ran whoami above.)
Then open a new finder window go to Applications and try to run MATLAB_R2016b. It opened this time without errors hope this helps.

  8 Comments

Perfect.
Finding the applications folder for deafult installation
First open terminal
command 1: cd -> this will take you to home
command 2: cd ../../ -> this is the folder where Applications folder is.
Continue the above instructions
it is work mac for me macOS Catalina version (version 10.15.1)
Hi,
If you are still experiencing this issue, please contact MathWorks support:
-Justin

Sign in to comment.


Answer by Michael
on 6 Sep 2014
Edited by Michael
on 6 Sep 2014

Note for Linux users: when I installed MATLAB on my Manjaro OS, I was required to have 'root' as my username, rather than my actual username.
The solution to this (if you're using a terminal, which is the only way I can access MATLAB), is to open MATLAB as 'root' by entering 'sudo su' (which changes you to root), and then typing 'matlab'.
P.S. The '' marks on words and phrases like 'root', 'sudo su' and 'matlab' are written in this post just to highlight the specific terms and commands. Quotes ('') should not be included when inputting commands into the Terminal.

  17 Comments

Hi,
If you are still experiencing this issue, please contact MathWorks support:
-Justin
Same as "For me, it was just needed to run matlab without root privileges. I was trying to run matlab as a root and it was failing. Without 'sudo', it worked fine."
It work mate. I love you. You save my night, going to sleep finally XD

Sign in to comment.


Answer by Calvin McGee III on 5 Feb 2015

Just deactivate license, reactivate it, input your info but this time use your PC's username which you will find in the command prompt as soon as you open it.
Download the license file that is under that username and place it in the correct folder. The path to that folder is given to you when the error window is up. Go that folder first before doing anything. When you find it, there will be a license file already there.
If you are an administrator of the PC remove the license and replace it with the new one. And THEN run MATLAB. It should definitely work for the student version for that is what I have.

  1 Comment

+1 - I did precisely this (Have a B: drive) and it worked fine for my student standalone license.

Sign in to comment.


Answer by Torgeir Troite on 4 Aug 2015

I had changed my username, but the name of the C:\Users\Username folder hadn't changed, causing a username mismatch. Following these instructions solved the problem:

  0 Comments

Sign in to comment.


Answer by Jakob
on 8 Oct 2014
Edited by Jakob
on 8 Oct 2014

The problem appeared for me on Ubuntu Linux 14.04 today, the error message saying that the hostID of my computer did not match the one in the license file.
This was correct, as matlab seems to use the MAC-address of the ethernet controller as the hostID . But somehow (don't know how it happened), my eth0 ethernet device had disappeared , i.e. it was not listed when calling ifconfig -a, lshw showed the ethernet controller as "UNGEFORDERT" and lspci showed the controller, but with no corresponding kernel driver in use (should be e1000e in my case).
matlab obviously took the MAC-adress of my wifi-card instead as hostID which did not match the one in the license of course. Rebooting did not bring my eth0 back.
I then found the following on the internet and did it:
  1. back up this file: /etc/udev/rules.d/70-persistent-net.rules
  2. remove the file
  3. reboot => eth0 was back and matlab started again :)
Hope this helps.

  0 Comments

Sign in to comment.


Answer by Payam
on 1 Dec 2014

I have tried all the step in the comments and in the article itself. it does not work. I dont know what the problem is. Please let me know if you do know the solutiopn

  1 Comment

Hi Maa,
If you are unable to resolve this or any other error, please contact MathWorks support. Installation & Licensing support is free for all MathWorks customers, Professional, Academic and Student alike.
Thanks,
-Scott
MathWorks Installation & Licensing Support

Sign in to comment.


Answer by Rebel
on 15 Feb 2015

I caused this problem by disabling a network adapter. (Opening up the device manager and turning off a device called TAP-Win32 adapter under network adapters heading)
Re-enabling the device fixed the problem for me - I was able to start up Matlab with no problems... Hope this helps someone out there.

  1 Comment

Helped me. Thanks! :)

Sign in to comment.


Answer by Shivaji Rao on 15 Aug 2016

This is what happened when I tried to run MATLAB after installing it on my MAC Book Pro.

  0 Comments

Sign in to comment.


Answer by Sebastian Godoy on 29 Sep 2016

Hey, I also receive this erro. When sudo ./activate_matlab.sh I follow the prompts and everything seems right. However, when following the steps and using sudo to launch matlab it crashes everytime.
what can I do?

  1 Comment

On OS-X, you cannot run MATLAB with a Named User license when sudo'd unless you registered root as the name of the authorized user.
It would not surprise me if Linux has the same difficulty.

Sign in to comment.


Answer by Zachary Hillman on 15 Nov 2016

Instructions for a code -9 error, wrong Host ID on OS-X El Capitan
I have a student version of MatLab_R2012a_student and it wouldn’t run after upgrading to OS-X El Capitan, I got an error code -9.
The instructions above wouldn’t work, after removing the activation folder and license.dat file it wouldn’t run the Activation program, it gave me an error “There was an unexpected exception “null” See log file . . . .”
With help from MatLab I have compiled these instructions:
1) Put activation folder back into MatLab.app folder
2) Get new Host ID
You might not need to do this as the error from MatLab might give you the Host ID its looking for. Then again you might want to check anyway.
In the Terminal window, enter the following command:
ifconfig en1 | grep ether
The MAC address is the value listed next to "ether".
You need this later to get a new license.
3) Deactivate current license
goto license center
https://www.mathworks.com/licensecenter
click on license
click on Install and Activate tab
click on Deactivate a Computer near the bottom
click on the blue X by the license you are ‘updating’
4) Then get new license file
back to license centre and Install and Activate tab
click on Activate to Retrieve License File near the bottom
enter info on release, OS used, and HOSTID (use lower case, no “:”)
Activation Label is used only on the Mathworks website to lists licenses you have
Download the license file
5) License file will have extension of .lic.txt, probably need to change that to .dat
6) Right click on MatLab icon, then choose show contents
Put license.dat file into the folder licenses
Close Matlab.app ‘folder’
MatLab should start, well at least it did for me.
(Note there is also a bug patch program that needs to be used to run MatLab prior to R2014 after upgrading to Yosemite at https://www.mathworks.com/support/bugreports/1098655)

  0 Comments

Sign in to comment.


Answer by Paddy Ryan on 27 Apr 2017

Had the same issue using Matlab on Ubuntu 16.04 LTS running an academic trial.
The solution which worked for me was as follows:
Open Terminal
Type -
cd $MATLABROOT/bin/
This will return:
/bin$
If you type matlab as follows, it loads without any issue
/bin$ matlab
Hope this helps!!

  2 Comments

a a
on 2 Jun 2018
It did not work for me. I still get the same error :(
Hi,
If you are still experiencing this issue, please contact MathWorks support:
-Justin

Sign in to comment.


Answer by David Viljoen on 4 May 2017
Edited by David Viljoen on 4 May 2017

My user name contains a space. As in it is "lastname firstname". When I try to activate I am told that the user name is invalid. I am assuming this is becasue of the space. If I remove the space to make the username "lastnamefirstname" it activates successfully but I then error 9 when opening Matlab. I can't change my default computer name as it is managed by an administrator and used for other applications in our business. Any suggestions?

  1 Comment

Hi David,
If you have trouble activating due to having a username with a space in it, please contact us directly and we can try to find a work around for you. You can find our contact information below:
https://www.mathworks.com/support/contact_us/

Sign in to comment.


Answer by Salman Hassan on 19 Jun 2017

I am facing the problem in the image provided below.Please help

  6 Comments

I still have the same problem I wasted two important days of my time
It is standard to every one to do not use the product
Jan
on 27 Oct 2017
@MINGCHAO DU: Please use flags only to inform the admins and editors, that a message might conflict with the terms of use. Post comments as comments. Thanks.

Sign in to comment.


Answer by Darwin Te on 15 Oct 2017
Edited by Darwin Te on 15 Oct 2017

I resized my VMWare Windows 10 partition from 30gb to 45gb, and changed the snapshot where Matlab is installed to a clone/separate image. Starting matlab gives me this error.
This is because the financial toolbox with IQFeed data provider is not working under Linux so I have to run it under VMware.

  0 Comments

Sign in to comment.


Answer by Xiang cheng Meng on 29 Oct 2017

I want to change the name of user.

  3 Comments

Re-run the activation. You should not have any problems unless you changed computers, up to a limit of about 4 times per year changing the ID.
Having this exact same error.Running the activation again doesn't work and I didn't change machines. Please don't respond if you don't know the answer.
Contact Mathworks for free installation support.
There are too many possibilities for us to be able to give an authoritative list of all of the possible causes. Some of the causes are, for example, specific to exactly which update to which operating system you have installed, and to which patches you have installed.

Sign in to comment.


Answer by Didier Lauwerys on 8 Jan 2018
Edited by Didier Lauwerys on 8 Jan 2018

I had this issue. I followed all the steps described here, without any luck. I finally fixed it by installing MATLAB in a directory with user permission
/home/<user>/Programs/MATLAB/R2017b
This meant I could launch the activation software without needing root permissions. For username, I used the username of my ubuntu login. You can find this with
whoami
The license file was generated as it should and I could use MATLAB after.
You will need to launch matlab later by doing
cd /home/<user>/Programs/MATLAB/R2017b/bin
./matlab
I guess you could make a link in the launch menu, but this will at least allow you to start working with MATLAB.

  0 Comments

Sign in to comment.


Answer by Felix Frank on 17 Jan 2018

Running arch linux, for me the activation program failed because the hostid it recovers is wrong. Probably due to different naming of the ethernet adapter.
Solution: Manually create the license file using the website. Enter the correct hostid and username + install matlab in your home folder so you can start it without root access.

  0 Comments

Sign in to comment.


Answer by Albert Meseguer on 8 Mar 2018
Edited by Albert Meseguer on 8 Mar 2018

All I need is to be able to access somewhere to change the hostID settings but all the software does is show me the error code and the link to this site. I can't do anything! Please help

  2 Comments

Jan
on 8 Mar 2018
Why do you need to change the HostID? Did you contact the technical support already? See the "Contact Us" link on top of this page.

Sign in to comment.


Answer by Ahmed Siddiqui on 10 Mar 2018

I am still facing the same problem after installing uninstalling the software 22 times. My time is being wasted and I need to practice for my tests.
Can someone please help ?

  5 Comments

Jan
on 25 Mar 2018
Again: A re-installation is not useful. The accepted answer explaines:
To resolve this issue, you need to reactivate MATLAB using the
correct host ID/Username
Please try this and if it does not work, contact MathWorks.
How can I change my username?
https://www.computerhope.com/issues/ch000767.htm gives step by step instructions for changing your windows username.
Be careful about whether your existing directories get moved when you change your username.
Note that changing your windows username is seldom the solution to an Error 9 problem. Potentially changing your username could help some Simulink and third party software related problems if your existing username has some non-English characters, so it can sometimes be useful, but it does not tend to affect Error 9.
Generally, Error 9 problems are from having given the wrong name when you registered the software and it asked who would be using the software. On Windows system, be sure to give your local account name, not your Windows Live email address.

Sign in to comment.


Answer by Vikas Gupta on 16 Apr 2018

Hey i am having ubuntu 16.04 so "whoami" prints your username and if you are using sudo then enter root in login name and your username should not contain spaces if it does then change it

  0 Comments

Sign in to comment.




Answer by Suppalerk Jampangern on 2 Sep 2018

I use my student licence on my sister computer(that i use as my own now), so it is a different user. when I installed, I used my old userID instead of my sister's userID. Is that any ways I can change hostID without creating new mathlabID or new userID in my computer?

  2 Comments

If you are still using the same computer, then the hostID did not change. If you changed login names then the easiest thing to do is to go back to the old login, deactivate MATLAB, then go to the new login and activate MATLAB.
Thank you so much. I can use MATLAB now.

Sign in to comment.


Answer by guangpeng liu on 23 Nov 2018

error.png,when i finish the installation , there is a error as showed in the picture ,could anyone tell me how can i solve the problem?thanks

  0 Comments

Sign in to comment.


Answer by Lin Shi
on 16 Dec 2018

Hi I continuously get this error code (License Manager Error -9). I am using matlab 2018b. I have a student licence and a university-assigned licence. I tried to deactivate matlab and then activate using activation manager (everytime, it is like this: when deactivating, it says my university licence is deacivated and when I activate using the student licence, it says it is successfully activated). But when running a code, it continously generate the error code. Can anyone provide some ideas? Thank you!

  0 Comments

Sign in to comment.


Answer by Pinar Toptas on 20 Dec 2018

Hi,
I downloaded Matlab for a username that contains Turkish characters and now it won't open giving the error below. What should I do?
Also, it's my third time downloading Matlab with different usernames in the last month (on different computers). Is there a limit to it?
Thank you.
matlab troubleshoot.png

  0 Comments

Sign in to comment.


Answer by Nelson Chow on 6 Jan 2019

Hi,
I have a requirement to have matlab to run for 2 users on the same computer. I am happy to pay for the licenses. How can I achieve this?
Thanks
CC

  2 Comments

Does it happen to be the case that only one person at a time will need to use MATLAB, and that they will be sitting in front of the computer (not remote access) ? If so then one approach would be to get a single Node Locked license. Any number of people can use such a license, but only one at a time.
Hi Walter,
No remote login, but the first instance will be running when 2nd instance is logged in.
Imagine I have a large dataset that needed to be processed, and it will take days. I need the computation to continue and I will log onto another instance and work on other stuff.
Any idea would be helpful.
Cheers,
CC

Sign in to comment.


Answer by Ian Hunter on 8 Jan 2019

When I ran into this error, it was on a computing cluster. The cluster's matlab license had expired. Issue was resolved as soon as they updated their matlab license.

  0 Comments

Sign in to comment.


Answer by Shailja Shailja on 16 Jan 2019

I got the same error, I activated the MATLAB again. The issue was resolved for me.

  0 Comments

Sign in to comment.


Answer by Jakub Bialek on 24 Apr 2019
Edited by Jakub Bialek on 24 Apr 2019

Dear support,
I need to install a toolbox support files that require admin privileges. Unfortunately, during the installation, Matlab does not ask for admin credentials. Instead, it throws error of inssuficient privileges and quits the installation. The only solution would be to use my admin account to run the Matlab but it throws error -9. Is there any other way to install that extension on a system with limited privileges? I cannot run Matlab with the admin rights for the same reason.
Thanks for help!

  4 Comments

Show 1 older comment
Windows 7 Enterprise.
Jan
on 25 Apr 2019
@Jakub: By the way, this is the public forum in which mainly voluntary Matlab users are posting answers. If you want to contact the official support of MathWorks, use the "Contact Us" link on top of this page.
If you have the credentials for the admin privileges, you can give your local account admin privileges temporarily also. Do this, install the toolbox and remove the elevated privileges from youir personal account afterwards.
If this idea is successful, you will see, that you cannot accept it as a working solution. So prefer to post a question in your own thread, instead of attaching it as a pseudo-answer in another thread.
No, it's company policy enfroced. But thank you for pointing out wrong board for asking such questions. I will contact the support.

Sign in to comment.


Answer by Louisa Lohn on 14 May 2019

I still have error-9 even though I logged off my old computer from the license and the system.
In my MathWork account my old computer is also no longer listed and the license is released.
What can I do now?

  1 Comment

Error -9 never has to do with licenses on other systems: it is always about the [effective] account of the person executing MATLAB not being the account the license for this machine is registered against. For example, the license having been activated for user "root" but the user not running as "root". Or the license having been activated for a Window's users Microsoft Live account when instead it had to be registered for the user's local machine account.
On Mac and Linux, the license must be registered to the same name that shows up in the shell command
whoami
On MS Windows, the license must be registered to the same name that shows up in Windows Command Shell command
echo %USERNAME%

Sign in to comment.


Answer by Andrew Janke on 3 Oct 2019

Ouch, dude. That's not a great user experience. I got this same problem when I upgraded my iMac to a newer hardware version. Props to you for the "Troubleshoot" button bringing up this (relevant, correct) answer, but seems like the license transfer process could be made easier, especially for the case of restoring a computer from backup to new hardware.

  2 Comments

Abas Elmi on 24 Oct 2019 at 19:17
how can i solve this problem
Hi,
If you are still experiencing this issue, please contact MathWorks support:
-Justin

Sign in to comment.


Answer by Gregor Dempke on 19 Oct 2019 at 17:10

gdempke

  0 Comments

Sign in to comment.