johnholbrook / streamdeck-pihole

Streamdeck plugin for monitoring & controlling Pi-hole
https://apps.elgato.com/plugins/us.johnholbrook.pihole
32 stars 5 forks source link

Log location- Can't access Pi #8

Open p1r473 opened 2 years ago

p1r473 commented 2 years ago

Hi! ive been using this for ages and everything wass working fine I have 2 Pis, and as of today, one of the Pis is giving the yellow exclamation mark on this app (probably cant reach Pihole) and the disable is no longer working The other Pi is working great Ive tried reinstalling Pihole, resetting up the button for the Pi that doesnt work, checking the Lighttpd logs The IP is correct, the port is correct, and the API key is correct- and only one of the two Pis is no longer communicating with the button.

Where are the logs located so I can try and debug the communication error between the app and the pihole?

Firecul commented 2 years ago

C:\Users\<username>\AppData\Roaming\Elgato\StreamDeck\logs\us.johnholbrook.pihole0.log for me

Everything_johnholbrook_-_Everything

p1r473 commented 2 years ago

Im seeing this in my lighttpd logs:

2022-08-05 20:03:33: connections.c.800) fd: 11 request-len: 80\n\x16\x03\x01\x02
2022-08-05 20:03:33: request.c.359) missing CR before LF in header -> 400
2022-08-05 20:03:33: request.c.1332) request-header:\n\x16\x03\x01\x02
2022-08-05 20:03:33: response.c.158) Response-Header:\nHTTP/1.0 400 Bad Request\r\nContent-Type: text/html\r\nContent-Length: 345\r\nConnection: close\r\nDate: Sat, 06 Aug 2022 00:03:33 GMT\r\nServer: lighttpd/1.4.59\r\n\r\n
2022-08-05 20:03:33: connections.c.750) invalid request-line -> sending Status 400
2022-08-05 20:03:33: response.c.158) Response-Header:\nHTTP/1.0 400 Bad Request\r\nContent-Type: text/html\r\nContent-Length: 345\r\nConnection: close\r\nDate: Sat, 06 Aug 2022 00:03:33 GMT\r\nServer: lighttpd/1.4.59\r\n\r\n
2022-08-05 20:03:38: connections.c.750) invalid request-line -> sending Status 400
2022-08-05 20:03:38: response.c.158) Response-Header:\nHTTP/1.0 400 Bad Request\r\nContent-Type: text/html\r\nContent-Length: 345\r\nConnection: close\r\nDate: Sat, 06 Aug 2022 00:03:38 GMT\r\nServer: lighttpd/1.4.59\r\n\r\n
2022-08-05 20:03:38: connections.c.750) invalid request-line -> sending Status 400
2022-08-05 20:03:38: response.c.158) Response-Header:\nHTTP/1.0 400 Bad Request\r\nContent-Type: text/html\r\nContent-Length: 345\r\nConnection: close\r\nDate: Sat, 06 Aug 2022 00:03:38 GMT\r\nServer: lighttpd/1.4.59\r\n\r\n
2022-08-05 20:03:38: connections.c.750) invalid request-line -> sending Status 400
2022-08-05 20:03:38: response.c.158) Response-Header:\nHTTP/1.0 400 Bad Request\r\nContent-Type: text/html\r\nContent-Length: 345\r\nConnection: close\r\nDate: Sat, 06 Aug 2022 00:03:38 GMT\r\nServer: lighttpd/1.4.59\r\n\r\n
2022-08-05 20:03:38: connections.c.800) fd: 11 request-len: 118\n\x16\x03\x01\x02
2022-08-05 20:03:38: request.c.359) missing CR before LF in header -> 400

and this in my streamdeck logs:

