<div dir="ltr">Ok, found it:<div><br></div><div>I need to use "<a href="http://localhost" target="_blank">http://localhost</a>" as middleware url in vzlogger.</div><div><br></div><div>I did not install apache2 nor nginx as proxy. Seems that although a middleware.php file exists, this is not picked up by the php webserver and that the proxy is supposed to do that mapping (once I read that section of the install manual...)</div><div><br></div><div>I would have appreciated a warning in the german installation manual (<a href="https://wiki.volkszaehler.org/software/middleware/installation">https://wiki.volkszaehler.org/software/middleware/installation</a>)</div><div><br></div><div>Thanks for reading anyway, Jens</div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Fr., 2. Dez. 2022 um 17:47 Uhr schrieb Jens Scheidtmann <<a href="mailto:jens.scheidtmann@gmail.com" target="_blank">jens.scheidtmann@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hello Volkszaehler community,</div><div><br></div><div>I have set-up <a href="http://volkszaehler.org" target="_blank">volkszaehler.org</a> and vzlogger on a Raspi 3B according to the documentation in the wiki. I chose to install directly, ie. using the install.sh scripts. I installed both as services in the Raspi.<br><br></div>I can log random values to the demo server at <a href="http://demo.volkszaehler.org" target="_blank">demo.volkszaehler.org</a> using vzlogger and they are displayed in the web interface. <br><br>BUT when using an appropriate uuid and <a href="http://localhost/middleware.php" target="_blank">http://localhost/middleware.php</a> as middleware, I get the following error message in vzlogger.log:<br><br>```<br>[Dec 02 16:57:16][http:/URL: <a href="http://localhost/middleware.php/data/bf85a8b0-723c-11ed-8470-c97c475d509f.json" target="_blank">http://localhost/middleware.php/data/bf85a8b0-723c-11ed-8470-c97c475d509f.json</a><br>[Dec 02 16:57:16][chn0] JSON request body: [ [ 1669996636107, 19.155198224319786 ] ]<br>[Dec 02 16:57:16][chn0] CURL: Trying ::1:80...<br>[Dec 02 16:57:16][chn0] CURL: connect to ::1 port 80 failed: Connection refused<br>[Dec 02 16:57:16][chn0] CURL: Trying 127.0.0.1:80...<br>[Dec 02 16:57:16][chn0] CURL: Connected to localhost (127.0.0.1) port 80 (#0)<br>[Dec 02 16:57:16][chn0] CURL: Sent 41 bytes: '[ [ 1669996636107, 19.155198224319786 ] ]'<br>[Dec 02 16:57:16][chn0] CURL: upload completely sent off: 41 out of 41 bytes<br>[Dec 02 16:57:16][chn0] CURL: Mark bundle as not supporting multiuse<br>[Dec 02 16:57:16][chn0] CURL: Received 105 bytes: '{"version":"0.3","exception":{"message":"Unknown context: 'middleware.php'","type":"Exception","code":0}}'<br>[Dec 02 16:57:16][chn0] CURL: Closing connection 0<br>```<br><br>I am at commit 240c882f3cb427d2ad3a1ded200ebb8ceac1e1d5 (HEAD -> master, origin/master, origin/HEAD) for <a href="http://volkszaehler.org" target="_blank">volkszaehler.org</a> and commit 27eb8d1566ec493d9cf64d2b53676c846ebb6e35 (HEAD -> master, origin/master, origin/HEAD) for vzlogger. <br><br>What could be the cause?</div><div dir="ltr">What information do you need in addition? </div><div dir="ltr"><br></div><div dir="ltr">Thanks in advance, Jens<br><br>The vzlogger config is: <div>{<br> "retry": 0,<br> "verbosity": 15,<br> "log": "/var/log/vzlogger.log",<br> "push": [],<br> "local": {<br> "enabled": false,<br> "port": 8080,<br> "index": false,<br> "timeout": 0,<br> "buffer": 0<br> },<br> "meters": [<br> {<br> "enabled": true,<br> "allowskip": false,<br> "protocol": "random",<br> "interval": 5,<br> "min": -5.0,<br> "max": 40.0,<br> "channel": {<br> "uuid": "e1466320-725b-11ed-bf33-d7056616a5b3",<br> "middleware": "<a href="http://demo.volkszaehler.org/middleware.php" target="_blank">http://demo.volkszaehler.org/middleware.php</a>"<br> }<br> }<br> ]<br>}<br></div><div><br></div><div>Output of "git diff" in the <a href="http://volkszaehler.org" target="_blank">volkszaehler.org</a> directory follows:<br><br>diff --git a/etc/middleware.json b/etc/middleware.json<br>index 30a128c..e818bc3 100644<br>--- a/etc/middleware.json<br>+++ b/etc/middleware.json<br>@@ -1,8 +1,8 @@<br> {<br> "host": "0.0.0.0",<br>- "port": 8080,<br>+ "port": 80,<br> "workers": 8,<br>- "static-directory": "htdocs",<br>+ "static-directory": "/var/www/<a href="http://volkszaehler.org/htdocs" target="_blank">volkszaehler.org/htdocs</a>",<br> "logging": 0,<br> "max-requests": 1000,<br> "bridge": "HttpKernel",<br>diff --git a/htdocs/js/options.js b/htdocs/js/options.js<br>index f738481..2ad00d9 100644<br>--- a/htdocs/js/options.js<br>+++ b/htdocs/js/options.js<br>@@ -38,8 +38,8 @@ vz.options = {<br> shortenLongTypes: false, // show shorter type names in table<br> middleware: [<br> {<br>- title: 'Local (default)',<br>- url: 'api'<br>+ title: 'Eichenstr 68',<br>+ url: ''<br> // live: 8082 // NOTE: live updates require<br> <br> // - push-server running and<br> <br> // - either apache proxy forwarding configured according to<br></div><div><br></div></div></div></div></div></div>
</blockquote></div>