Long response time in Windows when accessing Databank DS

Hello all,
I have an annoying problem that occurs on my Windows Test PC. Namely, the response time of Jive and other Tango device servers is very bad when starting them in Windows.
It does not matter whether DB DS is running in Windows PC, Ubuntu VM or Ubuntu PC. When e.g. starting LimaCCDs in the terminal, terminal freezes for 20 seconds befor anything happens. For TangoTest DS the same. As if a timeout has to expire first.

My configuration:
Windows 10: Tango installation with Conda/Mamba:

(tango) C:\Users\AlexK>mamba list
# packages in environment at C:\Users\AlexK\miniforge3\envs\tango:
#
# Name                    Version                   Build  Channel
bzip2                     1.0.8                hcfcfb64_5    conda-forge
ca-certificates           2023.11.17           h56e8100_0    conda-forge
cpptango                  9.5.0                h3480802_1    conda-forge
intel-openmp              2023.2.0         h57928b3_50497    conda-forge
jive                      7.40                 h57928b3_2    conda-forge
…
mysql-common              8.0.33               hde014ed_6    conda-forge
mysql-libs                8.0.33               h8b0d2c3_6    conda-forge
numpy                     1.26.3          py312h8753938_0    conda-forge
omniorb-libs              4.3.1                ha7d20b1_2    conda-forge
openjdk                   21.0.1               h57928b3_0    conda-forge
openssl                   3.2.0                hcfcfb64_1    conda-forge
packaging                 23.2               pyhd8ed1ab_0    conda-forge
pip                       23.3.2             pyhd8ed1ab_0    conda-forge
psutil                    5.9.7           py312he70551f_0    conda-forge
pthreads-win32            2.9.1                hfa6e2cd_3    conda-forge
pytango                   9.5.0           py312h0bfd76e_1    conda-forge
python                    3.12.1          h2628c8c_1_cpython    conda-forge
python_abi                3.12                    4_cp312    conda-forge
setuptools                69.0.3             pyhd8ed1ab_0    conda-forge
symlink-exe-runtime       1.0                  hcfcfb64_0    conda-forge
tango-astor               7.5.5                h57928b3_0    conda-forge
tango-database            5.22                 h1cf4e73_1    conda-forge
tango-test                3.8                  h1cf4e73_1    conda-forge
…

Network Configuration: two ethernet cards, first for access to university network and second for test setup. The 2nd card has multiple IP addresses.

Ethernet-Adapter Ethernet 2:

   Verbindungsspezifisches DNS-Suffix:
   Beschreibung. . . . . . . . . . . : Intel(R) Gigabit CT Desktop Adapter
   Physische Adresse . . . . . . . . : 00-1B-21-3A-27-43
   DHCP aktiviert. . . . . . . . . . : Nein
   Autokonfiguration aktiviert . . . : Ja
   IPv4-Adresse  . . . . . . . . . . : 192.168.2.222(Bevorzugt)
   Subnetzmaske  . . . . . . . . . . : 255.255.255.0
   IPv4-Adresse  . . . . . . . . . . : 192.168.50.222(Bevorzugt)
   Subnetzmaske  . . . . . . . . . . : 255.255.255.0
   IPv4-Adresse  . . . . . . . . . . : 192.168.55.222(Bevorzugt)
   Subnetzmaske  . . . . . . . . . . : 255.255.255.0
   Standardgateway . . . . . . . . . : 192.168.2.1
   DNS-Server  . . . . . . . . . . . : 192.168.50.3
   NetBIOS über TCP/IP . . . . . . . : Aktiviert


The DB DS runs on Ubuntu 20.04 VM in .50. subnet:

(tango) alex@ubuntu2004:~$ Databaseds 2 -ORBendPoint giop:tcp:192.168.50.13:10000

The DB Server is MariaDB V10.3.38.

The installation on Ubuntu VM is also with mamba:

(tango) alex@ubuntu2004:~/miniforge3/envs/lavue/bin$ mamba list tango
# packages in environment at /home/alex/miniforge3/envs/tango:
#
# Name                    Version                   Build  Channel
cpptango                  9.5.0                h6a15873_1    conda-forge
lima-camera-basler-tango  1.10.10                       0    esrf-bcu
lima-tango-server         1.9.20                     py_0    esrf-bcu
pytango                   9.5.0            py39hb1babde_1    conda-forge
tango-astor               7.5.5                ha770c72_0    conda-forge
tango-database            5.22                 h7c9bab5_1    conda-forge
tango-test                3.8                  h7c9bab5_1    conda-forge


Inside of VM or an Ubuntu PC reaction time is fast.
Has anyone observed the same behavior and can give me a tip on how to fix the problem?
Edited 1 year ago
Hello AlexK,

When running a device on Windows, do you also use the command

TANGOEXECUTABLE.exe DEVICENAME -ORBendPoint giop:tcp:TANGO_LISTENING_IP:


Where "TANGO_LISTENING_IP" is the IP address of the network card to be used to communicate with Tango ?
In your particular case, the value of that variable shall be 192.168.50.222 as your Tango DB is running in 192.168.50.13 and your mask is 255.255.255.0
Guillaume DI FRANCO
Thales - Software Engineer Manager
Edited 1 year ago
Hello Hiro,
thanks for the tip. Unfortunately, starting with explicit parameters did not improve performance. With the help from the Tango Slack channel tango-database and this post in the forum I found out that the delay is directly proportional to existing IP addresses. If I delete all IPs from my test card except .50.222 and disconnect the Uni network card, the Windows device servers immediately connect to DB DS. When I connect the Uni card, the delay is about 6sec and so on.

I will try to configure the priority of ethernet adapters and IP addresses next week. May be it will solve the issue.
Hello AlexK

I'm currently working exclusively with Tango on Windows and I have several network cards (multiple physical cards and also several virtual cards) with up to 7 IP set on each cards and I've only run into that kind of problem when not using the dedicated "giop:tcp:TANGO_LISTENING_IP:" parameter as my devices may be related to another network card (host IP is visible from Jive).

Local Windows Firewall rules need also to be checked (if accessible)
Guillaume DI FRANCO
Thales - Software Engineer Manager
Dear Hiro, dear everyone,

The problem is independent of the DS database.
After a long debug session with Thomas Braun we found out that the problem lies in the way TANGO resolves hostnames, see here.
Good news: we were able to find a simple solution: enable LMHOST lookup in NIC IP4 settings, and add a entry for each IP in the
hosts file (…\windows\system32\drivers\etc\hosts\):

e.g.
192.168.50.222 our.pc.de
192.168.2.222  our.pc.de

Restart NIC.

However, the solution is not optimal and I hope that the problem will be solved with the next version.
@AlexK: I've created https://gitlab.com/tango-controls/cppTango/-/issues/1216 to summarize our findings.
Thank you!
Thanks to @AlexK for reporting the issue and @t-b for hunting it down and finding a solution.

I am reminded of a similar behaviour in the early days of IPV6 on Linux where we also had strange delays and had to edit the hosts file.

We will discuss this in the next kernel meeting to see if there is a way to avoid this happening. @t-b seems to have an idea!

Andy
 
Register or login to create to post a reply.