DBLog läuft nach update der mariaDB auf Syno NAS nicht mehr.

Begonnen von der-Lolo, 11 November 2018, 12:29:50

Vorheriges Thema - Nächstes Thema

der-Lolo

Danke Dir,
ich komme leider erst heute abend zum einspielen und testen...

der-Lolo

Kannst Du mir noch eine tip geben bzgl. dem File Privileg des fhem users damit das dump erstellen klappt?
In phpmyAdmin finde ich nichts dergleichen, gibt es vielleicht einen SQL befehl den ich absetzen kann?

Hier jetzt ein auszug aus dem Log mit den nagepassten Modulen und den gesetzten Attributen - schaut ähnlich aus wie bei dir, ich frage mich wie ich hier nun einen Fehler erkennen soll...

    <- DESTROY= ( undef ) [1 items] at 93_DbLog.pm line 2199
Freeing 7 parameters, bind 0 fbind 0
    -> DESTROY for DBD::mysql::st (DBI::st=HASH(0x7f75520)~INNER) thr#1a97010
    <- execute_array= ( 6 6 ) [2 items] at 93_DbLog.pm line 2079
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:22:15','SDM630','MODBUSSDM630M','Power_L3__W: 0','Power_L3__W','0','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:22:15','SDM630','MODBUSSDM630M','Power_L2__W: 470','Power_L2__W','470','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:22:15','SDM630','MODBUSSDM630M','Power_L1__W: 18','Power_L1__W','18','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:22:12','WMZ','MODBUSATTR','Waermeleistung: 3000.0','Waermeleistung','3000.0','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:22:12','WMZ','MODBUSATTR','aktAZ: 6.40','aktAZ','6.40','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:22:12','WMZ','MODBUSATTR','aktWaermeleistung: 3.0','aktWaermeleistung','3.0','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
    -> dbd_st_FETCH_attrib for 6f09c30, key NUM_OF_PARAMS
    -> execute_array in DBD::_::st for DBD::mysql::st (DBI::st=HASH(0x7ee9548)~0x7f75520 HASH(0x829ef88)) thr#1a97010
    DBI::st=HASH(0x7f75520) trace level set to 0x100/2 (DBI @ 0x0/0) in DBI 1.637-ithread (pid 11890)
    <- DESTROY= ( undef ) [1 items] at 93_DbLog.pm line 2199
Freeing 7 parameters, bind 0 fbind 0
    -> DESTROY for DBD::mysql::st (DBI::st=HASH(0x8206af0)~INNER) thr#1a97010
    <- execute_array= ( 8 8 ) [2 items] at 93_DbLog.pm line 2079
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:21:43','SDM630','MODBUSSDM630M','Power_L3__W: 0','Power_L3__W','0','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:21:43','SDM630','MODBUSSDM630M','Power_L2__W: 469','Power_L2__W','469','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:21:43','SDM630','MODBUSSDM630M','Power_L1__W: 18','Power_L1__W','18','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:21:42','WMZ','MODBUSATTR','Waermeleistung: 2900.0','Waermeleistung','2900.0','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:21:42','WMZ','MODBUSATTR','aktAZ: 6.18','aktAZ','6.18','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:21:42','WMZ','MODBUSATTR','aktWaermeleistung: 2.9','aktWaermeleistung','2.9','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:21:42','WMZ','MODBUSATTR','aktAZ: 6.40','aktAZ','6.40','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:21:42','DbRep','DBREP','state: connected','state','connected','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
    -> dbd_st_FETCH_attrib for 6f09c30, key NUM_OF_PARAMS
    -> execute_array in DBD::_::st for DBD::mysql::st (DBI::st=HASH(0x7e9b430)~0x8206af0 HASH(0x8206d60)) thr#1a97010
    DBI::st=HASH(0x8206af0) trace level set to 0x100/2 (DBI @ 0x0/0) in DBI 1.637-ithread (pid 11847)
2018.11.13 18:21:45 1: SONOS4: Restore-Thread gestartet. Warte auf Arbeit...
2018.11.13 18:21:45 1: SONOS3: IsAlive-Thread gestartet. Warte 120 Sekunden und pruefe dann alle 30 Sekunden...
2018.11.13 18:21:45 1: SONOS2: LongJobs-Thread gestartet. Prüfe auf LongJobs...
2018.11.13 18:21:45 1: SONOS1: UPnP-Thread gestartet.
2018.11.13 18:21:42 3: DbRep DbRep - Connectiontest to db mysql:database=fhem;host=127.0.0.1;port=3307 successful
    <- DESTROY= ( undef ) [1 items] at 93_DbLog.pm line 2199
