Tango 8.1.2 on Ubuntu 16.04 (configure tango-db)

Noob question again. Thought it was trivial but don't find a specific answer.

Having upgraded from ubuntu 14 to 16, I'm trying to set up a test tango server by the path of minimal effort. I got the stock distribution packages listed below. Now jive complains TangoApi_DATABASE_CONNECTION_FAILED, which would make sense because I never configured the database. In fact, as per the video on the readthedocs page (for ubuntu 14), I never get to the configuration dialog with dbconfig-common.
What am I missing (possibly a simple CL command)?

Thanks, Enrico

$ apt list –installed | grep tango

liblog4tango5-dev/xenial,now 8.1.2c+dfsg-7ubuntu3 amd64 
liblog4tango5-doc/xenial,xenial,now 8.1.2c+dfsg-7ubuntu3 all 
liblog4tango5v5/xenial,now 8.1.2c+dfsg-7ubuntu3 amd64 
libtango-java/now 8.1.2.c-1 all 
libtango-tools/xenial,now 8.1.2c+dfsg-7ubuntu3 amd64 
libtango8-dev/xenial,now 8.1.2c+dfsg-7ubuntu3 amd64 
libtango8-doc/xenial,xenial,now 8.1.2c+dfsg-7ubuntu3 all 
libtango8v5/xenial,now 8.1.2c+dfsg-7ubuntu3 amd64 
python-pytango/xenial,now 8.1.8-1 amd64 
tango-common/xenial,xenial,now 8.1.2c+dfsg-7ubuntu3 all 
tango-db/xenial,now 8.1.2c+dfsg-7ubuntu3 amd64 
tango-icon-theme/xenial,xenial,now 0.8.90-5ubuntu1 all 
tango-starter/xenial,now 8.1.2c+dfsg-7ubuntu3 amd64 
tango-test/xenial,now 8.1.2c+dfsg-7ubuntu3 amd64

$ apt list –installed | grep mysql

libmysql-java/xenial,xenial,now 5.1.38-1 all [installed,automatic]
libmysqlclient-dev/xenial-updates,xenial-security,now 5.7.22-0ubuntu0.16.04.1 amd64 [installed,automatic]
libmysqlclient20/xenial-updates,xenial-security,now 5.7.22-0ubuntu0.16.04.1 amd64 [installed,automatic]
mysql-client/xenial-updates,xenial-updates,xenial-security,xenial-security,now 5.7.22-0ubuntu0.16.04.1 all [installed]
mysql-client-5.7/xenial-updates,xenial-security,now 5.7.22-0ubuntu0.16.04.1 amd64 [installed,automatic]
mysql-client-core-5.7/xenial-updates,xenial-security,now 5.7.22-0ubuntu0.16.04.1 amd64 [installed,automatic]
mysql-common/xenial-updates,xenial-updates,xenial-security,xenial-security,now 5.7.22-0ubuntu0.16.04.1 all [installed,automatic]
mysql-server/xenial-updates,xenial-updates,xenial-security,xenial-security,now 5.7.22-0ubuntu0.16.04.1 all [installed]
mysql-server-5.7/xenial-updates,xenial-security,now 5.7.22-0ubuntu0.16.04.1 amd64 [installed,automatic]
mysql-server-core-5.7/xenial-updates,xenial-security,now 5.7.22-0ubuntu0.16.04.1 amd64 [installed,automatic]
Hi Enrico,

I would try:
sudo dpkg-reconfigure tango-db

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.
Right, thanks Reynald, that brings up the configurator. However, creating the database and leaving all the default values (including empty passwords as recommended by the video), I end up with

