Testing your license

Once you have obtained a license key for your machine, you are ready to test your license using the Gurobi Interactive Shell. To do this, type gurobi.sh in a Terminal window. The shell should produce the following output:

Using license file /opt/gurobi/gurobi.lic
Set parameter LogFile to value gurobi.log

Gurobi Interactive Shell, Version 9.1.2
Copyright (c) 2021, Gurobi Optimization, LLC
Type "help()" for help


If you are running as a client of a Gurobi Compute Server, the message above will be preceded by a message like this:

Capacity available on 'myserver' - connecting...
Established HTTP unencrypted connection

If you are using the Gurobi Instant Cloud, the message above will be preceded by a message like this instead:

Waiting for cloud server to start (pool default)...
Capacity available on 'default' cloud pool - connecting...
Established HTTPS encrypted connection

Congratulations, your license is functioning correctly! You are now ready to use the Gurobi Optimizer. The next section will show you how to solve a simple optimization model.

Possible errors

If the Gurobi shell didn't produce the desired output, there's a problem with your license. We'll list a few common errors here.

The following message...

ERROR: No Gurobi license found (user smith, host mymachine, hostid 9d3128ce)
indicates that your gurobi.lic file couldn't be found.

Do you have the appropriate permissions to read the file? Missing read permissions for the file or the directory is a common problem, particularly if someone else performed the installation.

Did you use a non-default license file location? When you run the Linux version of the Gurobi Optimizer, it will look for the gurobi.lic key file in three different default locations. It will always look in your home directory. In addition, Gurobi Optimizer 9.1.2 will also look in /opt/gurobi and /opt/gurobi912. If you used a non-default license key file location, you should set environment variable GRB_LICENSE_FILE to point to the license key file. See Setting environment variables for details on how to do this.

Important note: the environment variable should point to the license key file itself, not to the directory that contains the file.

The following message:

ERROR: HostID mismatch (licensed to 9d3128ce, hostid is 7de025e9)
indicates that your gurobi.lic isn't valid for this machine. You should make sure that you are using the right gurobi.lic file.

If you are running as a client of a Gurobi token server and receive this message:

ERROR: Failed to connect to token server 'myserver' (port 41954)
the token server isn't currently running. If you receive this message:
ERROR: No TOKENSERVER specified for TOKEN license
your license file is missing the TOKENSERVER= line that provides the name of your token server. Please consult the section on setting up a token server.

If you are running as a client of a Gurobi Compute Server and receive this message:

ERROR: No server available
the Compute Server isn't currently running. Please consult the section on setting up a Compute Server.

If, after following the instructions, you still experience problems while setting up or testing your license, please visit our support site for assistance.

Try Gurobi for Free

Choose the evaluation license that fits you best, and start working with our Expert Team for technical guidance and support.

Evaluation License
Get a free, full-featured license of the Gurobi Optimizer to experience the performance, support, benchmarking and tuning services we provide as part of our product offering.
Academic License
Gurobi supports the teaching and use of optimization within academic institutions. We offer free, full-featured copies of Gurobi for use in class, and for research.
Cloud Trial

Request free trial hours, so you can see how quickly and easily a model can be solved on the cloud.