SnapArchiver execution error

Hi,

I have installed Tango 8, well running, on Xubuntu.
I have installed ArchivingRoot 15.4.2, HDB and TDB, well running also.
To install the snap archiving and create the 'snap' data base, i execute the script $ARCHIVING_ROOT/db/create-SNAPDB-MyISAM.sql
No sample script for installation of snap DS furnished, so i have exported, from an existing and well running data base tango,
the selected properties from the 'device' 'property_device' and 'property_class' tables.
I precise that the snap archiving is well running on this another host..

While executing SnapArchiver, i have the following messages (see bellow 1-DS 2-Atkpanel) containing errors.
For information :
- SnapExtractor and SnapManager are running ok
- i tried with different values : 127.0.0.1 (or localhost) , 127.0.1.1 (or pc-planck15 my hostname)..
- i can only connect to the my sql server with host=localhost
access authorized with «mysql -h localhost -u snapbrowser -p»
access denied with «mysql -h pc-planck15 -u snapbrowser -p» whatever user is root, snapbrowser, snapmanager, snaparchiver…


Any idea, any help will be appreciated.
Thanks
JCM


1-execution of the DS

SnapArchiver() create archiving/snap/snaparchiver.1
################
### Snapshot ###
################
Host from Device Properties : pc-planck15
Name from Device Properties : snap
Schema from Device Properties : snap
User from Device Properties : snaparchiver
Password from Device Properties : snaparchiver
Is Rac from Default : false
############################
DataBaseApi.connect_auto oracle: snaparchiver@pc-planck15
connection to oracle KO
DataBaseApi.connect_auto MySQL: snaparchiver@pc-planck15
mysql URL jdbc:mysql://pc-planck15/snap?autoReconnect=true
connection to MySQL KO
log4j:WARN No appenders could be found for logger (archiving/snap/snaparchiver.1).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Ready to accept request

2-AtkPanel

Status dans ATKpanel de archiving/snap/snaparchiver.1 :

Message : ARCHIVING ERROR : : CONNECTION FAILED !
[1] :
Reason : Erreur d’E/S: The Network Adapter could not establish the connection
Severity : WARNING
Description : Erreur d’E/S: The Network Adapter could not establish the connection
Origin : java.sql.SQLRecoverableException
[2] :
Reason : Failed while executing DataBaseApi.connect_oracle() method…
Severity : PANIC
Description : The loggin parameters (host, database name, user, password) seem to be wrong…
- URL: jdbc:oracle:thin:@pc-planck15:1521:snap
- user: snaparchiver
- password: snaparchiver
Origin : java.sql.SQLRecoverableException
[3] :
Reason : Failed while executing DataBaseApi.connect_auto() method…
Severity : PANIC
Description : Failed while connecting to the Oracle archiving database
Origin : fr.soleil.archiving.snap.api.tools.SnapshotingException
[4] :
Reason : Failed while executing DataBaseApi.connect_auto() method…
Severity : PANIC
Description : Failed while connecting to the archiving database
Origin : fr.soleil.archiving.snap.api.tools.SnapshotingException
[5] :
Reason : Could not create connection to database server. Attempted reconnect 3 times. Giving up.
Severity : WARNING
Description : Could not create connection to database server. Attempted reconnect 3 times. Giving up.
Origin : com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException
[6] :
Reason : Failed while executing DataBaseApi.connect_mysql() method…
Severity : PANIC
Description : The loggin parameters (host, database name, user, password) seem to be wrong…
Origin : com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException
[7] :
Reason : Failed while executing DataBaseApi.connect_auto() method…
Severity : PANIC
Description : Failed while connecting to the MySQL archiving database
Origin : fr.soleil.archiving.snap.api.tools.SnapshotingException
[8] :
Reason : Failed while executing DataBaseApi.connect_auto() method…
Severity : PANIC
Description : Failed while connecting to the archiving database
Origin : fr.soleil.archiving.snap.api.tools.SnapshotingException
Hi,

we solved the issue by setting dbHost properties to 'localhost' into the SnapArchiver class and the SnapArchiver device.
However, it does not satisfy us, since it seems to us that :
- either dbHost is a constant set to 'localhost'
- or dbHost is a variable and we should be able to change it.

