Using a non-default license file location
When you run the Windows version of the Gurobi Optimizer, it will look for the gurobi.lic
key file in two different default locations: c:\gurobi and c:\gurobi800 (for Gurobi 8.0.0). Note
that these default paths are absolute, so for example Gurobi will look for the license key file in
c:\gurobi, even if the software is installed in d:\gurobi. Note that the token server won’t look
for the license file in your home directory (it runs under username LocalService, so it doesn’t have
access to your home directory). If you would like to use a non-default license key file location, you
can do so by setting a system 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.
Once you have followed the steps above and have obtained a license key file, your next step is to
start the token server.
4.3.2 Starting a token server
Important note: most Gurobi licenses do not use the token server. You should
only follow these instructions if you are setting up a floating license. If you are
not sure whether you need to start a token server, you can examine the contents of
your gurobi.lic file. If it contains the line TYPE=TOKEN, and does not contain the line
MACHINELIMIT=0, then you need a token server.
On a Windows system, you can start the token service by selecting the Gurobi Token Server menu
item from the Gurobi folder of the Start menu. You should only do so after you have installed the
Gurobi license key file.
By default, the token server only produces logging output when it starts. To obtain more detailed
logging information, start the token server with the -v switch. This will produce a log message
each time a token is checked in or out.
The token server runs as a Windows service. If you’d like to run it in the foreground, start it from
and command window and use the -n switch.
Firewalls
The next step after starting the Gurobi token server depends on your anti-virus software and
firewall settings. Most anti-virus software will immediately ask you to confirm that you are allowing
program grb_ts.exe to receive network traffic. Once you confirm this, the token server will start
serving tokens. If you don’t receive such a prompt, you will need to add grb_ts.exe to the firewall
exceptions list. To do this, select Allow a program through Windows firewall under the Security
area of the Control Panel (labeled Allow an app through Windows firewall in Windows 8).
Some machines have more restrictive firewalls that may require additional action. The Gurobi
token server uses port 41954 by default. If you are unable to reach the token server after taking
the steps described, you should ask your network administrator for more information on how to
open the required port.
17