Creating config file /var/lib/tango/.my.cnf with new version
granting access to database tango for tango@localhost: success.
verifying access for tango@localhost: success.
creating database tango: success.
verifying database tango exists: success.
populating database via sql…  error encountered populating database:
mysql said: mysql: [Warning] mysql: Empty value for 'port' specified. Will throw an error in future versions ERROR 1067 (42000) at line 6 in file: '/usr/share/tango-db/create_db_tables.sql': Invalid default value for 'accessed'
dbconfig-common: tango-db configure: ignoring errors from here forwards
done.
dbconfig-common: flushing administrative password
insserv: script sedMHZhZh: service xrdp already provided!
Processing triggers for systemd (229-4ubuntu21.2) …
Processing triggers for ureadahead (0.100.0-19) …

and still no joy with jive. What am I missing next?
I have been trying removing and reinstalling packages and this was not my first attempt, so if there is something dependent on the order of installation I may be getting it wrong.
Hi,

It looks like you are running into a bug due to some incompatibilities between MySQL releases which was fixed in:
https://github.com/tango-controls/TangoDatabase/commit/c5915b3a2c5133e6f4e3416a8d2f293fc64b97f2

This should be fixed in tango9.

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.
IIUC then to use 9 I have to compile it from source, or maybe to upgrade to ubuntu 17, I wanted to avoid that for now…

Another variance with the video, which is for ubuntu 14: I cannot get libtango-java from 'deb http://ppa.launchpad.net/tango-controls/core/ubuntu precise main', that would lead to dependency problems with libzmq3. There is no xenial ppa, so I downloaded https://people.debian.org/~picca/libtango-java_8.1.2.c-1_all.deb

Edited 6 years ago
Hi,

For me it works:

    
sed -i "s/\[mysqld\]/\[mysqld\]\nsql_mode = NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION/g" /etc/mysql/mysql.conf.d/mysqld.cnf

You can fetch more details at

https://github.com/nexdatas/writer/blob/master/.travis/install.sh

and

https://github.com/nexdatas/writer/blob/master/.travis/ubuntu16.04/Dockerfile

Best regards,
Jan
Thanks, that brings me perhaps one step forward:
$ sudo dpkg-reconfigure tango-db
Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.
Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.
dbconfig-common: writing config to /etc/dbconfig-common/tango-db.conf
Replacing config file /etc/dbconfig-common/tango-db.conf with new version
Replacing config file /var/lib/tango/.my.cnf with new version
granting access to database tango for tango@localhost: already exists.
dbconfig-common: dumping mysql database tango to /var/tmp/tango-db.tango.2018-06-17-09.30.mysql.5gPCqD.
dbconfig-common: dropping old mysql database tango.
dropping database tango: success.
verifying database tango was dropped: success.
creating database tango: success.
verifying database tango exists: success.
populating database via sql…  error encountered populating database:
mysql said: mysql: [Warning] mysql: Empty value for 'port' specified. Will throw an error in future versions ERROR 1045 (28000): Access denied for user 'tango'@'localhost' (using password: YES)
dbconfig-common: tango-db configure: ignoring errors from here forwards
done.
dbconfig-common: flushing administrative password
insserv: script sedMHZhZh: service xrdp already provided!
(have tried variations removing/reinstalling in different order too). I am not familiar with Docker, are the files you pointed at supposed to help me in this too?
Edited 6 years ago
Have you started from the scratch, i.e. after removing the old installation tango-db by :

 sudo apt-get purge tango-db 

(If it does not work correctly you may need also in mysql to execute: DROP DATABASE tango;)

From the above errors you need also unset the empty db port in `/etc/dbconfig-common/tango-db.conf`, e.g.

dbc_dbport='3306'

and grant privileges to the tango user in mysql, e.g.

GRANT ALL PRIVILEGES ON tango.* TO 'tango'@'%' identified by '<mysql_passwd>';
GRANT ALL PRIVILEGES ON tango.* TO 'tango'@'localhost' identified by '<mysql_passwd>';

or/and add the $HOME/.my.cnf file with:

[client]
user=tango
host=localhost
password=<msql_passwd>
jan
Have you started from the scratch, i.e. after removing the old installation tango-db by :

sudo apt-get purge tango-db
Bingo! that, followed by
sudo apt-get install tango-db
just did it. Thanks for the help,
Enrico
 
Register or login to create to post a reply.