Difficult to debug from the information you provided… Seems weird indeed…
Do you see anything strange in the Device Info from sys/database/2 when you compare it to sys/tg_test/1?
Nothing special on your network between the 2 machines? No firewall? No TCP port blocked?
TANGO_HOST environment variable well defined on both sides?
I do not see anything in the Device info from sys/database/2.
It only contains:
Device Info
Device: sys/database/2
type_id: IDL:Tango/Device_4:1.0
iiop_version: 1.2
host: [HOSTNAME] ([SERVER IP])
port: 20000
Server: DataBaseds/2
Server PID: 7794
Exported: true
last_exported: 4th November 2017 at 11:39:04
last_unexported: 4th November 2017 at 11:39:01
Polling Status
When comparing to the output of Device info of sys/tg_test/1, there is one thing which difffers: the error message.
Device Info
Device: sys/tg_test/1
type_id: IDL:Tango/Device_4:1.0
iiop_version: 1.2
host: [HOSTNAME] ([SERVER IP])
port: 59621
Server: TangoTest/instanceTangoTest1
Server PID: 7110
Exported: true
last_exported: 4th November 2017 at 11:37:29
last_unexported: 4th November 2017 at 11:37:08
Polling Status
Desc -> Cannot import sys/tg_test/1 :
org.omg.CORBA.TRANSIENT: Retries exceeded, couldn't reconnect to [SERVER IP]:59621 vmcid: 0x0 minor code: 0 completed: No Reason -> TangoApi_CANNOT_IMPORT_DEVICE
Origin -> Connection.dev_import(sys/tg_test/1)
Desc -> Cannot import sys/tg_test/1
Reason -> TangoApi_CANNOT_IMPORT_DEVICE
Origin -> Connection.build_connection(sys/tg_test/1)
Since the sys/databaseds/2 and sys/tg_test/1 are executed from the same client, TANGO_HOST is defined for both of them.
There is no blocked port and no firewall is locally configured, I will check with the sysadmin if some ports are blocked on the network.
note that events might not work as the zmq sockets cannot be specified AFAIK. Zmq will choose sockets that are free based on its own internal algortihm. If you need events to work through your firewall then you should put in a feature request.
Another way of accessing a device via a public network is to use the REST api. You need the REST server for Tango to do the translation form http to CORBA/ZMQ.
Ok, thank you for the precision Andy.
It should not be necessary, we currently use the public network for testing, but we do not access to real devices through this.
After some time, I wonder if there is any way to configure the port DS will use when launching automatically?
Currently, one can specify a port when launching through command line with
It could be nice to configure once the port constraint, since it will avoid an error if someone launch a DS without remembering this port constraint.
The goal could be either to keep the same port or to impose a port in a given range.
You mean to have a property in the database per instance of a server with the port number?
If yes, this is how we do it at ALBA. We define a free property in the database, called “ORBendPoint”, to which we add one property per server instance e.g. “Pool/XXX” with the value equal to “giop:tcp::YYYYY”.
Then in the launcher we can use, for example, in this way:
Thank you Zibi. I missed you answer and just discovered it. o_O
In fact, I wondered if it could be useful to integrate for each device a property “ORBendPoint” with the dedicated port for each instance.
In case the property is not found or is empty, a random port could be used.
Yes, this feature could avoid using of these conventions and specific launchers..
Then these property would be on the administrator devince level (dserver/…/…), right?