Problem with grbgetkey

Uncategorized
Jul 5, 2020
G

While running ``cvx_grbgetkey ‘’ I’m presented with the following error in Matlab:

CVX/Gurobi license key installer

Contacting the Gurobi Optimization license server…done.
The attempt to retrieve the license key failed with the following error:

info  : grbgetkey version 9.0.0, build v9.0.0rc2

info : Contacting Gurobi key server…
info : Key for license ID 467086 was successfully retrieved
info : License expires at the end of the day on 2020-09-03
info : Saving license key…
info : License 467086 written to file /private/var/folders/vp/s43xnjr55_v8kp6p0f71brp00000gn/T/tp784cc6e7_d287_47bf_9985_8b720d043091/gurobi.lic

For information about this error, please consult the Gurobi documentation

http://www.gurobi.com/documentation/5.5/quick-start-guide/node5

Once you have rectified the error, please try again.

Can anyone suggest how to solve this issue?

M

Are you able to get the Gurobi license without involvement of CVX, install it, and use Guroibi under MATLAB without involvement of CVX?: if you can’t do that, perhaps Gurobi support can help.

If you can do all that, I think you should be able to run cvx_setup, and CVX will find Gurobi, making it available for use as a solver by CVX.

G
Replying to #2

I am able to get Gurobi license outside CVX and install it in Matlab. However when I am running cvx_setup, I am getting this output.

CVX: Software for Disciplined Convex Programming ©2014 CVX Research
Version 2.2, Build 1148 (62bfcca) Tue Jan 28 00:51:35 2020

Installation info:
Path: /Users/Aragorn/Downloads/cvx
MATLAB version: 9.5 (R2018b)
OS: Mac OS X x86_64 version 10.15.4
Java version: 1.8.0_152
Verfying CVX directory contents:
WARNING: The following files/directories are missing:
/Users/Aragorn/Downloads/cvx/sedumi/.travis.yml
These omissions may prevent CVX from operating properly.
Preferences:
Path: /Users/Aragorn/Library/Application Support/MathWorks/MATLAB/cvx_prefs.mat
License host:
Username: Aragorn
Host ID: acbc328f5eb5 (en0,192.168.1.101)
Installed license:
Organization: University of Maryland
Contact: Debdipta Goswami (goswamid@umd.edu)
License type: academic
Named user: Aragorn
Host ID: acbc328f5eb5
Expiration: 2021-07-03 (365 days remaining)
Status: verified

Setting CVX paths…already set!
Searching for solvers…5 shims found.
3 solvers initialized (* = default):

  • Mosek 9.1.9 {cvx}/mosek/maci64
    SDPT3 4.0 {cvx}/sdpt3
    SeDuMi 1.3.4 {cvx}/sedumi
    5 solvers skipped:
    GLPK
    Could not find a GLPK installation.
    Gurobi unknown {cvx}/gurobi/maci64
    No valid Gurobi license was found.
    Gurobi_2 unknown /Library/gurobi902/mac64/matlab
    No valid Gurobi license was found.
    Gurobi_3 unknown /Library/gurobi902/mac64/matlab
    No valid Gurobi license was found.
    Gurobi_4 unknown /Library/gurobi650/mac64/matlab
    Invalid MEX-file
    ‘/Library/gurobi650/mac64/matlab/gurobi.mexmaci64’:
    dlopen(/Library/gurobi650/mac64/matlab/gurobi.mexmaci64,
    6): Library not loaded: @loader_path/libut.dylib
    Referenced from:
    /Library/gurobi650/mac64/matlab/gurobi.mexmaci64
    Reason: image not found.
    Saving updated preferences…done.
    Testing with a simple model…done!

To change the default solver, type “cvx_solver <solver_name>”.
To save this change for future sessions, type “cvx_save_prefs”.
Please consult the users’ guide for more information.

M

I suggest you file a support request per http://cvxr.com/cvx/doc/gurobi.html#obtaining-support-for-cvx-and-gurobi , so tjhat the CVX developer can look into it.

K

Hello,
I got the same problem on Windows OS. I tried running Gurobi outside the CVX and ran cvx_setup. Gurobi is now normally working in the CVX environment.

Thanks

1
Replying to #5

Thanks! The problem is successfully solved!

S

Dear all,
I am also facing the same problem, please help.

CVX/Gurobi license key installer
Contacting the Gurobi Optimization license server…done.
The attempt to retrieve the license key failed with the following error:
info : grbgetkey version 9.0.0, build v9.0.0rc2
info : Contacting Gurobi key server…
info : Key for license ID XXXXXX was successfully retrieved
info : License expires at the end of the day on 2021-01-04
info : Saving license key…
info : License XXXXXX written to file C:\Users~.~\AppData\Local\Temp\tpfa6bc21e_f830_485b_92bb_63f38f800ae7\gurobi.lic
For information about this error, please consult the Gurobi documentation

http://www.gurobi.com/documentation/5.5/quick-start-guide/node5

Once you have rectified the error, please try again.
Warning: Escaped character ‘\U’ is not valid. See ‘doc sprintf’ for supported
special characters.

In cvx_grbgetkey (line 338)
info : grbgetkey version 9.0.0, build v9.0.0rc2
info : Contacting Gurobi key server…
info : Key for license ID XXXXXX was successfully retrieved
info : License expires at the end of the day on 2021-01-04
info : Saving license key…
info : License XXXXXX written to file C:---------------------------------------------------------------------------
Now that the license has been retrieved, please run CVX_SETUP to configure
CVX to use the Gurobi solver with the new license.

M

Welcome to the forum.

Please choose from among the advice in the previous posts in this thread. i don’t think there are any new suggestions.

S
Replying to #8

Thank you!!
I tried all the suggestions, I have also opened a tickect on CVX but no reply from them.