Documentation


Starting Remote Services as a Process

Once you've installed the Remote Services package (including retrieving and installing your license file and, for Linux users, setting your PATH variable), starting grb_rs as a standard process is quite straightforward. From a terminal window with administrator privileges, simply issue the following command:

> grb_rs
This will start Remote Services agent on the default port (port 80).

You should see output like the following...

info : Reading configuration file: /home/jones/gurobi_server811/linux64/bin/grb_rs.cnf
info : Gurobi Remote Services starting...
info : Platform is linux
info : Version is 8.1.1 (build v8.1.1rc0)
info : Variable GRB_LICENSE_FILE is not set
info : License file found at /home/jones/gurobi.lic
info : Node address is server1
info : Node FQN is server1
info : Node has 8 cores
info : Using data directory /home/jones/gurobi_server811/linux64/bin/data
info : Data store created
info : Available runtimes: [8.0.0 8.1.0 8.1.1]
info : Public root is /home/jones/gurobi_server811/linux64/resources/grb_rs/public
info : Starting API server (HTTP) on port 80...

If you do not have administrator privileges or if the default port is already in use, you will see an error about opening the port. For example, on Linux you might see an error like this:

fatal : Gurobi Remote Services terminated, listen tcp :80: bind: permission denied
or
fatal : Gurobi Remote Services terminated, listen tcp :80: bind: address already in use
Note that grb_rs does not have to be run with elevated privileges, but it does need elevated privileges to use the default port 80.

If you'd like to run grb_rs on a non-default port, use the --port flag or set the PORT property in the configuration file. For example:

> grb_rs --port=61000

The Remote Services agent (grb_rs) needs a directory to store various files, including the runtimes, job metadata, job log files, etc. The default location is a directory named data, located in the same directory as the grb_rs executable (<installdir>/bin/data). If you have a data directory in your current directory, it will be taken first.

If starting grb_rs produces an error message that indicates that there was a problem creating the storage service (as shown below), a likely cause is that another grb_rs process is already running.

fatal : Error creating storage service: Error opening data store: timeout

If you wish to start multiple grb_rs processes on the same machine for testing purposes (this is not recommended for production use), you will need to make sure each instance of grb_rs is started on a different port and using a different data directory. The command grb_rs init will help you by copying the default configuration and the data directory into a current directory.

For example, to start two nodes on the same machine with a hostname of myserver:

  1. In a first terminal window, create a new directory node1,
  2. Change your current directory to node1 and run grb_rs init
  3. Start the first node:
    grb_rs --port=61000
    

  4. In a second terminal window, create a new directory node2,
  5. Change your current directory to node2 and run grb_rs init
  6. Start the second node on a different port and join the first node:
    grb_rs --port=61001 --join=myserver:61000