tango-db failure - DataBaseds: symbol lookup error

I'm using Ubuntu 16.04.7 Virtual Machine on our network to host a tango database. I have installed everything according to the Ubuntu guidelines here:
Ubuntu installation guidelines
Everything installed successfully, but when I run the TangoTest I get the following results:
/usr/lib/tango/TangoTest test
Can't build connection to TANGO database server, exiting

The tango-db.service seems to startup fine:
sudo systemctl status tango-db
● tango-db.service - LSB: Start the tango control system database daemon
Loaded: loaded (/etc/init.d/tango-db; bad; vendor preset: enabled)
Active: active (exited) since Wed 2022-01-12 11:04:31 SAST; 1min 13s ago
Docs: man:systemd-sysv-generator(8)
Process: 4112 ExecStart=/etc/init.d/tango-db start (code=exited, status=0/SUCCESS)
Jan 12 11:04:22 precise64 systemd[1]: Starting LSB: Start the tango control system database daemon…
Jan 12 11:04:31 precise64 systemd[1]: Started LSB: Start the tango control system database daemon.

But when I run the DataBaseds manually, I get this:
/usr/lib/tango/DataBaseds 2 -ORBendPoint giop:tcp::10000
main(): arrived
/usr/lib/tango/DataBaseds: symbol lookup error: /usr/lib/x86_64-linux-gnu/libtango.so.8: undefined symbol: _ZN9log4tango6LoggerC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi

Also, I saw this logging error in the mysql.service:
sudo systemctl status mysql
● mysql.service - LSB: Start and stop the mysql database server daemon
Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled)
Active: active (running) since Thu 2022-01-13 14:17:48 SAST; 1h 44min ago
Docs: man:systemd-sysv-generator(8)
Process: 3647 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/mysql.service
├─3749 /bin/bash /usr/bin/mysqld_safe
└─3900 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –plugin-dir=/usr/lib/mysql/plugin –user=mysql –log-error=/var/log/mysql

Jan 13 14:18:46 precise64 systemd[1]: Starting LSB: Start and stop the mysql database server daemon…
Jan 13 14:18:48 precise64 mysql[3647]: * Starting MariaDB database server mysqld
Jan 13 14:18:48 precise64 /etc/init.d/mysql[3750]: 220113 14:18:48 mysqld_safe Can't log to error log and syslog at the same time. Remove all –log-
Jan 13 14:17:48 precise64 mysql[3647]: …done.
Jan 13 14:17:48 precise64 systemd[1]: Started LSB: Start and stop the mysql database server daemon.

What am I missing?
Edited 4 months ago
Hi,

Ubuntu 16.06 starts to get quite old now smile
We don't really support that any longer but maybe someone could help you there.
And the Tango version available in Ubuntu 16.04 packages is old too it seems (Tango 8?).

About the undefined symbol when you start the DataBaseds, what is the result of the following command:
`ldd /usr/lib/tango/DataBaseds`

It looks like you're missing a symbol coming from log4tango which was provided in a separate library at that time.
liblog4tango has been merged with libtango since cppTango 9.3.3 I think.

Maybe you're missing that library?

You could also try to build/install Tango from the TangoSourceDistribution if you want to get a more recent version of the Tango software? I think tango 9.3.4 should still compile on Ubuntu 16.04.

Hoping this helps a bit,
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,

Here is the result of the ldd command:
ldd /usr/lib/tango/DataBaseds
linux-vdso.so.1 => (0x00007ffcc1342000)
libtango.so.8 => /usr/lib/x86_64-linux-gnu/libtango.so.8 (0x00007f233147d000)
liblog4tango.so.5 => /usr/local/lib/liblog4tango.so.5 (0x00007f2331264000)
libmysqlclient.so.20 => /usr/lib/x86_64-linux-gnu/libmysqlclient.so.20 (0x00007f2330cad000)
libomniORB4.so.1 => /usr/lib/libomniORB4.so.1 (0x00007f2330909000)
libomniDynamic4.so.1 => /usr/lib/libomniDynamic4.so.1 (0x00007f2330443000)
libomnithread.so.3 => /usr/lib/libomnithread.so.3 (0x00007f233023d000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2330020000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f232fc9e000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f232fa88000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f232f6be000)
libzmq.so.5 => /usr/lib/x86_64-linux-gnu/libzmq.so.5 (0x00007f232f458000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f232f254000)
libCOS4.so.1 => /usr/lib/libCOS4.so.1 (0x00007f232e7dc000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f232e4d3000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f232e2b9000)
libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f232e051000)
libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f232dc0c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2331d6e000)
libsodium.so.18 => /usr/lib/x86_64-linux-gnu/libsodium.so.18 (0x00007f232d9ae000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f232d7a6000)