20:01:22.040 {"13BA9D151DBD6E9F7E8344FC655B5935":{"action":"us.johnholbrook.pihole.temporarily-disable","settings":{"disable_time":"10","ph_addr":"192.168.1.186:82","ph_key":"xxx","stat":"none","show_status":true},"poller":1}}
20:01:22.040 us.johnholbrook.pihole.temporarily-disable titleParametersDidChange
20:01:22.040 us.johnholbrook.pihole.temporarily-disable titleParametersDidChange
20:01:22.040 us.johnholbrook.pihole.toggle willAppear
20:01:22.040 {"13BA9D151DBD6E9F7E8344FC655B5935":{"action":"us.johnholbrook.pihole.temporarily-disable","settings":{"disable_time":"10","ph_addr":"192.168.1.186:82","ph_key":"xxx","stat":"none","show_status":true},"poller":1},"F143CAF8A05E55BBB8A7C6E160029FC7":{"action":"us.johnholbrook.pihole.toggle","settings":{"ph_addr":"192.168.1.186:82","ph_key":"xxx","stat":"none","show_status":true},"poller":2}}
20:01:22.040 us.johnholbrook.pihole.toggle titleParametersDidChange
20:01:22.040 us.johnholbrook.pihole.toggle titleParametersDidChange
20:01:22.040 us.johnholbrook.pihole.temporarily-disable willAppear
20:01:22.041 {"13BA9D151DBD6E9F7E8344FC655B5935":{"action":"us.johnholbrook.pihole.temporarily-disable","settings":{"disable_time":"10","ph_addr":"192.168.1.186:82","ph_key":"xxx","stat":"none","show_status":true},"poller":1},"F143CAF8A05E55BBB8A7C6E160029FC7":{"action":"us.johnholbrook.pihole.toggle","settings":{"ph_addr":"192.168.1.186:82","ph_key":"xxx","stat":"none","show_status":true},"poller":2},"C062DE0AECDF0283788100AC1CD0C39A":{"action":"us.johnholbrook.pihole.temporarily-disable","settings":{"disable_time":"10","ph_addr":"192.168.1.168:82","ph_key":"xxx","stat":"none","show_status":true},"poller":3}}
20:01:22.041 us.johnholbrook.pihole.temporarily-disable titleParametersDidChange
20:01:22.041 us.johnholbrook.pihole.temporarily-disable titleParametersDidChange
20:01:22.041 us.johnholbrook.pihole.toggle willAppear
20:01:22.041 {"13BA9D151DBD6E9F7E8344FC655B5935":{"action":"us.johnholbrook.pihole.temporarily-disable","settings":{"disable_time":"10","ph_addr":"192.168.1.186:82","ph_key":"xxx","stat":"none","show_status":true},"poller":1},"F143CAF8A05E55BBB8A7C6E160029FC7":{"action":"us.johnholbrook.pihole.toggle","settings":{"ph_addr":"192.168.1.186:82","ph_key":"xxx","stat":"none","show_status":true},"poller":2},"C062DE0AECDF0283788100AC1CD0C39A":{"action":"us.johnholbrook.pihole.temporarily-disable","settings":{"disable_time":"10","ph_addr":"192.168.1.168:82","ph_key":"xxx","stat":"none","show_status":true},"poller":3},"B847598F712D7D36AA3F55E8903B56F6":{"action":"us.johnholbrook.pihole.toggle","settings":{"ph_addr":"192.168.1.168:82","ph_key":"xxx","stat":"none","show_status":true},"poller":4}}
20:01:22.041 us.johnholbrook.pihole.toggle titleParametersDidChange
20:01:22.041 us.johnholbrook.pihole.toggle titleParametersDidChange
20:01:25.553 us.johnholbrook.pihole.toggle keyDown
20:01:25.680 us.johnholbrook.pihole.toggle keyUp
20:01:28.627 us.johnholbrook.pihole.toggle keyDown
20:01:28.936 us.johnholbrook.pihole.toggle keyUp

Both of my Pis have the same config, almost identical. It looks like the app might be sending bad requests? image

p1r473 commented 2 years ago

When I remove the Streamdeck button for Pihole, the log stops producing these 400 bad requests The Pihole otherwise is working fine Its looking to me like the Streamdeck button is sending bad requests , but only to one of my Pis

p1r473 commented 2 years ago

Update: Ive got it to work by changing the button to point to Hostname:82 instead of 192.168.1.X:82 Im not sure why accessing it by hostname instead of IP works.... I do resolve the IP to the hostname directly so I dont understand the difference...

Sarlochin commented 1 year ago

Same issue, Same solution. With the hostname everything works instantly.