No valid Gurobi license was found (in spite of having a license)

I am repeatedly getting this error:
“No valid Gurobi license was found” (when entering “cvx_setup cvx_license”)
in spite of having a license and putting it in via the “cvx_grbgetkey xxx…” command.

Can anyone please tell me what’s the issue here?

Now that the license has been retrieved, please run CVX_SETUP to configure
CVX to use the Gurobi solver with the new license.

cvx_setup cvx_license

CVX: Software for Disciplined Convex Programming ©2014 CVX Research
Version 2.1, Build 1110 (66e9a9c) Wed Jun 10 21:43:38 2015

Installation info:
Path: C:\cvx
MATLAB version: 8.6 (R2015b)
OS: Windows 8 amd64 version 6.2
Java version: 1.7.0_60
Verfying CVX directory contents:
No missing files.
Path: my path…
License host:
Username: graph2
Host ID: my id
Installed license:
Organization: Stony Brook University
Contact: Mahdin Mahboob (
License type: academic
Named user: graph2
Host ID: //
Expiration: 2017-02-18 (366 days remaining)
Status: verified

Setting CVX paths…already set!
Searching for solvers…5 shims found.
3 solvers initialized (* = default):
Mosek {cvx}\mosek\w64

  • SDPT3 4.0 {cvx}\sdpt3
    SeDuMi 1.34 {cvx}\sedumi
    2 solvers skipped:
    Could not find a GLPK installation.
    Gurobi {cvx}\gurobi\w64
    No valid Gurobi license was found. (Please note that this
    license is not the same as the CVX license; it must be
    obtained directly from Gurobi Optimization.) If you do have
    a Gurobi license, the the Gurobi MEX file could not find it.
    Please consult the Gurobi documentation for assistance.
    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.

Where is the license stored? Try moving it to your home directory, and renaming it to gurobi.lic.

Thanks, but I am getting the following error now:

Can you please help me identify the problem?

I think I figured the problem - it is because I am trying to access from my home (non-academic) network. Will go try again in the morning in my university lab. Thanks.

You could just move the license from its current location to the new one. It will be the same license if you download it again.

The problem was solved, thanks a lot.

I have the same problem, how did you fix it?