Can you see what library is missing?
How should I add it? I'll try that first, otherwise I'll try installing directly from the TangoSourceDistribution.
Thanks,
Charl
You seem to have liblog4tango library.
If this library is not empty in your use case (size != 0), then I don't know what is the origin of your error.

We did provide an empty version of this liblog4tangolibrary at some point to ease the transition to the new libtango library already containing log4tango symbols, so maybe you have this version?
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.
Ok, so the lib is not empty:
ls -als /usr/local/lib/liblog4tango.so.5.0.1
904 -rwxr-xr-x 1 root root 921773 Jan 28 2021 /usr/local/lib/liblog4tango.so.5.0.1

but some symbol is wrong.
How can I re-install this liblog4tango. What version should I use?
theC
How can I re-install this liblog4tango. What version should I use?

Well, if the Ubuntu 16.04 packages are well prepared, liblog4tango should be installed automatically as dependency with libtango when installing the tango-db package, I guess.

This Ubuntu distribution is too old now to use the Ubuntu search packages web interface, so it will be quite tedious to debug.

The path where liblog4tango is installed (/usr/local/lib/) is different than the one where the tango lib is installed (/usr/lib/x86_64-linux-gnu/).

Maybe you should check whether you don't have several versions of liblog4tango installed on your system.
Is there one under /usr/lib/x86_64-linux-gnu/?

What I would do if I were you would be to:
1. Use a more recent distribution smile
2. Install tango library, tango databaseds and TangoTest from the latest TangoSourceDsitribution
3. If option 1. and 2. are not an option for you, I would uninstall tango-db, tango-test and packages having log4tango in their name.
Then I would reinstall tango-db and see whether the Databaseds still have the same issue.
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.
Edited 4 months ago
Yes, it seems that there are more than one version of log4tango installed…
ls -als /usr/lib/x86_64-linux-gnu/ | grep log4tango
0 lrwxrwxrwx 1 root root 21 Apr 7 2016 liblog4tango.so.5 -> liblog4tango.so.5.0.0
100 -rw-r–r– 1 root root 101568 Apr 7 2016 liblog4tango.so.5.0.0
ls -als /usr/local/lib/ | grep log4tango
4 -rwxr-xr-x 1 root root 970 Jan 28 2021 liblog4tango.la
0 lrwxrwxrwx 1 root root 21 Jan 28 2021 liblog4tango.so -> liblog4tango.so.5.0.1
0 lrwxrwxrwx 1 root root 21 Jan 28 2021 liblog4tango.so.5 -> liblog4tango.so.5.0.1
904 -rwxr-xr-x 1 root root 921773 Jan 28 2021 liblog4tango.so.5.0.1

Should I remove the older one?
theC
Should I remove the older one?

I would use the one under /usr/lib/x86_64-linux-gnu/ and move or remove the one under /usr/local/lib so tango-db does not try to use it.
Check with ldd before running the tango databaseds to ensure it is using the one under /usr/lib/x86_64-linux-gnu/
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.
But maybe there is something wrong in the Ubuntu 16 packages.

liblog4tango.so.5.0.1 installed under /usr/local/lib was probably installed as a dependency on 1 package (maybe tango-test?) whereas the one installed under /usr/lib/x86_64-linux-gnu/ was installed with some other package.

