Important note: most Gurobi licenses do not use the token server. You should only follow these instructions if your gurobi.lic file contains the line TYPE=TOKEN.
If you are using a floating or single-use license, you will also need to start the Gurobi token server before you can use the Gurobi Optimizer. The next step depends on your platform. You should consult Activating a Windows token server, or Activating a Linux token server, as appropriate. Note that a Mac OS system cannot currently be used as a token server.
Activating a Windows token server
If you have purchased a single-use or floating license (look for TYPE=TOKEN in your license key file), you will need to set up a Gurobi token server. For a single-use license, the token server must run on the licensed machine. For a floating license, you will need to choose a single machine to act as the token server. You should follow the instructions in this section if you will be using a Windows machine as your token server (note that the clients for floating licenses don't need to be Windows machines). The first part of this section gives instructions for setting up the token server. Later in this section we give instructions for setting up client licenses. To be clear, client machines for floating licenses do not need to run the token server. Their licenses simply need to indicate where the token server is running.
On a Windows system, you will need to start the token service by selecting the Gurobi Token Server menu item in the Gurobi Optimization folder of the Start menu. You should only do this after you have installed the Gurobi license key file.
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 grbd.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 grbd.exe to the firewall exceptions list. In Windows Vista or Windows 7, you do this by selecting Allow a program through Windows firewall under the Security area of the Control Panel. In Windows XP, you do this from the Windows Firewall selection under the Control Panel. You should add grbd.exe to the list of exceptions.
Once the token service has been started, you should see the grbd service listed in the Services tab of the Task Manager. To start or stop the service, click on the Services button at the bottom-right of the Services tab, and then right-click on the Gurobi License Manager item on this screen.
You can also start or stop the Gurobi License Manager service from the command line. Running grbd -h lists command-line options. Issuing a grbd -s command stops a running license service. Issuing a grbd -v command starts the license service in verbose mode. Verbose mode produces a log message each time a token is checked in or out.
To upgrade from an earlier version of the Gurobi Optimizer, you will need to perform the following steps (on the machine running the token server):
All output from the Gurobi License Manager goes to the Windows Event Log. You can access this in Windows Vista or Windows 7 through the Event Viewer. Type Event in the search box under the Start menu to launch the viewer.
To set up client licenses, you should install the gurobi.lic file on every machine that will be using the token server (using the license installation instructions given above). Alternatively, you can use a simpler client license key file that only contains the name or IP address of the token server machine:
TOKENSERVER=mymachine.mydomain.comor
TOKENSERVER=192.168.1.100You would of course substitute the name or IP address of your token server.
You can now try Testing the license.
Activating a Linux token server
If you have purchased a single-use or floating license (look for TYPE=TOKEN in your license key file), you will need to set up a Gurobi token server. For a single-use license, the token server must run on the licensed machine. For a floating license, you will need to choose a single machine to act as the token server. You should follow the instructions in this section if you will be using a Linux machine as your token server (note that the clients for floating licenses don't need to be Linux machines). The first part of this section gives instructions for setting up the token server. Later in this section we give instructions for setting up client licenses. To be clear, client machines for floating licenses do not need to run the token server. Their licenses simply need to indicate where the token server is running.
On a Linux system, you will need to start the token server daemon by running program grbd (with no arguments) on your license server machine. You only need to do this once -- the token server will keep running until you stop it (or until the machine is shut down). Be sure that the license key file has been installed before running this program. Note that the token server runs as a user process, so you do not need root priviledges to start it.
Note that if you would like the license server to restart when the machine is rebooted, you should ask your system administrator to start it from /etc/rc.local. If your Gurobi installation and license key file are in their default locations, then adding the following should suffice:
/opt/gurobi500/linux64/bin/grbd
To stop a running token server, you should simply kill the grbd process. You can use the ps command to find the relevant process ID, and the kill command to terminate that process.
To upgrade from an earlier version of the Gurobi Optimizer, you will need to perform the following steps (on the machine running the token server):
Output from the token server goes to the system log (/var/log/syslog). You should see a message similar to the following when you start the server:
Mar 7 12:37:21 mymachine grbd[7917]: Daemon started: Sat Mar 7 12:37:21 2009By 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.
To set up client licenses, you should install the gurobi.lic file on every machine that will be using the token server (using the license installation instructions given above). Alternatively, you can use a simpler client license key file that only contains the name or IP address of the token server machine:
TOKENSERVER=mymachine.mydomain.comor
TOKENSERVER=192.168.1.100You would of course substitute the name or IP address of your token server.
If you run into trouble accessing the token server, check to see if the server machine is running firewall software (like Bastille or ipfilter) that is blocking access to some ports . The Gurobi token server uses port number 41954 by default, so you'll need to open access to that port on the server. Please consult the documentation for your firewall software to determine how to do this. If there's a conflict on the default port, you can choose a different one by adding a PORT line to both the server and the client license key files:
PORT=46325You can choose any available port number.