Academic License not working

2,480 views
Skip to first unread message

eng.omar...@gmail.com

unread,
Sep 14, 2013, 4:35:57 AM9/14/13
to mo...@googlegroups.com
I received a free academic license from Mosek because I am a graduate student.
When it was expired, I got another new one and replaced the old with the new one. However, MATLAB still says that Mosek license is expired.
My MATLAB version is r2012b
My Mosek version is 7

Thanks in advance

Erling D. Andersen

unread,
Sep 16, 2013, 2:25:13 AM9/16/13
to mo...@googlegroups.com, eng.omar...@gmail.com
It might be that you have the OS variable

   MOSEKLM_LICENSE_FILE

defined and that is pointing to an old license. If that is the case remove then remove the setting. 

If that does not help, then please post the error messages in your reply.


Omar Abdalla ElGendy

unread,
Sep 16, 2013, 8:18:26 AM9/16/13
to Erling D. Andersen, mo...@googlegroups.com
Thanks for the reply

----
Regards,
Omar Abdallah ElGendy
T.A. in Engineering Math. and Physics Dept.
Faculty of Engineering, Cairo University.



S_Ade

unread,
Sep 19, 2014, 11:40:16 AM9/19/14
to mo...@googlegroups.com, eng.omar...@gmail.com
I have the same issue. However, I'm not sure how to remove this OS variable.
I call mosek through yalmip.

Erling D. Andersen

unread,
Sep 21, 2014, 7:50:17 AM9/21/14
to mo...@googlegroups.com, eng.omar...@gmail.com

S_Ade

unread,
Sep 22, 2014, 11:35:56 AM9/22/14
to mo...@googlegroups.com, eng.omar...@gmail.com
Oh thanks.
 However,  I do not have any environment variable by that name (MOSEKLM_LICENSE_FILE)  so the problem persists. 
I'm working a Windows 8.1 platform, Mosek version 7.
Thanks a lot.

Erling D. Andersen

unread,
Sep 23, 2014, 7:30:05 AM9/23/14
to mo...@googlegroups.com, eng.omar...@gmail.com
Inside MATLAB run the command

      mosekdiag

and paste the output into you reply.

S_Ade

unread,
Sep 23, 2014, 1:43:33 PM9/23/14
to mo...@googlegroups.com, eng.omar...@gmail.com
I get this error message from running mosekdiag, even with the new license file in place.

mosekopt: C:\Program Files\Mosek\7\toolbox\r2009b\mosekopt.mexw64
Error using mosekdiag (line 57)
mosekopt returned an error: 1008. [MSK_RES_ERR_MISSING_LICENSE_FILE]

Erling D. Andersen

unread,
Sep 24, 2014, 1:16:00 AM9/24/14
to mo...@googlegroups.com, eng.omar...@gmail.com
MOSEK cannot locate the license file. So you cannot have done what is said in Section 2.1 at


Typically the license file is at

   c:\users\<userid>\mosek\mosek.lic

You cannot have that file.

S_Ade

unread,
Sep 30, 2014, 1:00:08 PM9/30/14
to mo...@googlegroups.com, eng.omar...@gmail.com
It's probably an OS quirk. I re-installed Mosek, so it's working fine now.
Thanks.

Erling D. Andersen

unread,
Oct 1, 2014, 2:23:36 AM10/1/14
to mo...@googlegroups.com, eng.omar...@gmail.com
Good to hear. Have fun with MOSEK.

meram...@gmail.com

unread,
Feb 11, 2015, 7:09:32 AM2/11/15
to mo...@googlegroups.com, eng.omar...@gmail.com
Sir, 
   I am using MATLAB version R2013b, but in add path, as there is no option for R2013b, so I have selected R2013a. Now after typing mosekdiag in matlab: I am getting the error  mosekopt returned an error: 1008. [MSK_RES_ERR_MISSING_LICENSE_FILE]
. Plz help me

ramakant singh

