Dear all,
I write to ask your help on how to use the new HDB++ archiver (HDB++ · GitHub).
First of all could you please confirm I followed the correct procedure to install and configure it.
I’m using Tango version v9.2.5a to build archiver sources.
=====================================
== INSTALL ==
- Download latest version of libhdb++, libhdb+±mysql, hdbpp-es & hdbpp-cm Tango devices from repositories at HDB++ · GitHub.
- Build libhdb++, libhdb+±mysql libraries from source
- Build Tango device sources.
========================================
== CREATE ARCHIVE MYSQL DB ==
- Create a MySQL archiver user, password and DB, say;
user=hdb_archiver
pass=hdb
DB=hdb_archive - Run the MySQL script create_hdb++_mysql.sql provided in libhdb+±mysql etc/ folder, e.g.
mysql> use hdb_archive;
mysql> source create_hdb++_mysql.sql;
The only modification I needed to apply was to add at the beginning of the sql script:
SET SQL_MODE=‘ALLOW_INVALID_DATES’;
otherwise mysql complains about the timestamp default.
=====================================
== CONFIGURE SUBSCRIBER
I’m using Jive to setup just one archived attribute (not using the Configurator device & gui for the moment)
- Register a subscriber device in TangoDB, say it is named: dev/hdb++es/1
- Configure the LibConfiguration property as follows:
host=localhost
user=lmc-archiver
password=hdb
dbname=hdb_archive
port=3306
libname=libhdb++mysql.so (please note that the libname is needed and not specified in the documentation)
- Configure an Attribute to be archived in AttributeList property:
tango://riggi-tpt460:10000/mid_dish_0001/spfrx/emulator/operatingMode;strategy=ALWAYS;ttl=0
This attribute has periodic archive event set. I verified that I’m able to receive these events using a pytango script.
-
Set the device property StartArchivingAtStartup=true (or alternatively use the command AttributeStart() to start archiving)
-
Run the subscriber device (along with the device with attribute to be archived)
=======================================================================================
Hoping that I have done all the steps correctly, here are the errors I’m obtaining:
1513343354 [140485989226304] INFO dev/hdb++es/1 HdbEventSubscriber id=0
1513343354 [140485989226304] INFO dev/hdb++es/1 HdbDevice::get_hdb_signal_list: 0: tango://riggi-TPT460:10000/mid_dish_0001/spfrx/emulator/operatingmode;strategy=ALWAYS;ttl=0
Starting version: 1.0.0:2017-12-14 17:42:23
db_conf key=dbname, value=hdb_archive
db_conf key=host, value=localhost
db_conf key=libname, value=libhdb++mysql.so
db_conf key=password, value=hdb
db_conf key=port, value=3306
db_conf key=user, value=lmc-archiver
1513343354 [140485620393728] INFO dev/hdb++es/1 PollerThread id=9
add_domain: found domain -> riggi-TPT460:10000
1513343354 [140485603608320] INFO dev/hdb++es/1 CheckPeriodicThread delay_tolerance_ms=5000 id=10
1513343354 [140485612001024] INFO dev/hdb++es/1 SubscribeThread id=6
updateTTL_Attr: ERROR riggi-TPT460:10000/mid_dish_0001/spfrx/emulator/operatingmode NOT FOUND
ERROR dev/hdb++es/1 PushThread::run_undetached: An was error detected when updating the TTL on attribute: tango://riggi-TPT460:10000/mid_dish_0001/spfrx/emulator/operatingmode
Tango exception
Severity = ERROR
Error reason = Data Error
Desc : ERROR riggi-TPT460:10000/mid_dish_0001/spfrx/emulator/operatingmode NOT FOUND
Origin : updateTTL_Attr
segmentation
The segmentation at the end I think is caused by the line
ERROR_STREAM << "PushThread::run_undetached: An was error detected when updating the TTL on attribute: " << cmd->ev_data->attr_name << endl;
in PushThread class. I verified with valgrind that there is a invalid read on that, so replaced cmd->ev_data->attr_name with cmd->attr_name in print line. Now the device becomes ready for request and runs without crashing.
Apart from this error (which affects also other logging statements of run_undetached method)
when I try to start archiving I get:
1513343520 [139814657578752] ERROR dev/hdb++es/1 push_event: Event 'tango://riggi-TPT460:10000/mid_dish_0001/spfrx/emulator/operatingmode' NOT FOUND in signal list
1513343520 [139814657578752] ERROR dev/hdb++es/1 push_event: AttrConfEvent 'tango://riggi-TPT460:10000/mid_dish_0001/spfrx/emulator/operatingmode' NOT FOUND in signal list
1513343520 [139814624007936] ERROR dev/hdb++es/1 push_event: Event 'tango://riggi-TPT460:10000/mid_dish_0001/spfrx/emulator/operatingmode' NOT FOUND in signal list
1513343521 [139814624007936] ERROR dev/hdb++es/1 push_event: Event 'tango://riggi-TPT460:10000/mid_dish_0001/spfrx/emulator/operatingmode' NOT FOUND in signal list
1513343522 [139814624007936] ERROR dev/hdb++es/1 push_event: Event 'tango://riggi-TPT460:10000/mid_dish_0001/spfrx/emulator/operatingmode' NOT FOUND in signal list
1513343523 [139814624007936] ERROR dev/hdb++es/1 push_event: Event 'tango://riggi-TPT460:10000/mid_dish_0001/spfrx/emulator/operatingmode' NOT FOUND in signal list
...
...
I do not understand what I’m missing or doing wrong.
It seems that nothing is written in the DB because the tables are empty and queries are returning that attribute does not exist in DB, e.g. HdbPPMySQL::find_attr_id() returns -1.
I’m pretty sure I’m missing something here or doing wrong.
Can you help me to understand the problem?
Many thanks,
Simone