Failed to query TANGO database (error=Server has gone away)

Hello,
I noticed a strange behaviour with a brand new database installed and running on a debian 12 server with no device server.

After a while, when we launch jive with `TANGO_HOST=192.168.0.1:20000 jive`, I got 6 windows with following output:

Desc -> Failed to query TANGO database (error=Server has gone away)
The query was: SELECT count,value,name FROM property WHERE object = "CtrlSystem" AND name LIKE "Services" ORDER BY count
Reason -> DB_SQLError
Origin -> DataBase::db_get_property()
Desc -> Cannot execute command DbGetProperty on sys/database/2
Reason -> TangoApi_CANNOT_EXECUTE_COMMAND
Origin -> Connection.command_inout()


When I change TANGO_HOST in jive, I got the message

Desc -> java.net.UnknownHostException: TANGO_HOST=192.168.0.1: Name or service not known
Reason -> Api_GetCanonicalHostNameFailed
Origin -> fr.esrf.TangoApi.TangoUrl.getCanonicalName(TangoUrl.java:240)


When I check the tango-db status

$ systemctl status tango-db
● tango-db.service - LSB: Start the tango control system database daemon
Loaded: loaded (/etc/init.d/tango-db; generated)
Active: active (running) since Wed 2024-05-22 16:21:04 CEST; 1 day 19h ago
Docs: man:systemd-sysv-generator(8)
Process: 2697830 ExecStart=/etc/init.d/tango-db start (code=exited, status=0/SUCCESS)
Tasks: 9 (limit: 38363)
Memory: 7.3M
CPU: 994ms
CGroup: /system.slice/tango-db.service
└─2697850 /usr/lib/tango/DataBaseds 2 -ORBendPoint giop:tcp::20000
$ tango_admin –ping-database
tango-test:~$ echo $?
255


I attach also the output of a screen command in which I launched command
date && sudo -u tango /usr/lib/tango/DataBaseds 2 -ORBendPoint giop:tcp::20000 -v5 && date
.
Note: this file can be read by `more` command, less displays it badly.
It seems the command do not crash since I do not get a second output of date.

Did you already notice this behaviour?

Regards
- Philippe
Hi Philippe,

The Server has gone away issue looks like this one: https://gitlab.com/tango-controls/TangoDatabase/-/issues/56 which is supposed to be solved if you're using tag Database-Release-5.22 of the TangoDatabase repository.

Do you know what version you are using?
Where did you get it?

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.
Hi Reynald,
thank you for this fast answer and those links.

I installed debian version which is 9.3.4+dfsg1-2 but I am not sure which version it is. Is there a way to identify it through a command line option ?
I also have mariadb 10.11.6 native debian 12 version.

PS: we miss you at SOLEIL ;)
- Philippe
9.3.4 was released in 2020.
The TangoDatabase `Database-Release-5.22` tag was released about 1 year ago so you don't have this fix.
You can install version 5.22 via conda for instance:

`conda install conda-forge::tango-database`

PS: Thanks! I'm following the meeting online. I hope I'll be there at the next Tango Community Meeting. smile
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.
Thank you Reynald.
I would like to find a solution lighter than conda if possible, it would allow us to fix our installation scripts for servers and clients.

I do not see any 5.22 version in https://gitlab.com/tango-controls/TangoDatabase/-/releases
Is it available somewhere else than perhaps in https://gitlab.com/tango-controls/TangoSourceDistribution/-/releases/9.5.0 do not display versions like https://gitlab.com/tango-controls/TangoSourceDistribution/-/releases/9.3.4) ?

What would be the "good way" to update DataBaseds if installed through debian package?
Replacing DataBaseds would let tango-db update in further versions, even if the bug is not fixed (would this bug be fixed).
Uninstalling tango-db would uninstall MariaDB database, so it is possible if it is not done

Do you know it it is planned to update deb package in debian stable version?
It would solve this issue of unstable DataBaseds but also the bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1062979 of tango database table.

Regards
- Philippe
> I do not see any 5.22 version in https://gitlab.com/tango-controls/TangoDatabase/-/releases
> Is it available somewhere else than perhaps in https://gitlab.com/tango-controls/TangoSourceDistribution/-/releases/9.5.0 do not display versions like https://gitlab.com/tango-controls/TangoSourceDistribution/-/releases/9.3.4) ?

We don't do releases for TangoDatabase, so just use the tagged version https://gitlab.com/tango-controls/TangoDatabase/-/tags/Database-Release-5.22.

> What would be the "good way" to update DataBaseds if installed through debian package?
> Replacing DataBaseds would let tango-db update in further versions, even if the bug is
> not fixed (would this bug be fixed).
> Uninstalling tango-db would uninstall MariaDB database, so it is possible if it is not
> done.

We do have plans for having a version of tango in bookworm-backports, but that is not yet available.

You could recompile the tango packages from trixie (testing) in bookworm and basically doing the backport yourself. But that is a bit heavy. You would also need a newer omniorb version for that, see https://packages.debian.org/bookworm-backports/omniorb.

If it is a for a single machine I would just compile TangoDatabase from the newer version and use that. If you need it on many machines, either create backport packages yourself or conda.

> Do you know it it is planned to update deb package in debian stable version?
> It would solve this issue of unstable DataBaseds but also the bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1062979 of tango database table.

There are no plans to update the debian stable packages. These bugs are not serious enough.
Edited 3 months ago
Hello there,

I have the same issue (or error message at least) than Philippe, on a Ubuntu 22.04 with version 9.3.4. So I follow your advice, Reynald:
Reynald
You can install version 5.22 via conda for instance:

`conda install conda-forge::tango-database`

And I try increasing the timeout from the MariaDB side also (the default settings are identical to our running tangodb on Ubuntu 14 so I hope it's not a MySQL issue)) but nothing changes: the server has gone away the day after I first run DataBaseds even if the process is still running.

Am I missing something? I admit I'm reluctant with the idea of compiling sources as there's no compiler installed yet and it would make the updating more difficult.

Best regards, thanks for any advice!
Stephane
smaluli
I admit I'm reluctant with the idea of compiling sources as there's no compiler installed yet and it would make the updating more difficult.

Sorry but there is no other solution that we can recommend.

Cheers,
Thomas
Okay, thanks Thomas!
 
Register or login to create to post a reply.