Freeing 7 parameters, bind 0 fbind 0
    -> DESTROY for DBD::mysql::st (DBI::st=HASH(0x828f0f8)~INNER) thr#1a97010
    <- execute_array= ( 4 4 ) [2 items] at 93_DbLog.pm line 2079
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:21:12','SDM630','MODBUSSDM630M','Power_L3__W: 0','Power_L3__W','0','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:21:12','SDM630','MODBUSSDM630M','Power_L2__W: 469','Power_L2__W','469','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:21:12','SDM630','MODBUSSDM630M','Power_L1__W: 18','Power_L1__W','18','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:21:12','WMZ','MODBUSATTR','Durchfluss: 1050','Durchfluss','1050','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
    -> dbd_st_FETCH_attrib for 6f09c30, key NUM_OF_PARAMS
    -> execute_array in DBD::_::st for DBD::mysql::st (DBI::st=HASH(0x82886f0)~0x828f0f8 HASH(0x828f1d0)) thr#1a97010
    DBI::st=HASH(0x828f0f8) trace level set to 0x100/2 (DBI @ 0x0/0) in DBI 1.637-ithread (pid 11825)
2018.11.13 18:21:12 3: DbRep DbRep - Connectiontest to database mysql:database=fhem;host=127.0.0.1;port=3307 with user fhem


PS: meine Logs laufen von oben nach unten ;-)

DS_Starter

#32
ZitatKannst Du mir noch eine tip geben bzgl. dem File Privileg des fhem users damit das dump erstellen klappt?
In phpmyAdmin finde ich nichts dergleichen, gibt es vielleicht einen SQL befehl den ich absetzen kann?
Schau mal im Anhang, dort siehst du es. Bei Benutzerkonten deinen DB-User auswählen und bei globalen Daten anhaken.
Der SQL-Befehl wäre:


GRANT FILE ON *.* TO 'fhem'@'%'


Den musst du als root bzw. User mit Grant-Recht ausführen.

Zitat
Hier jetzt ein auszug aus dem Log mit den nagepassten Modulen und den gesetzten Attributen - schaut ähnlich aus wie bei dir, ich frage mich wie ich hier nun einen Fehler erkennen soll...
Das schaue ich mir an. Die Frage ist ... tritt denn ein Fehler überhaupt auf ?
Also im Prinzip müsstest du verbose 3 einstellen und sobald eine Fehlermitteilung kommt den davor ! liegenden Trace posten. Das ist zumindest der Plan.  ;)
Bei mir kommt kein Fehler, kann es deswegen auch nicht genau beschreiben.

Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

der-Lolo

hab einen...

<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:47:13','SDM630','MODBUSSDM630M','Power_L1__W: 18','Power_L1__W','18','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
    -> dbd_st_FETCH_attrib for 6f09c30, key NUM_OF_PARAMS
    -> execute_array in DBD::_::st for DBD::mysql::st (DBI::st=HASH(0x8c08298)~0x8c09cb8 HASH(0x8b12030)) thr#1a97010
    DBI::st=HASH(0x8c09cb8) trace level set to 0x100/2 (DBI @ 0x0/0) in DBI 1.637-ithread (pid 13495)
    <- DESTROY= ( undef ) [1 items] at 93_DbLog.pm line 2199
Freeing 7 parameters, bind 0 fbind 0
    -> DESTROY for DBD::mysql::st (DBI::st=HASH(0x8ba5748)~INNER) thr#1a97010