unread,
Feb 11, 2015, 7:13:55 AM2/11/15
to mo...@googlegroups.com, eng.omar...@gmail.com
mosekdiag
Matlab version: 8.2.0.701 (R2013b)
Architecture  : GLNXA64
Warning: The mosek optimizer could not be invoked from the command line. Most likely the path has not
been configured correctly. The mosek optimizer can still be invoked from the MATLAB environment. 
> In mosekdiag at 23 
mosekopt: /home/ramakant/mosek/7/toolbox/r2013a/mosekopt.mexa64
Error using mosekdiag (line 57)
mosekopt returned an error: 1008. [MSK_RES_ERR_MISSING_LICENSE_FILE]
 

Joachim Dahl

unread,
Feb 11, 2015, 7:20:54 AM2/11/15
to mo...@googlegroups.com
This means just what the error message says: MOSEK cannot be used from the command-line since the mosek executable is not in the search path,  but can still use the MOSEK toolbox from Matlab.

The installation instructions for the MATLAB toolbox can be found here:

http://docs.mosek.com/7.1/toolbox/Installation.html

About 10 lines down installation instructions explains how to setup the Matlab path for the different versions.



--
You received this message because you are subscribed to the Google Groups "mosek" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mosek+un...@googlegroups.com.
To post to this group, send email to mo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ramakant singh

unread,
Feb 11, 2015, 7:46:49 AM2/11/15
to mo...@googlegroups.com
In mosek/7/toolbox directory, only R2009b, R2012a , R2012b, r2013a, r2013aom are present. But, I am using matlab version r2013b. As it is not there, I have selected R2013a. Now in mosekdiag command, I am getting error 1008. [MSK_RES_ERR_MISSING_LICENSE_FILE]

Joachim Dahl

unread,
Feb 11, 2015, 7:52:45 AM2/11/15
to mo...@googlegroups.com
From said installation instructions:

  1. % For versions R2013a or newer  
  2. addpath '/home/user/mosek/7/toolbox/r2013a'  
And to clarify possible confusions:  the MOSEK toolbox seems to work just fine. You are receiving a diagnostic warning that MOSEK cannot be run from the command line, most likely because the mosek binary is not in the search path of your terminal or shell,  but it doesn't matter as long as you use MOSEK from within MATLAB.

Are you experiencing problems running any of the Matlab examples in the documentation?

ramakant singh

unread,
Feb 11, 2015, 8:00:13 AM2/11/15
to mo...@googlegroups.com
That is fine. I noticed that thing that we can use R2013a for higher versions also. But, why I am getting the error:
> In mosekdiag at 23 
mosekopt: /home/ramakant/mosek/7/toolbox/r2013a/mosekopt.mexa64
Error using mosekdiag (line 57)
mosekopt returned an error: 1008. [MSK_RES_ERR_MISSING_LICENSE_FILE]

Andrea Cassioli

unread,
Feb 11, 2015, 8:18:46 AM2/11/15
to mo...@googlegroups.com
Hi,
the error message has nothing to do with the matlab toolbox, but with the license.

You should store the license file according to point 2.1 in 


You do not need a token server.

If you plan to store the license file in a different folder you must set the env variable as suggested here



Summarizing: the license file is not in a folder the solver can locate.

ramakant singh

unread,
Feb 11, 2015, 8:28:28 AM2/11/15
to mo...@googlegroups.com
Hii Andrea,
               I am using Ubuntu 13.04 and I have saved mosek.lic in home/ramakant/mosek  directory as specified in the link you mentioned. But I am getting the error. What could be other reasons ??

Erling D. Andersen

unread,
Feb 16, 2015, 12:59:39 AM2/16/15
to mo...@googlegroups.com
Please post whatever error messages you get. Thanks.

p9g...@gmail.com

unread,
Feb 23, 2015, 5:36:15 AM2/23/15
to mo...@googlegroups.com
Hello,

I have the same error....

Please notice that

- the file mosek.lic is located in the folder /home/user/mosek
- the downloaded mosek distribution has been unzipped and placed in /home/user/mosek/7
- the folder /home/user/mosek/7/toolbox/ has been added to the matlab path
- the env. variable $MOSEKLM_LICENSE_FILE is empty

this is the error I get in Matlab

>> mosekdiag
Matlab version: 8.3.0.532 (R2014a)

Architecture  : GLNXA64
Warning: The mosek optimizer could not be invoked from the command line. Most likely the path has not
been configured correctly. The mosek optimizer can still be invoked from the MATLAB environment.
> In mosekdiag at 23
mosekopt: /home/user/mosek/7/toolbox/r2013aom/mosekopt.mexa64