I would try to use the same liblog4tango lib as the one installed when libtango.so.8 was installed, which is probably the one in /usr/lib/x86_64-linux-gnu/ because this is where libtango.so.8 has been installed too.
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.
Reynald
What I would do if I were you would be to:
1. Use a more recent distribution
So, I installed a fresh Ubuntu 20.04 system and then installed the mariadb package without errors.
I then tried to install the tango-db & tango-tester packages and got these errors:
sudo apt install tango-db tango-test
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
dbconfig-common dbconfig-mysql libcos4-2 liblog4tango5v5 libnorm1 libomniorb4-2 libomnithread4 libpgm-5.2-0 libtango-tools libtango9 libzmq5 tango-common tango-starter
Suggested packages:
omninotify
Recommended packages:
default-mysql-client
The following NEW packages will be installed:
dbconfig-common dbconfig-mysql libcos4-2 liblog4tango5v5 libnorm1 libomniorb4-2 libomnithread4 libpgm-5.2-0 libtango-tools libtango9 libzmq5 tango-common tango-db tango-starter tango-test
0 upgraded, 15 newly installed, 0 to remove and 4 not upgraded.
Need to get 5,811 kB of archives.
After this operation, 28.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://za.archive.ubuntu.com/ubuntu focal/universe amd64 dbconfig-common all 2.0.13 [586 kB]
Get:2 http://za.archive.ubuntu.com/ubuntu focal/universe amd64 dbconfig-mysql all 2.0.13 [1,136 B]
Get:3 http://za.archive.ubuntu.com/ubuntu focal/universe amd64 libomnithread4 amd64 4.2.2-0.9build4 [12.2 kB]
Get:4 http://za.archive.ubuntu.com/ubuntu focal/universe amd64 libomniorb4-2 amd64 4.2.2-0.9build4 [1,145 kB]
Get:5 http://za.archive.ubuntu.com/ubuntu focal/universe amd64 libcos4-2 amd64 4.2.2-0.9build4 [1,224 kB]
Get:6 http://za.archive.ubuntu.com/ubuntu focal/universe amd64 libnorm1 amd64 1.5.8+dfsg2-2build1 [290 kB]
Get:7 http://za.archive.ubuntu.com/ubuntu focal/universe amd64 libpgm-5.2-0 amd64 5.2.122~dfsg-3ubuntu1 [158 kB]
Get:8 http://za.archive.ubuntu.com/ubuntu focal/universe amd64 libzmq5 amd64 4.3.2-2ubuntu1 [242 kB]
Get:9 http://za.archive.ubuntu.com/ubuntu focal/universe amd64 liblog4tango5v5 amd64 9.2.5a+dfsg1-2ubuntu1 [43.2 kB]
Get:10 http://za.archive.ubuntu.com/ubuntu focal/universe amd64 tango-common all 9.2.5a+dfsg1-2ubuntu1 [5,728 B]
Get:11 http://za.archive.ubuntu.com/ubuntu focal/universe amd64 libtango9 amd64 9.2.5a+dfsg1-2ubuntu1 [1,702 kB]
Get:12 http://za.archive.ubuntu.com/ubuntu focal/universe amd64 libtango-tools amd64 9.2.5a+dfsg1-2ubuntu1 [25.2 kB]
Get:13 http://za.archive.ubuntu.com/ubuntu focal/universe amd64 tango-db amd64 9.2.5a+dfsg1-2ubuntu1 [213 kB]
Get:14 http://za.archive.ubuntu.com/ubuntu focal/universe amd64 tango-starter amd64 9.2.5a+dfsg1-2ubuntu1 [93.4 kB]
Get:15 http://za.archive.ubuntu.com/ubuntu focal/universe amd64 tango-test amd64 9.2.5a+dfsg1-2ubuntu1 [69.7 kB]
Fetched 5,811 kB in 7s (784 kB/s)
Preconfiguring packages …
Selecting previously unselected package dbconfig-common.
(Reading database … 184710 files and directories currently installed.)
Preparing to unpack …/00-dbconfig-common_2.0.13_all.deb …
Unpacking dbconfig-common (2.0.13) …
Selecting previously unselected package dbconfig-mysql.
Preparing to unpack …/01-dbconfig-mysql_2.0.13_all.deb …
Unpacking dbconfig-mysql (2.0.13) …
Selecting previously unselected package libomnithread4:amd64.
Preparing to unpack …/02-libomnithread4_4.2.2-0.9build4_amd64.deb …
Unpacking libomnithread4:amd64 (4.2.2-0.9build4) …
Selecting previously unselected package libomniorb4-2:amd64.
Preparing to unpack …/03-libomniorb4-2_4.2.2-0.9build4_amd64.deb …
Unpacking libomniorb4-2:amd64 (4.2.2-0.9build4) …
Selecting previously unselected package libcos4-2:amd64.
Preparing to unpack …/04-libcos4-2_4.2.2-0.9build4_amd64.deb …
Unpacking libcos4-2:amd64 (4.2.2-0.9build4) …
Selecting previously unselected package libnorm1:amd64.
Preparing to unpack …/05-libnorm1_1.5.8+dfsg2-2build1_amd64.deb …
Unpacking libnorm1:amd64 (1.5.8+dfsg2-2build1) …
Selecting previously unselected package libpgm-5.2-0:amd64.
Preparing to unpack …/06-libpgm-5.2-0_5.2.122~dfsg-3ubuntu1_amd64.deb …
Unpacking libpgm-5.2-0:amd64 (5.2.122~dfsg-3ubuntu1) …
Selecting previously unselected package libzmq5:amd64.
Preparing to unpack …/07-libzmq5_4.3.2-2ubuntu1_amd64.deb …
Unpacking libzmq5:amd64 (4.3.2-2ubuntu1) …
Selecting previously unselected package liblog4tango5v5:amd64.
Preparing to unpack …/08-liblog4tango5v5_9.2.5a+dfsg1-2ubuntu1_amd64.deb …
Unpacking liblog4tango5v5:amd64 (9.2.5a+dfsg1-2ubuntu1) …
Selecting previously unselected package tango-common.
Preparing to unpack …/09-tango-common_9.2.5a+dfsg1-2ubuntu1_all.deb …
Unpacking tango-common (9.2.5a+dfsg1-2ubuntu1) …
Selecting previously unselected package libtango9:amd64.
Preparing to unpack …/10-libtango9_9.2.5a+dfsg1-2ubuntu1_amd64.deb …
Unpacking libtango9:amd64 (9.2.5a+dfsg1-2ubuntu1) …
Selecting previously unselected package libtango-tools.
Preparing to unpack …/11-libtango-tools_9.2.5a+dfsg1-2ubuntu1_amd64.deb …
Unpacking libtango-tools (9.2.5a+dfsg1-2ubuntu1) …
Selecting previously unselected package tango-db.
Preparing to unpack …/12-tango-db_9.2.5a+dfsg1-2ubuntu1_amd64.deb …
Unpacking tango-db (9.2.5a+dfsg1-2ubuntu1) …
Selecting previously unselected package tango-starter.
Preparing to unpack …/13-tango-starter_9.2.5a+dfsg1-2ubuntu1_amd64.deb …
Unpacking tango-starter (9.2.5a+dfsg1-2ubuntu1) …
Selecting previously unselected package tango-test.
Preparing to unpack …/14-tango-test_9.2.5a+dfsg1-2ubuntu1_amd64.deb …
Unpacking tango-test (9.2.5a+dfsg1-2ubuntu1) …
Setting up libnorm1:amd64 (1.5.8+dfsg2-2build1) …
Setting up dbconfig-common (2.0.13) …