2018.11.13 18:47:11 2: DbLog DbLog -> Error table history - DBD::mysql::st execute_array failed: executing 5 generated 1 errors at ./FHEM/93_DbLog.pm line 2079.
    <- execute_array= ( undef ) [1 items] at 93_DbLog.pm line 2079
    !! ERROR: 2000000000 'executing 5 generated 1 errors' (err#1)
    -- HandleSetErr err=2000000000, errstr='executing 5 generated 1 errors', state=undef, undef
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:46:43','SDM630','MODBUSSDM630M','Power_L3__W: 0','Power_L3__W','0','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:46:43','SDM630','MODBUSSDM630M','Power_L2__W: 469','Power_L2__W','469','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph

DS_Starter

#34
Sag mal, hast du einen Unique Index auf die history gesetzt ?

Wenn ich es richtig lese, wird dieser DAtensatz eingefügt:


Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:46:43','SDM630','MODBUSSDM630M','Power_L2__W: 469','Power_L2__W','469','')


Der nächste geht schief:

Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 18:46:43','SDM630','MODBUSSDM630M','Power_L3__W: 0','Power_L3__W','0','')


Die haben genau den gleichen Timestamp.
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

DS_Starter

Und mach bitte im DbLog mal ein "set ... configCheck".

Ich muss gleich weg ... schaue nachher nochmal vorbei ...
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

der-Lolo

Ähm, der Timestamp kann ja gleich sein - es geht um unterschiedliche Phasen des Drehstromzählers...

Einen Unique Index habe ich nicht (nicht bewusst) gesetzt...

Hier ein configCheck
Result of DbLog version check

Used DbLog version: 3.13.0
Recommendation: Your running version may be the current one. Please check for updates of DbLog periodically.

Result of configuration read check

Connection parameter store type: file
Connection parameter: Connection -> mysql:database=fhem;host=127.0.0.1;port=3307, User -> fhem, Password -> read o.k.

Result of connection check

Connection to database fhem successfully done.
Recommendation: settings o.k.

Result of encoding check

Encoding used by Client (connection): UTF8
Encoding used by DB fhem: UTF8
Recommendation: settings o.k.

Result of logmode check

Logmode of DbLog-device DbLog is: asynchronous
Recommendation: settings o.k.

Result of shutdown sequence preparation check

Attribute "shutdownWait" is set to:
Recommendation: Due to Reading "background_processing_time" is not available (you may set attribute "showproctime"), there is only a rough estimate to
set attribute "shutdownWait" to 2 seconds.


Result of plot generation method check

WARNING - at least one of your FHEMWEB devices have attribute "plotfork = 1" not set. This may cause blocking situations when creating plots.
WEB: plotfork=1
WEBphone: plotfork=0
WEBtablet: plotfork=0
WEBweatherstation: plotfork=0
Recommendation: You should set attribute "plotfork = 1" in relevant devices

Result of table 'history' check

Column width set in DB fhem.history: 'DEVICE' = 32, 'TYPE' = 32, 'EVENT' = 512, 'READING' = 32, 'VALUE' = 32, 'UNIT' = 32
Column width used by DbLog: 'DEVICE' = 64, 'TYPE' = 64, 'EVENT' = 512, 'READING' = 64, 'VALUE' = 128, 'UNIT' = 32
Recommendation: The relation between column width in table history and the field width used in device DbLog don't meet the requirements. Please make sure that the width of database field definition is equal or larger than the field width used by the module. Compare the given results.
Currently the default values for field width are:

DEVICE: 64
TYPE: 64
EVENT: 512
READING: 64
VALUE: 128
UNIT: 32

You can change the column width in database by a statement like 'alter table history modify VALUE varchar(128);' (example for changing field 'VALUE'). You can do it for example by executing 'sqlCmd' in DbRep or in a SQL-Editor of your choice. (switch DbLog to asynchron mode for non-blocking).
Alternatively the field width used by DbLog can be adjusted by setting attributes 'colEvent', 'colReading', 'colValue'. (pls. refer to commandref)

Result of table 'current' check

Column width set in DB fhem.current: 'DEVICE' = 32, 'TYPE' = 32, 'EVENT' = 512, 'READING' = 32, 'VALUE' = 32, 'UNIT' = 32
Column width used by DbLog: 'DEVICE' = 64, 'TYPE' = 64, 'EVENT' = 512, 'READING' = 64, 'VALUE' = 128, 'UNIT' = 32
Recommendation: The relation between column width in table current and the field width used in device DbLog don't meet the requirements. Please make sure that the width of database field definition is equal or larger than the field width used by the module. Compare the given results.
Currently the default values for field width are:

DEVICE: 64
TYPE: 64
EVENT: 512
READING: 64
VALUE: 128
UNIT: 32

You can change the column width in database by a statement like 'alter table current modify VALUE varchar(128);' (example for changing field 'VALUE'). You can do it for example by executing 'sqlCmd' in DbRep or in a SQL-Editor of your choice. (switch DbLog to asynchron mode for non-blocking).
Alternatively the field width used by DbLog can be adjusted by setting attributes 'colEvent', 'colReading', 'colValue'. (pls. refer to commandref)

Result of check 'Search_Idx' availability

Index 'Search_Idx' exists and contains recommended fields 'DEVICE', 'READING', 'TIMESTAMP'.
Recommendation: settings o.k.

Result of check 'Report_Idx' availability for DbRep-devices

At least one DbRep-device assigned to DbLog is used, but the recommended index 'Report_Idx' is missing.
Recommendation: You can create the index by executing statement 'CREATE INDEX Report_Idx ON `history` (TIMESTAMP, READING) USING BTREE;'
Depending on your database size this command may running a long time.
Please make sure the device 'DbLog' is operating in asynchronous mode to avoid FHEM from blocking when creating the index.
Note: If you have just created another index which covers the same fields and order as suggested (e.g. a primary key) you don't need to create the 'Report_Idx' as well !


Der Dump wurde wie erwartet nun schnell erstellt - hatte mich schon gewundert, die DS716+II sollte doch eigentlich genug Power haben für sowas..
2018.11.13 19:10:56 3: DbRep DbRep - Database dump finished successfully.
2018.11.13 19:10:56 3: DbRep DbRep - Finished backup of database fhem - total time used: 309 seconds
2018.11.13 19:10:56 1: PERL WARNING: Use of uninitialized value $fref in pattern match (m//) at ./FHEM/93_DbRep.pm line 9220.
2018.11.13 19:10:56 3: DbRep DbRep - Number of exported datasets: 11589275
2018.11.13 19:10:56 1: PERL WARNING: Use of uninitialized value $fref in pattern match (m//) at ./FHEM/93_DbRep.pm line 6835.


Da sind auch noch ein paar Warnings - und ähm, ich versuchte ja zweimal einen dump zu erstellen beim ersten mal ging das Ding in eine endlosschleife, beim zweiten mal gabs dann die meldung bzgl. FILE Privileg.
Der Dritte jetzt gerade lief durch.
Vielleicht kannst Du damit was anfangen und die endlosschleife abfangen.





der-Lolo

Hier noch ein Fehler - wieder der SDM630 - mal schauen was ich da machen kann.
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 19:07:14','WMZ','MODBUSATTR','aktAZ: 6.42','aktAZ','6.42','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
    -> dbd_st_FETCH_attrib for 6f09c30, key NUM_OF_PARAMS
    -> execute_array in DBD::_::st for DBD::mysql::st (DBI::st=HASH(0x90570c0)~0x90712f8 HASH(0x906c738)) thr#1a97010
    DBI::st=HASH(0x90712f8) trace level set to 0x100/2 (DBI @ 0x0/0) in DBI 1.637-ithread (pid 14828)
    <- DESTROY= ( undef ) [1 items] at 93_DbLog.pm line 2199
Freeing 7 parameters, bind 0 fbind 0
    -> DESTROY for DBD::mysql::st (DBI::st=HASH(0x93623b8)~INNER) thr#1a97010

2018.11.13 19:07:14 2: DbLog DbLog -> Error table history - DBD::mysql::st execute_array failed: executing 6 generated 1 errors at ./FHEM/93_DbLog.pm line 2079.
    <- execute_array= ( undef ) [1 items] at 93_DbLog.pm line 2079
    !! ERROR: 2000000000 'executing 6 generated 1 errors' (err#1)
    -- HandleSetErr err=2000000000, errstr='executing 6 generated 1 errors', state=undef, undef
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 19:06:44','SDM630','MODBUSSDM630M','Power_L3__W: 0','Power_L3__W','0','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
<- dbd_st_execute returning imp_sth->row_num 1
Binding parameters: INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2018-11-13 19:06:44','SDM630','MODBUSSDM630M','Power_L2__W: 467','Power_L2__W','467','')
>parse_params statement INSERT INTO history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES (?,?,?,?,?,?,?)
mysql_st_internal_execute MYSQL_VERSION_ID 50172
<- dbd_st_free_result_sets
<- dbd_st_free_result_sets RC -1
>- dbd_st_free_result_sets
-> dbd_st_execute for 6f0a608
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph
   Called: dbd_bind_ph

DS_Starter

Eine ganz wichtige Erkenntnis kommt aus dem configCheck, deine DB ist nicht (mehr) richtig eingerichtet.
Die Spaltenbreiten stammen noch aus alter Zeit. Passe die erstmal dringend an die jetzigen Erfordernisse an.

Das betrifft alle Felder die im configCheck angemeckert werden in beiden Tabellen. Außer 'EVENT' und 'UNIT' musst du alle Felder in history und current anpassen.
Hier das Beispiel:


alter table history modify VALUE varchar(128);


Welche DbRep-Version hast du bei dir im Einsatz ?
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

der-Lolo

Ein List vom DbRep Device...

Internals:
   DATABASE   fhem
   DEF        DbLog
   LASTCMD    dumpMySQL serverSide
   MODEL      Agent
   NAME       DbRep
   NOTIFYDEV  global,DbRep
   NR         188
   NTFY_ORDER 50-DbRep
   ROLE       Agent
   STATE      Database backup finished
   TYPE       DbRep
   UTF8       1
   VERSION    8.9.5
   HELPER:
     DBLOGDEVICE DbLog
     IDRETRIES  3
     MINTS      2018-09-30 21:36:08
     DBREPCOL:
       COLSET     1
       DEVICE     64
       EVENT      512
       READING    64
       TYPE       64
       UNIT       32
       VALUE      128
   Helper:
     DBLOG:
       state:
         DbLog:
           TIME       1542132656.85175
           VALUE      Database backup finished
   READINGS:
     2018-11-13 19:10:56   DumpFileCreated ./fhem_history_2018_11_13_19_09.csv
     2018-11-13 19:10:56   DumpRowsCurrent n.a.
     2018-11-13 19:10:56   DumpRowsHistory 11589275
     2018-11-13 19:10:56   background_processing_time 309.1530
     2018-11-13 19:10:56   state           Database backup finished
   dbloghash:
     COLUMNS    field length used for Device: 64, Type: 64, Event: 512, Reading: 64, Value: 128, Unit: 32
     CONFIGURATION ./db.conf
     DEF        ./db.conf WMZ.*|Lueftung.*:A.*|Power_L.*|R.*|V.*|Z.*|akt.*
     MODE       asynchronous
     MODEL      MYSQL
     NAME       DbLog
     NR         164
     NTFY_ORDER 50-DbLog
     PID        11716
     REGEXP     WMZ.*|Lueftung.*:A.*|Power_L.*|R.*|V.*|Z.*|akt.*
     STATE      connected
     TYPE       DbLog
     UTF8       1
     VERSION    3.13.0
     dbconn     mysql:database=fhem;host=127.0.0.1;port=3307
     dbuser     fhem
     HELPER:
       COLSET     1
       DEVICECOL  64
       EVENTCOL   512
       OLDSTATE   connected
       READINGCOL 64
       TYPECOL    64
       UNITCOL    32
       VALUECOL   128
     Helper:
       DBLOG:
         state:
           DbLog:
             TIME       1542142807.0025
             VALUE      DBD::mysql::st execute_array failed
     READINGS:
       2018-11-14 18:14:21   CacheUsage      0
       2018-11-14 18:14:20   NextSync        2018-11-14 18:14:50 or if CacheUsage 500 reached
       2018-11-10 14:41:48   countCurrent    767
       2018-11-10 14:41:48   countHistory    10968723
       2018-09-30 21:57:15   reduceLogState  reduceLogNbl finished. Rows processed: 0, deleted: 0, time: 0.11sec
       2018-11-14 18:14:21   state           connected
     cache:
       index      12916
     helper:
       bm:
         DbLog_Attr:
           cnt        5
           dmx        -1000
           dtot       0
           dtotcnt    0
           mTS        13.11. 18:21:09
           max        5.29289245605469e-05
           tot        0.000190019607543945
           mAr:
             set
             DbLog
             traceFlag
             SQL
         DbLog_Get:
           cnt        8
           dmx        -1000
           dtot       0
           dtotcnt    0
           mTS        13.11. 18:21:21
           max        4.98294830322266e-05
           tot        0.000261545181274414
           mAr:
             HASH(0x638e850)
             DbLog
             ?
         DbLog_Log:
           cnt        78580
           dmx        -1000
           dtot       0
           dtotcnt    0
           mTS        14.11. 17:44:28
           max        0.0326840877532959
           tot        112.483788490295
           mAr:
             HASH(0x638e850)
             HASH(0x70c6c28)
         DbLog_Set:
           cnt        35
           dmx        -1000
           dtot       0
           dtotcnt    0
           mTS        13.11. 19:22:56
           max        0.0496408939361572
           tot        0.0688180923461914
           mAr:
             HASH(0x638e850)
             DbLog
             configCheck
   helper:
     bm:
       DbRep_Attr:
         cnt        3
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        13.11. 20:15:37
         max        0.00191211700439453
         tot        0.0021202564239502
         mAr:
           set
           DbRep
           role
           Agent
       DbRep_Get:
         cnt        8
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        13.11. 19:05:47
         max        0.000117063522338867
         tot        0.000555753707885742
         mAr:
           HASH(0x723c3e0)
           DbRep
           ?
       DbRep_Notify:
         cnt        24
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        13.11. 19:05:47
         max        0.00020289421081543
         tot        0.00139307975769043
         mAr:
           HASH(0x723c3e0)
           HASH(0x723c3e0)
       DbRep_Set:
         cnt        33
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        13.11. 19:05:47
         max        0.0214500427246094
         tot        0.0355830192565918
         mAr:
           HASH(0x723c3e0)
           DbRep
           dumpMySQL
           serverSide
Attributes:
   dumpFilesKeep 1
   event-on-change-reading state
   icon       security
   role       Agent
   room       99-Controller
   timeout    1800


Ok, Du sagst die Felder stimmen nicht "mehr" mit den anforderungen überein, wie groß sollten die Felder den sein?
Beim einrichten habe ich mir per copy&paste die SQL befehle von irgendwo kopiert... Die frage ist jetzt wahrscheinlich welches HowTo ist aktuell...


DS_Starter

Nabend,

danke ... die Warnungen kommen daher dass die Attribute für die ausgeführte Funktion nicht alle gesetzt sind. Ist aber auch nicht schlimm und ich werde die Warnungen in der nächsten Version eliminieren.

Zu den Feldgrößen. Aktuell die richtigen Größen sind die wie im configCheck angegeben.


Currently the default values for field width are:

DEVICE: 64
TYPE: 64
EVENT: 512
READING: 64
VALUE: 128
UNIT: 32


In der commandref habe ich auch den Link zu den aktuellen Einrichtungsskripten hinterlegt:


Der Code zur Anlage ist ebenfalls in den Scripten SVN -> contrib/dblog/db_create_<DBType>.sql enthalten.


Diese Quellen halte ich aktuell und dort siehst du die Größen.

D.h. du führst nacheinander aus:


alter table history modify DEVICE varchar(64);
alter table history modify TYPE varchar(64);
alter table history modify READING varchar(64);
alter table history modify VALUE varchar(128);


Wenn das für die history passiert ist, dann noch für die current Tabelle.
Gut wenn man MySQL/MariaDB hat, so geht es ganz simpel.
Ist die Anpassung erledigt schauen wir erneut wie es dann aussieht.
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

der-Lolo

Der letzte Befehl

alter table history modify VALUE varchar(128);

läuft leider nicht durch...

https://www.dropbox.com/s/m5cio05pa5pntgl/Screenshot%202018-11-14%2019.47.16.png?dl=0

ist die Fehlermeldung.

DS_Starter

Ich vermute das ist ein Timeout.
Setze den Befehl im DbRep mit

set DbRep sqlCmd alter ....

ab. Setze dort vorher das Attribut timeout auf z.B. 36000.
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

der-Lolo

#43
errortext
DBD::mysql::st execute failed: ALTER command denied to user 'fhem'@'localhost' for table 'history' at ./FHEM/93_DbRep.pm line 5565.
Edit:
Hab dem User fhem die rechte gegeben - jetzt läuft das comando...

DS_Starter

Der User 'fhem'@'localhost' hat wieder nicht das benötigte Recht.
Ähnlich wie bei FILE in der Maske setzen. Dürfte das Recht ALTER in der Spalte Struktur sein.

Überschnitten ...  :)
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter