This is normal behaviour IF (1) there is no Tango database server listening at localhost:999, AND/OR (2) “a/b/c” is not the name of a device defined in the database.
I wonder if you have not confused the Tango database server address, specified by the environment variable TANGO_HOST or in /etc/tangorc or as you did i.e. as part of the name, with the device server network address? The device server network address is handled automatically by Tango. You only need the Database device server running. Common practice is to use ports 10000 or 20000 for the database server. But you are free to use 999 if it is free.
Have you tried the same code with the database server running at localhost:999 and a/b/c the name of a device defined in the database but not running in a device server.
Here is an example in python creating a DeviceProxy to a device (‘sys/tg_test/1’) which is defined but not running:
In [6]: dev = tango.DeviceProxy(‘sys/tg_test/1’)
When I then try to ping() it I get ConnectionFailed - which is normal because ping() should report an error if it fails:
In [7]: dev.ping()
ConnectionFailed Traceback (most recent call last)
in
----> 1 dev.ping()
C:\ProgramData\Anaconda3\lib\site-packages\tango\green.py in greener(obj, *args, **kwargs)
193 green_mode = access(‘green_mode’, None)
194 executor = get_object_executor(obj, green_mode)
→ 195 return executor.run(fn, args, kwargs, wait=wait, timeout=timeout)
196
197 return greener
C:\ProgramData\Anaconda3\lib\site-packages\tango\green.py in run(self, fn, args, kwargs, wait, timeout)
107 # Sychronous (no delegation)
108 if not self.asynchronous or not self.in_executor_context():
→ 109 return fn(*args, **kwargs)
110 # Asynchronous delegation
111 accessor = self.delegate(fn, *args, **kwargs)
C:\ProgramData\Anaconda3\lib\site-packages\tango\device_proxy.py in __DeviceProxy__ping(self, *args, **kwargs)
1499
1500 def __DeviceProxy__ping(self, *args, **kwargs):
→ 1501 return self._ping(*args, **kwargs)
1502
1503
ConnectionFailed: DevFailed[
DevError[
desc = Device sys/tg_test/1 is not exported (hint: try starting the device server)
origin = DeviceProxy::get_corba_name()
reason = API_DeviceNotExported
severity = ERR]