ports opened to access devices
|
|
---|---|
Hello, while testing devices on virtual machines, I noticed some ports needed to allow tango to run. Those ports does not seem to be documented for now, I think this could help so I put this here to confirm (I think it then it should be entered in documentation, place to be defined). 1. since TANGO_HOST is associated to an IP and a TCP port (often 10000 or 20000), communication to this server should of course be allowed on TCP port. 2. communication on 20001 TCP port is mandatory for a server running tango-starter service. 3. I remember that those ports are choosen randomly on a given range by default. Since I see on jive the port associated to a device, which is often greater than 20001, I understand TCP communications on port greater than 20002 (from 20002 to 65535?) should be allowed if at least a device runs on the server. Do you confirm those informations? Are there some other port ranges to know, especially for IT teams? Regards
- Philippe
|
|
|
---|---|
Salut Philippe, The Starter device is a Tango device like any other Tango device with respect to the choice of ports by omniORB. So the affirmation "2. communication on 20001 TCP port is mandatory for a server running tango-starter service." is wrong. In our control system, we have Starter devices running on different ports (some of them on ports below 10000). By default (if not specified with ORBendPoint omniORB option), the OS will choose the port number and I guess the port numbers range might change from one OS to another. If you are using events, ZMQ (the OS) will also choose by default some random port numbers for the events. Kind regards, Reynald
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new. |
|
|
---|---|
ReynaldHi Reynald, oh, of course thanks for your attention. I wrote that the port of TANGO_HOST can be choosen, but I did not kept that in mind while writing the other points! Indeed, the devices ports (including starter) are random, and as you said below, one can define a port number if needed. ReynaldI put there the link to the doc for readers: https://tango-controls.readthedocs.io/en/latest/development/device-api/device-server-writing.html#running-a-c-device-server ReynaldBy the way, is there a way to choose the port number as for CORBA?
- Philippe
|
|
|
---|---|
philippeg Yes there is a way but that does not seem very well documented, although I thought we documented it at some point… We should improve that! You can specify the 2 ZMQ ports used by a device server using the following environment variables:
You cannot reuse the same port for different device servers running on the same host.
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new. |
|
|
---|---|
Thanks ! Perhaps we should enhance the documentation about ports configuration, I think current section https://tango-controls.readthedocs.io/en/latest/installation/index.html#getting-started-installation would be the place. For the future, it has to be discussed.
- Philippe
|