So, in the second case, we would like to understand what it the meaning of dbHost ? In particular, it could be used to specify a host for running remote devices or mambo.

Thanks,
JCM



This issue can be caused by an incorrect import of snap database from a former installed database.
It could probably be solved with a script to install SNAP DS from scratch.

Actually, a script is given to install HDB DS into ArchivingRoot/doc/sample-hdb-device-installation.sql

There is very few documentation for ArchivingRoot, It would be more usable if similar scripts were given for TDB and SNAP. Does anyone has something like this ?
Thank you.
- Philippe
Hi Philippe,

i don't think so because i had also to force this dbHost in the 2 classes HdbArchiver and TdbArchiver (i well used scripts given in the documentation for ArchivingRoot).
So it is not a problem caused by an incorrect import from a former installed database.

Is there really nobody with any idea ?
Thanks,
JCM
Does anyone has any idea how to solve this dbHost issue ?
How should one configure dbHost with Snap archiving system ?
- Philippe
Edited 8 years ago
it concerns also HDB and TDB archiving systems because i had also to force this dbHost in the 2 classes HdbArchiver and TdbArchiver.

Any idea, any help will be appreciated.
Thanks
JCM
Hello. Sorry for the late answer.

First, a reminder:
Concerning snapshot database, the connection information, except for user/password, are read from the SnapManager class properties (whereas it is read from Hdb/Tdbarchiver class properties for HDB/TDB). So, this is where you should write DbHost.

Then, the devices will try to connect to an Oracle database and, if it fails, to a MySQL one (because they don't know what kind of database it is).

In your case, none of the 2 attempts did work. It seems to work with localhost only, so my first question would be : are you sure to have authorized the communication ports from/to external calls ? Because my first guess is a firewall problem.

Anyway, don't hesitate to contact me directly by email: raphael.girardot@synchrotron-soleil.fr.
This way, you could send me your device/class properties so that I can help you understanding why it does not work…

Regards,
Rg
Edited 7 years ago
Hi Raphael,

girardot
Hello. Sorry for the late answer.

First, a reminder:
Concerning snapshot database, the connection information, except for user/password, are read from the SnapManager class properties (whereas it is read from Hdb/Tdbarchiver class properties for HDB/TDB). So, this is where you should write DbHost.

it concerns also HDB and TDB archiving systems because i had also to force this dbHost to 'localhost' in the 2 HdbArchiver and TdbArchiver classes.
And, for SNAP, i had to force this dbHost to 'localhost' into the SnapArchiver class and also in the SnapArchiver device.

girardot
Then, the devices will try to connect to an Oracle database and, if it fails, to a MySQL one (because they don't know what kind of database it is).

OK, use of a MySQL db so it goes directly to second step.

girardot
In your case, none of the 2 attempts did work. It seems to work with localhost only, so my first question would be : are you sure to have authorized the communication ports from/to external calls ? Because my first guess is a firewall problem.

by checking iptables, no firewall restrictions are registered.
Moreover, all authorizations are given for all hosts in the basic ArchivingRoot configuration file $ARCHIVINGROOT/db/create-SNAPDB-MyISAM.sql

girardot
Anyway, don't hesitate to contact me directly by email: raphael.girardot@synchrotron-soleil.fr.
This way, you could send me your device/class properties so that I can help you understanding why it does not work…

Regards,

Thanks, i send you, by mail, all the config/install files




Hello again.

I searched the information about how the mysql database was configured at soleil, and I found some intersting information, which I guess will help you in your case:

When the mysql database was first installed at soleil, there were some connection problems too.
The solution was to modify the my.cnf in order to allow external connections:
  • comment skip-networking
  • add new parameter bind-address = 0.0.0.0
Rg
Edited 7 years ago


Effectively seems running well by setting the bind-address to 0.0.0.0 value in /etc/mysql/my.cnf.

It is written in the official documentation of MySql that bind-address = * allows any connection IPv4 and IPv6.
So i modified in this way the bind-address.
Running well also !

Thanks a lot !
 
Register or login to create to post a reply.