The purpose of a token server client license is quite simple: it tells the client where to find the Gurobi token server. You can create this file yourself using a text editor. The client gurobi.lic file typically contains a single line of text:
TOKENSERVER=mymachine.mydomain.com
or:
TOKENSERVER=192.168.1.100
You should of course substitute the name or IP address of your token server in the example above.
If your token server was configured to use a non-default port, you'll also need a line that provides the port number:
PORT=46325
Other license file options
The client license file may also include a few optional lines. A SERVERTIMEOUT line allows you to specify the timeout (in seconds) in case the token server is unavailable. The default value is 30 seconds. If the client program is unable to contact the server for more than the specified amount of time, the client will quit with a network error.
A PASSWORD line allows you to connect to a password-protected token server (you'll need to get the password from the owner of the token server).
A more complex client token file might look like this:
TOKENSERVER=192.168.1.100 SERVERTIMEOUT=10
PASSWORD=abcd1234
We strongly recommend that you place your client gurobi.lic file in a default location for your platform. Setting up a non-default location is error-prone and a frequent source of trouble. If you do need to store the license file somewhere other than the default location, please see Where do I place the Gurobi license file (gurobi.lic)? for important details.
Using a client license on the token server machine
If your client and the token server are both running on the same machine, they can share a single gurobi.lic file. You just need to add the following line to the gurobi.lic file you obtained from our website:
TOKENSERVER=localhost
The token server will ignore this line, and the client will ignore everything but this line.
Your other option when both client and server are running on the same machine is to create a separate gurobi.lic file for the client, and to set the GRB_LICENSE_FILE environment variable to point to this file.
Comments
0 comments
Article is closed for comments.