Error using mosekdiag (line 57)
mosekopt returned an error: 1008. [MSK_RES_ERR_MISSING_LICENSE_FILE]


Thanks in advance fon any help

Erling Andersen

unread,
Feb 23, 2015, 2:29:47 PM2/23/15
to mo...@googlegroups.com
Inside MATLAB try

!cat /home/user/mosek/mosek.lic
!mosek -L  /home/user/mosek/mosek.lic

What is the output?


--
You received this message because you are subscribed to the Google Groups "mosek" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mosek+un...@googlegroups.com.
To post to this group, send email to mo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Erling D. Andersen
Mobile      : +4523629520
Homepage: http://erling.andersens.name
Linkedin    : http://dk.linkedin.com/in/edandersen

p9g...@gmail.com

unread,
Feb 24, 2015, 3:17:45 AM2/24/15
to mo...@googlegroups.com
Hi thanks for the answer. Here the output:

>> !cat /home/user/mosek/mosek.lic
VENDOR MOSEKLM
FEATURE PTS MOSEKLM 7.0 23-feb-2016 uncounted \
    VENDOR_STRING=-1*-1*-1*0 HOSTID=DEMO TS_OK SIGN="002A D907 \
    D144 1668 658C 81C5 1B87 9EA3 0866 7B22 00DE 3D01 C0D7 808A \
    FCBC 1C8F 7696 B4B1 F945 345D BF25 0F01 1A50 4094 15A3 8FF4 \
    3952 3098 660F DC00" SIGN2="0E93 B3EA 585A 49B3 4E6F D9CF E934 \
    E245 E9F0 E526 3418 426B 71F4 599F E496 0654 C870 4183 18B5 \
    A19A 3700 ADE1 0399 894F 01E9 3F58 00E9 82F3 CDC9 52BD"
FEATURE PTON MOSEKLM 7.0 23-feb-2016 uncounted \
    VENDOR_STRING=-1*-1*-1*0 HOSTID=DEMO TS_OK SIGN="0C76 5850 \
    29FA D8CB B289 8628 9CEB 85BD 377A 373D 1F55 F3FB A197 F102 \
    162F 02F1 8F4F 6EF8 5C8D B577 B6D1 306C 0CFD A201 3AD9 1D14 \
    BE0D 0BFC C9B6 244A" SIGN2="1487 599A E05D 994C 3733 E4EF A589 \
    B09B 6D74 55AE 712B B607 ED5C 51B6 1E83 04E2 1269 4E3B B119 \
    FB22 E63E C70F 3B67 68F8 6ADF E629 4BEB E2C2 4A0B 48D2"
>> !mosek -L  /home/user/mosek/mosek.lic
/bin/bash: mosek: command not found

Erling D. Andersen

unread,
Feb 24, 2015, 8:27:33 AM2/24/15
to mo...@googlegroups.com
Are you saying

   MOSEKLM_LICENSE_FILE

is empty. That will cause problems. It must not be defined at all. 

So have have not setup the PATH variable. That is ok for MATLAB use but instead of

    mosek -L  /home/user/mosek/mosek.lic

you should do

!/home/user/mosek/7/tools/platform/linux64x86/mosek -L  /home/user/mosek/mosek.lic  /home/user/mosek/7/tools/examples/25fv47.mps

Also what happens if you do

!/home/user/mosek/7/tools/platform/linux64x86/mosek -f

--
You received this message because you are subscribed to a topic in the Google Groups "mosek" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mosek/QvyHCIDmLpI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mosek+un...@googlegroups.com.

To post to this group, send email to mo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Erling D. Andersen

MOSEK APS 
Fruebjergvej 3, Box 16, 
DK-2100 Copenhagen O

p9g...@gmail.com

unread,
Feb 24, 2015, 8:46:10 AM2/24/15
to mo...@googlegroups.com
Here the output, thanks for the support

>> !/home/user/mosek/7/tools/platform/linux64x86/bin/mosek -L  /home/user/mosek/mosek.lic

MOSEK Version 7.1.0.20 (Build date: 2015-2-7 02:42:20)
Copyright (c) 1998-2015 MOSEK ApS, Denmark. WWW: http://mosek.com