Creating config file /etc/dbconfig-common/config with new version
Setting up liblog4tango5v5:amd64 (9.2.5a+dfsg1-2ubuntu1) …
Setting up libomnithread4:amd64 (4.2.2-0.9build4) …
Setting up libomniorb4-2:amd64 (4.2.2-0.9build4) …
Setting up libcos4-2:amd64 (4.2.2-0.9build4) …
Setting up tango-common (9.2.5a+dfsg1-2ubuntu1) …
usermod: user tango is currently used by process 1328
dpkg: error processing package tango-common (–configure):
installed tango-common package post-installation script subprocess returned error exit status 8
Setting up libpgm-5.2-0:amd64 (5.2.122~dfsg-3ubuntu1) …
Setting up libzmq5:amd64 (4.3.2-2ubuntu1) …
Setting up dbconfig-mysql (2.0.13) …
dpkg: dependency problems prevent configuration of libtango9:amd64:
libtango9:amd64 depends on tango-common; however:
Package tango-common is not configured yet.

dpkg: error processing package libtango9:amd64 (–configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of tango-starter:
tango-starter depends on libtango9; however:
Package libtango9:amd64 is not configured yet.

dpkg: error processing package tango-starter (–configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of tango-db:
tango-db depends on libtango9; however:
Package libtango9:amd64 is not configured yet.

dpkg: error processing package tango-db (–configure):
dependency problems - leaving unconfigured
dpkg: dependencNo apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
y problems prevent configuration of tango-test:
tango-test depends on libtango9; however:
Package libtango9:amd64 is not configured yet.
tango-test depends on tango-starter; however:
Package tango-starter is not configured yet.

dpkg: error processing package tango-test (–configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libtango-tools:
libtango-tools depends on libtango9; however:
Package libtango9:amd64 is not configured yet.

dpkg: error processing package libtango-tools (–configure):
dependency problems - leaving unconfigured
Processing triggers for systemd (245.4-4ubuntu3.15) …
Processing triggers for man-db (2.9.1-1) …
Processing triggers for libc-bin (2.31-0ubuntu9.2) …
Errors were encountered while processing:
tango-common
libtango9:amd64
tango-starter
tango-db
tango-test
libtango-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

Should I rather get the latest source code from github?
https://github.com/tango-controls/TangoSourceDistribution/releases/tag/9.3.4
 
Register or login to create to post a reply.