gilestrolab / ethoscope

a platform from monitoring animal behaviour in real time from a raspberry pi
http://lab.gilest.ro/ethoscope/
GNU General Public License v3.0
17 stars 25 forks source link

Node gets blacklisted by the ethoscope if the connection is not good enough #131

Open ggilestro opened 4 years ago

ggilestro commented 4 years ago

If the quality of the connection between the node and the ethoscope is not good enough, the ethoscope's mariadb instance will eventually blacklist the node thus forbidding any further attempt at backing up the data.

At the moment, this can be diagnosed on the node forcing a backup from the command line

cd /opt/ethoscope-node/node_src/scripts/
sudo python ethoscope_backup.py -e 113

If there is an issue, this will return

[...]
  File "/usr/lib/python3.8/site-packages/mysql/connector/connection.py", line 148, in _do_handshake
    raise errors.get_exception(packet)
mysql.connector.errors.DatabaseError: 1129: Host '192.169.123.2' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

The only way to fix this is to restore the connection, then SSH into the ethoscope and run

sudo mysqladmin flush-hosts