*** No input file specfied. No optimization is performed.

Return code - 0  [MSK_RES_OK]
>> !/home/user/mosek/7/tools/platform/linux64x86/bin/mosek -f

MOSEK Version 7.1.0.20 (Build date: 2015-2-7 02:42:20)
Copyright (c) 1998-2015 MOSEK ApS, Denmark. WWW: http://mosek.com

FlexLM
 Version     : 11.11
 Hostname    : computationnecs.inrialpes.fr
 Host ID     : "b8ca3abbb253 b8ca3abbb28e"
 Search path : /root/mosek/mosek.lic

Operating system variables
 LD_LIBRARY_PATH          :
   /usr/local/MATLAB/R2014a/sys/os/glnxa64
   /usr/local/MATLAB/R2014a/bin/glnxa64
   /usr/local/MATLAB/R2014a/extern/lib/glnxa64
   /usr/local/MATLAB/R2014a/runtime/glnxa64
   /usr/local/MATLAB/R2014a/sys/java/jre/glnxa64/jre/lib/amd64/native_threads
   /usr/local/MATLAB/R2014a/sys/java/jre/glnxa64/jre/lib/amd64/server

*** No input file specfied. No optimization is performed.

Return code - 0  [MSK_RES_OK]


edadk

unread,
Feb 25, 2015, 1:45:14 AM2/25/15
to mo...@googlegroups.com, p9g...@gmail.com
It search for the license file

   Search path : /root/mosek/mosek.lic

So you are running the application as the user root. Not you installation claim your user name is user.
So you have mixed something up.

If you place the license file at

  /root/mosek/mosek.lic

it should work. However running applications at the root user is an EXTREMELY bad idea. 
I thought nobody would ever do that.

p9g...@gmail.com

unread,
Feb 25, 2015, 3:50:32 AM2/25/15
to mo...@googlegroups.com, p9g...@gmail.com
I completely agree, but my matlab installtion does not run without root rights (I have no idea why)

edadk

unread,
Feb 25, 2015, 3:53:17 AM2/25/15
to mo...@googlegroups.com, p9g...@gmail.com
So you when you put the license file where you are supposed to put, then does it work?

p9g...@gmail.com

unread,
Feb 25, 2015, 4:17:41 AM2/25/15
to mo...@googlegroups.com, p9g...@gmail.com
Yes apart from this warning

I have output like this


>> mosekdiag
Matlab version: 8.3.0.532 (R2014a)
Architecture  : GLNXA64
[....]
mosekopt is working correctly.
Warning: MOSEK Fusion is not configured correctly; check that mosek.jar is added to the javaclasspath.
> In mosekdiag at 71

edadk

unread,
Feb 25, 2015, 4:19:59 AM2/25/15
to mo...@googlegroups.com, p9g...@gmail.com
If you do not want to use MOSEK Fusion, then that is not a problem.

p9g...@gmail.com

unread,
Feb 25, 2015, 4:26:01 AM2/25/15
to mo...@googlegroups.com, p9g...@gmail.com
OK thanks.

I also solved my problem with root permission (it was of course a problem with file rights), and so mosek is running fine (I deleted the mosek.lic from the root folder)

Thank you very much

francis...@gmail.com

unread,
Feb 14, 2018, 2:28:39 PM2/14/18
to mosek
Hi! I am having essentially the same problem, but for OSX. What should I do?

Michal Adamaszek

unread,
Feb 15, 2018, 4:29:24 AM2/15/18
to mosek
Could you please start a new thread with the details of your problem or write to our support. This one is too long and old.

Ali Albattat

unread,
Aug 24, 2021, 4:17:23 PM8/24/21
to mosek
My issue is having the following error when I run the MATLAB
Mosek error: MSK_RES_ERR_MISSING_LICENSE_FILE (A license cannot be located.)

Michal Adamaszek

unread,
Aug 24, 2021, 4:22:38 PM8/24/21
to mosek
That error means that the license file cannot be located.

In other words you have the license file in one place and Mosek expects it in another.

If you want to know where Mosek expects it, you can run the command "mosekdiag" in Matlab. You will find the path in the output.

Also, you can check out 



Best,
Michal
Reply all
Reply to author
Forward
0 new messages