Search code examples
ice

Any way to specify node port / port range for IceGrid server of ZerocIce?


We are using IceGrid for one of our distributed services. So our client is communicating directly with registry that is keeping the records of running servers / nodes which are providing the service. We are using default values for most of the configurations. And now we have encountered one problem: it is mentioned in the manual1 and manual2 of IceGrid that the client uses indirect binding and the server uses a port that is assigned by the operating system from the ephemeral port range. But our network policy doesn't allow access of port numbers below 10000. So I am wondering if there is some configuraiton option which specifies the port or port range (so that we can explicitly tell the node to use some port number larger than 10000 and allow the access of such ports in the network policy.

We tried to use IceGrid.Node.Endpoints=tcp -h OUR_IP_ADDRESS -p 10232. But it doesn't seem to work since the assigned port is still random (which sometimes is below 10000) but not 10232.

Does anyone have similar experience? Thank you very much!


Solution

  • Setting a fixed port for the IceGrid node process with IceGrid.Node.Endpoints=tcp -h OUR_IP_ADDRESS -p 10232 will only ensure that the IceGrid node process uses this port. It won't have any effect on the configuration of the servers managed by the IceGrid node.

    You will need to update the server endpoint configuration to use fixed ports as well (with the -p PORT option) if you want to ensure these servers use port numbers > 10000.

    Another, easier, option would be to update your operating system configuration to ensure ephemeral ports are allocated within a range that fits your policy. Updating this configuration most likely requires administrative privileges however.