<div dir="auto">Hi,<div dir="auto"><br></div><div dir="auto">vzclient redet ja nur mit der MW, die 127.0.0.1 kommt wahrscheinlich aus der config.yaml (bis vor ein paar Tagen stand das dort, seit #799 localhost).</div><div dir="auto"><br></div><div dir="auto">Viele Grüße</div><div dir="auto">Frank</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Andreas Goetz <<a href="mailto:cpuidle@gmail.com">cpuidle@gmail.com</a>> schrieb am Fr., 10. Apr. 2020, 23:09:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div dir="ltr">Ich mag diese „seit neuestem“ Fehlersuche. Also hier <a href="https://github.com/volkszaehler/volkszaehler.org/blob/master/bin/vzclient#L64" target="_blank" rel="noreferrer">https://github.com/volkszaehler/volkszaehler.org/blob/master/bin/vzclient#L64</a> wird die Konfigurationsdatei eingelesen. Was steht denn bei Dir da drin? Irgendwo muss der Username ja herkommen...</div><div dir="ltr"><br></div><div dir="ltr">Viele Grüße, Andreas </div><div dir="ltr"><br><blockquote type="cite">Am 10.04.2020 um 22:56 schrieb G. Stenzel <<a href="mailto:GS-vzl@betriebsdirektor.de" target="_blank" rel="noreferrer">GS-vzl@betriebsdirektor.de</a>>:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><span>Hallo Andreas</span><br><span></span><br><span>Ich rufe vzclient aus einem Script unter dem user pi auf. Er greift</span><br><span>dann offenbar als <a href="mailto:vz@127.0.0.1" target="_blank" rel="noreferrer">vz@127.0.0.1</a> auf die Datenbank zu, was</span><br><span>interessanterweise lesend geht, aber nicht schreibend.</span><br><span></span><br><span>Als Workaround habe ich jetzt den user <a href="mailto:vz@127.0.0.1" target="_blank" rel="noreferrer">vz@127.0.0.1</a> mit denselben</span><br><span>Rechten wie vz@localshost angelegt. Damit geht es dann,</span><br><span>logischerweise.</span><br><span></span><br><span>Ich bin nur etwas irretiert, warum der user 'vz' neuerdings mit dem</span><br><span>host '127.0.0.1' bei der Datenbank ankommt. Wie gesagt, bei früheren</span><br><span>Test ging es schon einmal.</span><br><span></span><br><span>Gruß</span><br><span>G.</span><br><span></span><br><blockquote type="cite"><span>Schau doch mal wie der user in Mysql angelegt ist. Wenn es vzuser%localhost ist dann kann 127.0.0.1 in der Datanbank nicht funktionieren. Oder probier einfach mal localhost.</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Viele Grüße, Andreas</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><blockquote type="cite"><span>Am 10.04.2020 um 22:12 schrieb G. Stenzel <<a href="mailto:GS-vzl@betriebsdirektor.de" target="_blank" rel="noreferrer">GS-vzl@betriebsdirektor.de</a>>:</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>?Hallo</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Mit meinem neuen Volkszähler gibt es noch ein Problem. Der vzclient</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>kann keine Daten in die Datenbank schreiben:</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>access.log:</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>::1 - - [10/Apr/2020:21:20:07 +0200] "GET /middleware.php/data/65e46840-dd17-11e2-8103-553845eeddfc.json?operation=add&ts=1586546401000&value=16609469.8 HTTP/1.1" 400 352 "-" "vzclient/1.0"</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Wenn ich den Befehl in der Kommandozeile eingebe, kommt folgende</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Meldung:</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>/var/www/<a href="http://volkszaehler.org/bin/vzclient" target="_blank" rel="noreferrer">volkszaehler.org/bin/vzclient</a> -u 65e468</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>40-dd17-11e2-8103-553845eeddfc add data ts=1586546401000</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>value=16609469.8</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>{"version":"0.3","exception":{"message":"An exception occurred while</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>executing 'INSERT INTO data (channel_id, timestamp, value) VALUES</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>(6,?,?)' with params</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>[1586546401000,\"16609469.8\"]:\n\nSQLSTATE[42000]: Syntax error or</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>access violation: 1142 INSERT command denied to user 'vz'@'127.0.0.1'</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>for table 'data'","type":"ConnectionException","code":0}}</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Ein Check der Zugriffsrechte in mysql ergibt:</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>MariaDB [volkszaehler]> SHOW GRANTS FOR 'vz'@'localhost';</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>+-----------------------------------------------------------------------------------------------------------+</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>| Grants for vz@localhost                                                                                   |</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>+-----------------------------------------------------------------------------------------------------------+</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>| GRANT USAGE ON *.* TO 'vz'@'localhost' IDENTIFIED BY PASSWORD '*C142FB215B6E05B7C134B1A653AD4B455157FD79' |</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>| GRANT SELECT, INSERT, UPDATE, DELETE ON `volkszaehler`.* TO 'vz'@'localhost'                              |</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>| GRANT DELETE ON `volkszaehler`.`aggregate` TO 'vz'@'localhost'                                            |</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>| GRANT DELETE ON `volkszaehler`.`properties` TO 'vz'@'localhost'                                           |</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>| GRANT DELETE ON `volkszaehler`.`entities_in_aggregator` TO 'vz'@'localhost'                               |</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>+-----------------------------------------------------------------------------------------------------------+</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>5 rows in set (0.002 sec)</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Kann es sein daß für die Datenbank die User <a href="mailto:vz@127.0.0.1" target="_blank" rel="noreferrer">vz@127.0.0.1</a> und</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>vz@localhost nicht dasselbe sind? Komischerweise ging das bei früheren</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Tests schon mal. Ich weiß nicht, was ich hier verbogen habe. Könnte</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>mir bitte mal jemand auf die Sprünge helfen?</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Ein "get data" auf der Konsole geht übrigens.</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Danke und Gruß</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>G.</span><br></blockquote></blockquote></div></blockquote></div></blockquote></div>