-
-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type and Network Node (MAC) dropdown is not work #483
Comments
Hi there, Thank you for all the details. Can you please have a look if there are any errors in the browser dev console? Here is an example how to debug a similar issue: https://github.com/jokob-sk/Pi.Alert/blob/main/docs/DEBUG_INVALID_JSON.md Thanks in advance, |
ok i got 1 jquery.min.js:2 GET http://192.168.31.215:20211/php/server/devices.php?action=getDeviceTypes 500 (Internal Server Error) |
Hummmm, can you post what's in |
|
Oh, also please post the content of the |
ok header
request/payload response |
root@bpserver:/# tail -n 20 -f /var/log/php7.4-fpm.log |
ummmm in my pialert.php_errors.log is blank log |
hummm... I'm not smarter... can you check nginx logs shortly after the 500 error?
|
tail -n 20 error.log
#1 {main}
thrown in /home/pi/pialert/front/php/server/devices.php on line 860" while reading response header from upstream, client: 192.168.31.187, server: , request: "GET /php/server/devices.php?action=getDeviceTypes HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "192.168.31.215:20211", referrer: "http://192.168.31.215:20211/deviceDetails.php?mac=50:eb:f8:1b:5f:98"
2023/10/15 15:49:58 [error] 35#35: *1773 FastCGI sent in stderr: "PHP message: PHP Warning: file_get_contents(./log/pialert.php_errors.log): failed to open stream: No such file or directory in /home/pi/pialert/front/maintenance.php on line 442PHP message: PHP Warning: filesize(): stat failed for ./log/pialert.php_errors.log in /home/pi/pialert/front/maintenance.php on line 447PHP message: PHP Warning: file_get_contents(./log/pialert_pholus_lastrun.log): failed to open stream: No such file or directory in /home/pi/pialert/front/maintenance.php on line 460PHP message: PHP Warning: filesize(): stat failed for ./log/pialert_pholus_lastrun.log in /home/pi/pialert/front/maintenance.php on line 465" while reading upstream, client: 192.168.31.187, server: , request: "GET /maintenance.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "192.168.31.215:20211", referrer: "http://192.168.31.215:20211/systeminfo.php"
2023/10/15 15:49:58 [error] 35#35: *1773 FastCGI sent in stderr: "PHP message: PHP Warning: file_get_contents(./log/stdout.log): failed to open stream: No such file or directory in /home/pi/pialert/front/maintenance.php on line 495PHP message: PHP Warning: filesize(): stat failed for ./log/stdout.log in /home/pi/pialert/front/maintenance.php on line 500PHP message: PHP Warning: file_get_contents(./log/stderr.log): failed to open stream: No such file or directory in /home/pi/pialert/front/maintenance.php on line 512" while reading upstream, client: 192.168.31.187, server: , request: "GET /maintenance.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "192.168.31.215:20211", referrer: "http://192.168.31.215:20211/systeminfo.php"
2023/10/15 15:49:58 [error] 35#35: *1773 FastCGI sent in stderr: "PHP message: PHP Warning: filesize(): stat failed for ./log/stderr.log in /home/pi/pialert/front/maintenance.php on line 517" while reading upstream, client: 192.168.31.187, server: , request: "GET /maintenance.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "192.168.31.215:20211", referrer: "http://192.168.31.215:20211/systeminfo.php"
2023/10/15 15:50:09 [error] 35#35: *1773 open() "/var/www/html/log/pialert.php_errors.log" failed (2: No such file or directory), client: 192.168.31.187, server: , request: "GET /log/pialert.php_errors.log HTTP/1.1", host: "192.168.31.215:20211", referrer: "http://192.168.31.215:20211/maintenance.php"
2023/10/15 15:50:09 [error] 35#35: *1773 open() "/var/www/html/favicon.ico" failed (2: No such file or directory), client: 192.168.31.187, server: , request: "GET /favicon.ico HTTP/1.1", host: "192.168.31.215:20211", referrer: "http://192.168.31.215:20211/log/pialert.php_errors.log"
2023/10/15 15:50:12 [error] 35#35: *1773 FastCGI sent in stderr: "PHP message: PHP Warning: file_get_contents(./log/pialert.php_errors.log): failed to open stream: No such file or directory in /home/pi/pialert/front/maintenance.php on line 442PHP message: PHP Warning: filesize(): stat failed for ./log/pialert.php_errors.log in /home/pi/pialert/front/maintenance.php on line 447PHP message: PHP Warning: file_get_contents(./log/pialert_pholus_lastrun.log): failed to open stream: No such file or directory in /home/pi/pialert/front/maintenance.php on line 460PHP message: PHP Warning: filesize(): stat failed for ./log/pialert_pholus_lastrun.log in /home/pi/pialert/front/maintenance.php on line 465" while reading upstream, client: 192.168.31.187, server: , request: "GET /maintenance.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "192.168.31.215:20211", referrer: "http://192.168.31.215:20211/systeminfo.php"
2023/10/15 15:50:12 [error] 35#35: *1773 FastCGI sent in stderr: "PHP message: PHP Warning: file_get_contents(./log/stdout.log): failed to open stream: No such file or directory in /home/pi/pialert/front/maintenance.php on line 495PHP message: PHP Warning: filesize(): stat failed for ./log/stdout.log in /home/pi/pialert/front/maintenance.php on line 500PHP message: PHP Warning: file_get_contents(./log/stderr.log): failed to open stream: No such file or directory in /home/pi/pialert/front/maintenance.php on line 512" while reading upstream, client: 192.168.31.187, server: , request: "GET /maintenance.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "192.168.31.215:20211", referrer: "http://192.168.31.215:20211/systeminfo.php"
2023/10/15 15:50:12 [error] 35#35: *1773 FastCGI sent in stderr: "PHP message: PHP Warning: filesize(): stat failed for ./log/stderr.log in /home/pi/pialert/front/maintenance.php on line 517" while reading upstream, client: 192.168.31.187, server: , request: "GET /maintenance.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "192.168.31.215:20211", referrer: "http://192.168.31.215:20211/systeminfo.php"
2023/10/15 18:24:31 [error] 35#35: *1817 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function getNetworkTypes() in /home/pi/pialert/front/php/server/devices.php:860
Stack trace:
#0 /home/pi/pialert/front/php/server/devices.php(51): getDeviceTypes()
#1 {main}
thrown in /home/pi/pialert/front/php/server/devices.php on line 860" while reading response header from upstream, client: 192.168.31.187, server: , request: "GET /php/server/devices.php?action=getDeviceTypes HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "192.168.31.215:20211", referrer: "http://192.168.31.215:20211/deviceDetails.php?mac=Internet"
2023/10/16 00:58:30 [error] 36#36: *1913 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function getNetworkTypes() in /home/pi/pialert/front/php/server/devices.php:860
Stack trace:
#0 /home/pi/pialert/front/php/server/devices.php(51): getDeviceTypes()
#1 {main}
thrown in /home/pi/pialert/front/php/server/devices.php on line 860" while reading response header from upstream, client: 192.168.31.187, server: , request: "GET /php/server/devices.php?action=getDeviceTypes HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "192.168.31.215:20211", referrer: "http://192.168.31.215:20211/deviceDetails.php?mac=Internet"
tail -n 20 access.log
192.168.31.187 - - [16/Oct/2023:00:59:14 +0700] "GET /api/app_state.json?nocache=1697392754694 HTTP/1.1" 200 264 "http://192.168.31.215:20211/deviceDetails.php?mac=Internet" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
192.168.31.187 - - [16/Oct/2023:00:59:16 +0700] "GET /api/app_state.json?nocache=1697392756691 HTTP/1.1" 200 264 "http://192.168.31.215:20211/deviceDetails.php?mac=Internet" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
192.168.31.187 - - [16/Oct/2023:00:59:18 +0700] "GET /api/app_state.json?nocache=1697392758693 HTTP/1.1" 200 264 "http://192.168.31.215:20211/deviceDetails.php?mac=Internet" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
192.168.31.187 - - [16/Oct/2023:00:59:20 +0700] "GET /api/app_state.json?nocache=1697392760692 HTTP/1.1" 200 264 "http://192.168.31.215:20211/deviceDetails.php?mac=Internet" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
192.168.31.187 - - [16/Oct/2023:00:59:22 +0700] "GET /api/app_state.json?nocache=1697392762692 HTTP/1.1" 200 264 "http://192.168.31.215:20211/deviceDetails.php?mac=Internet" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
192.168.31.187 - - [16/Oct/2023:00:59:24 +0700] "GET /api/app_state.json?nocache=1697392764690 HTTP/1.1" 200 264 "http://192.168.31.215:20211/deviceDetails.php?mac=Internet" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
192.168.31.187 - - [16/Oct/2023:00:59:26 +0700] "GET /api/app_state.json?nocache=1697392766689 HTTP/1.1" 200 264 "http://192.168.31.215:20211/deviceDetails.php?mac=Internet" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
192.168.31.187 - - [16/Oct/2023:00:59:28 +0700] "GET /api/app_state.json?nocache=1697392768689 HTTP/1.1" 200 264 "http://192.168.31.215:20211/deviceDetails.php?mac=Internet" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
192.168.31.187 - - [16/Oct/2023:00:59:30 +0700] "GET /api/app_state.json?nocache=1697392770690 HTTP/1.1" 200 264 "http://192.168.31.215:20211/deviceDetails.php?mac=Internet" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
192.168.31.187 - - [16/Oct/2023:00:59:30 +0700] "GET /php/server/devices.php?action=getDeviceData&mac=Internet&period=1%20day HTTP/1.1" 200 427 "http://192.168.31.215:20211/deviceDetails.php?mac=Internet" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
192.168.31.187 - - [16/Oct/2023:00:59:32 +0700] "GET /api/app_state.json?nocache=1697392772690 HTTP/1.1" 200 264 "http://192.168.31.215:20211/deviceDetails.php?mac=Internet" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
192.168.31.187 - - [16/Oct/2023:00:59:34 +0700] "GET /api/app_state.json?nocache=1697392774689 HTTP/1.1" 200 264 "http://192.168.31.215:20211/deviceDetails.php?mac=Internet" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
192.168.31.187 - - [16/Oct/2023:00:59:36 +0700] "GET /api/app_state.json?nocache=1697392776690 HTTP/1.1" 200 264 "http://192.168.31.215:20211/deviceDetails.php?mac=Internet" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
192.168.31.187 - - [16/Oct/2023:00:59:38 +0700] "GET /api/app_state.json?nocache=1697392778689 HTTP/1.1" 200 264 "http://192.168.31.215:20211/deviceDetails.php?mac=Internet" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
192.168.31.187 - - [16/Oct/2023:00:59:40 +0700] "GET /api/app_state.json?nocache=1697392780690 HTTP/1.1" 200 264 "http://192.168.31.215:20211/deviceDetails.php?mac=Internet" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
192.168.31.187 - - [16/Oct/2023:00:59:42 +0700] "GET /api/app_state.json?nocache=1697392782687 HTTP/1.1" 200 264 "http://192.168.31.215:20211/deviceDetails.php?mac=Internet" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
192.168.31.187 - - [16/Oct/2023:00:59:44 +0700] "GET /api/app_state.json?nocache=1697392784688 HTTP/1.1" 200 264 "http://192.168.31.215:20211/deviceDetails.php?mac=Internet" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
192.168.31.187 - - [16/Oct/2023:00:59:46 +0700] "GET /api/app_state.json?nocache=1697392786686 HTTP/1.1" 200 264 "http://192.168.31.215:20211/deviceDetails.php?mac=Internet" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
192.168.31.187 - - [16/Oct/2023:00:59:47 +0700] "GET /api/app_state.json?nocache=1697392787700 HTTP/1.1" 200 264 "http://192.168.31.215:20211/deviceDetails.php?mac=Internet" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
192.168.31.187 - - [16/Oct/2023:00:59:49 +0700] "GET /api/app_state.json?nocache=1697392789686 HTTP/1.1" 200 264 "http://192.168.31.215:20211/deviceDetails.php?mac=Internet" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
…________________________________
จาก: jokob-sk ***@***.***>
ส่ง: 15 ตุลาคม 2566 18:24
ถึง: jokob-sk/Pi.Alert ***@***.***>
สำเนาถึง: Phongsakorn Wisetthon ***@***.***>; Author ***@***.***>
ชื่อเรื่อง: Re: [jokob-sk/Pi.Alert] type and Network Node (MAC) dropdown is not work (Issue #483)
hummm... I'm not smarter... can you check nginx logs shortly after the 500 error?
cd /var/log/nginx
/var/log/nginx# tail -n 20 error.log
tail -n 20 access.log
—
Reply to this email directly, view it on GitHub<https://github.com/jokob-sk/Pi.Alert/issues/483#issuecomment-1763359389>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAW7ZUSLT4HGB4TV2AMKRLTX7PBVVANCNFSM6AAAAAA6AZXQV4>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Thanks so much for all the help-found the bug 🐛:
This will be fixed in the next release. |
In the mean time you can delete this line: This should fix the issue until I release a fix. |
ok, i will wait for next release. |
keeping it open for others to find |
This looks to be same as I reported here (second bug) |
Released in 23.11.11 |
Describe the issue
type and Network Node (MAC) dropdown is not work
docker-compose.yml
.env
Screenshots
Paste last few lines from
pialert.log
13:37:06 [Send API] Updating notification_* files in /home/pi/pialert/front/api/
13:37:06 [Notification] Skip email
13:37:06 [Notification] Skip Apprise
13:37:06 [Notification] Skip webhook
13:37:06 [Notification] Skip NTFY
13:37:06 [Notification] Skip PUSHSAFER
13:37:06 [Notification] Skip MQTT
13:37:06 [Notification] Notifications changes: 0
13:37:06 [MAIN] Process: Wait
13:37:11 [API] Updating table_devices.json file in /front/api
13:37:11 [API] Updating table_custom_endpoint.json file in /front/api
13:37:11 [MAIN] waiting to start next loop
13:37:16 [MAIN] waiting to start next loop
13:37:21 [MAIN] waiting to start next loop
13:37:26 [MAIN] waiting to start next loop
13:37:31 [MAIN] waiting to start next loop
13:37:36 [MAIN] waiting to start next loop
13:37:41 [MAIN] waiting to start next loop
13:37:46 [MAIN] waiting to start next loop
13:37:51 [MAIN] waiting to start next loop
13:37:56 [Notification] Check if something to report
13:37:56 [Notification] Open text Template
13:37:56 [Notification] Open html Template
13:37:56 [Notification] Using template/back/report_template.html
13:37:56 [Notification] included sections: ['new_devices', 'down_devices', 'events']
13:37:56 [Notification] New Devices sections done.
13:37:56 [Notification] Down Devices sections done.
13:37:56 [Notification] Events sections done.
13:37:56 [Notification] No changes to report
13:37:56 [Notification] Notifications changes: 0
13:37:56 [MAIN] Process: Wait
13:38:01 [MAIN] waiting to start next loop
13:38:06 [MAIN] waiting to start next loop
13:38:12 [MAIN] waiting to start next loop
13:38:17 [MAIN] waiting to start next loop
13:38:22 [MAIN] waiting to start next loop
13:38:27 [MAIN] waiting to start next loop
13:38:32 [MAIN] waiting to start next loop
13:38:37 [MAIN] waiting to start next loop
13:38:42 [MAIN] waiting to start next loop
13:38:47 [MAIN] waiting to start next loop
13:38:52 [MAIN] waiting to start next loop
13:38:57 [Notification] Check if something to report
13:38:57 [Notification] Open text Template
13:38:57 [Notification] Open html Template
13:38:57 [Notification] Using template/back/report_template.html
13:38:57 [Notification] included sections: ['new_devices', 'down_devices', 'events']
13:38:57 [Notification] New Devices sections done.
13:38:57 [Notification] Down Devices sections done.
13:38:57 [Notification] Events sections done.
13:38:57 [Notification] No changes to report
13:38:57 [Notification] Notifications changes: 0
13:38:57 [MAIN] Process: Wait
13:39:02 [MAIN] waiting to start next loop
13:39:07 [MAIN] waiting to start next loop
13:39:12 [MAIN] waiting to start next loop
13:39:17 [MAIN] waiting to start next loop
13:39:22 [MAIN] waiting to start next loop
13:39:27 [MAIN] waiting to start next loop
13:39:32 [MAIN] waiting to start next loop
13:39:37 [MAIN] waiting to start next loop
13:39:42 [MAIN] waiting to start next loop
13:39:47 [MAIN] waiting to start next loop
13:39:52 [MAIN] waiting to start next loop
13:39:57 [MAIN] waiting to start next loop
13:40:03 [Plugins] ---------------------------------------------
13:40:03 [Plugins] display_name: DDNS update
13:40:03 [Plugins] Executing: python3 /home/pi/pialert/front/plugins/ddns_update/script.py prev_ip={prev_ip} DDNS_UPDATE_URL={DDNS_UPDATE_URL} DDNS_USER={DDNS_USER} DDNS_PASSWORD={DDNS_PASSWORD} DDNS_DOMAIN={DDNS_DOMAIN}
13:40:22 [Plugins] No output received from the plugin DDNS - enable LOG_LEVEL=debug and check logs
13:40:22 [Plugins] ---------------------------------------------
13:40:22 [Plugins] display_name: Internet check
13:40:22 [Plugins] Executing: python3 /home/pi/pialert/front/plugins/internet_ip/script.py prev_ip={prev_ip} DIG_GET_IP_ARG={DIG_GET_IP_ARG}
13:40:22 [Plugins] SUCCESS, received 1 entries
13:40:22 [API] Updating table_plugins_history.json file in /front/api
13:40:22 [Plugins] ---------------------------------------------
13:40:22 [Plugins] display_name: Arp-Scan (Network scan)
13:40:22 [Plugins] Executing: python3 /home/pi/pialert/front/plugins/arp_scan/script.py userSubnets={subnets}
13:40:34 [Plugins] SUCCESS, received 29 entries
13:40:34 [API] Updating table_plugins_history.json file in /front/api
13:40:34 [Process Scan] Processing scan results
13:40:34 [Process Scan] Print Stats
13:40:34 [Scan Stats] Devices Detected.......: 31
13:40:34 [Scan Stats] New Devices............: 0
13:40:34 [Scan Stats] Down Alerts............: 0
13:40:34 [Scan Stats] New Down Alerts........: 0
13:40:34 [Scan Stats] New Connections........: 1
13:40:34 [Scan Stats] Disconnections.........: 0
13:40:34 [Scan Stats] IP Changes.............: 0
13:40:34 [Scan Stats] Scan Method Statistics:
13:40:34 INTRNT: 1
13:40:34 arp-scan: 29
13:40:34 local_MAC: 1
13:40:34 [Process Scan] Stats end
13:40:34 [Process Scan] Sessions Events (connect / discconnect)
13:40:34 [Process Scan] Creating new devices
13:40:34 [Process Scan] Updating Devices Info
13:40:34 [Process Scan] Resolve devices names
13:40:34 [Update Device Name] Trying to resolve devices without name
13:40:34 [Update Device Name] Pholus entries from prev scans: 0
13:40:34 [Update Device Name] Names Found (DiG/Pholus): 0 (0/0)
The text was updated successfully, but these errors were encountered: