grb_rs on non-default port

300 views
Skip to first unread message

T.

unread,
Apr 11, 2015, 9:45:21 AM4/11/15
to gur...@googlegroups.com
I want to start grb_rs on a non-default port. I added PORT=22222 to the license file. I checked that grb_rs is running on this port. When I execute gurobi_cl --server=127.0.0.1 --status , it tries to connect to port 61000. How can I change the port that gurobi_cl uses?

I am using Gurobi 6.0.3 on linux.

Renan Garcia

unread,
Apr 12, 2015, 7:37:45 AM4/12/15
to gur...@googlegroups.com
Please see http://www.gurobi.com/documentation/6.0/refman/firewalls.html for details on how to use non-default ports with Gurobi Remote Services. In particular, you must include a PORT= statement in both the client and server license files to choose a different *range* (e.g., when setting PORT=22222, Gurobi Remote Services would use ports 22222-24222 instead).

On Apr 11, 2015, at 8:32 AM, T. <luft...@gmail.com> wrote:

I want to start grb_rs on a non-default port. I added PORT=22222 to the license file. I checked that grb_rs is running on this port. When I execute gurobi_cl --server=127.0.0.1 --status , it tries to connect to port 61000. How can I change the port that gurobi_cl uses?

I am using Gurobi 6.0.3 on linux.

--

---
You received this message because you are subscribed to the Google Groups "Gurobi Optimization" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gurobi+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

T.

unread,
Apr 12, 2015, 7:09:18 PM4/12/15
to gur...@googlegroups.com
For debugging purposes, this is on the same host. So $GRB_LICENSE_FILE is always pointing to the same file. Still, the server listens on port 22222 (checked with lsof -i ), while gurobi_cl --server=127.0.0.1 --status says:
Unable to connect to Remote Services on '127.0.0.1' (port 61000).
Also, strace tells me that it is really trying to connect to port 61000.

Greg Glockner

unread,
Apr 20, 2015, 11:55:24 AM4/20/15
to gur...@googlegroups.com
Currently, the only way to set a non-default port with the command-line is to set everything in the license key file; if you set --server=something, then it will only use the default port.

T.

unread,
Apr 21, 2015, 1:54:04 AM4/21/15
to gur...@googlegroups.com
Ok, thank you for the information.

T.

unread,
Apr 21, 2015, 1:34:51 PM4/21/15
to gur...@googlegroups.com
Is there a way to set up a worker pool through the license key file? I want to use the distributed mip feature, not a gurobi compute server.

Or is there maybe another way to do distributed mip on a non-default port (e.g. through C API)?

Ed Rothberg

unread,
Apr 23, 2015, 1:49:05 AM4/23/15
to gur...@googlegroups.com

You can use a non-default port if you include a PORT= line in both the client and server license files.

Ed


T.

unread,
Apr 23, 2015, 5:27:29 AM4/23/15
to gur...@googlegroups.com
I guess, we misunderstand each other. I want to solve a MIP using the distributed MIP feature from the command line on a non-default port. How can I do this using gurobi_cl?

I start the workers using grb_rs on 2 nodes. They listen to port 22222 (checked via lsof -i). If I then say:

gurobi_cl TimeLimit=7200 WorkerPool=host1,host2 DistributedMIPJobs=2 Threads=8 miplib2010/air04.mps.gz

it tries to connect to port 61000 (checked via strace). PORT=22222 is set on all machines in $GRB_LICENSE_FILE.


If there is a C API call that can start distributed MIP on a given port, I could also write a small C program, but I didn't find such an API call.

Ed Rothberg

unread,
Apr 24, 2015, 4:33:56 PM4/24/15
to gur...@googlegroups.com
I want to solve a MIP using the distributed MIP feature from the command line on a non-default port. How can I do this using gurobi_cl?

I took a careful look, and you are right that this isn't possible in 6.0.  We've never actually heard of anyone using an alternate port in Compute Server, so we didn't take the time to add that feature for distributed MIP.  I have added it for our next release, though (and confirmed that it works).

Can you tell me why you need to use an alternate port?  As I mentioned, you may be the first person to have told us that they needed this.

Ed


T.

unread,
Apr 24, 2015, 4:44:29 PM4/24/15
to gur...@googlegroups.com
Thanks Ed!

On our cluster, gurobi sometimes fails to open a socket. I could not really figure out why, so I wanted to try some different ports. Maybe something else is using this port.

Do you already have any plans when this new version will be released?

T.

unread,
Apr 28, 2015, 9:29:40 AM4/28/15
to gur...@googlegroups.com
I now use LD_PRELOAD to redirect the connections to other ports. This seems to work.
Reply all
Reply to author
Forward
0 new messages