Closed hspindel closed 3 days ago
Hello,
If I understand you correctly, the error only occurred during the update, but no longer during the "normal" scans?
If this is the case, it could be related to the fact that I only kill the "arp-scan" process at the beginning of the update, as this usually takes the longest. However, I see that you have entered "many" hosts for ICMP monitoring. If you have only entered a few hosts here, the scan is usually finished if it was already running when you started the update. In your case, it could be that there was an overlap and that is why this error message appeared.
However, it also makes no sense to terminate the "ping" process, as this is called twice for each host. Killing the scan that may be running by terminating the Python script is too dangerous for possible database errors.
At this point, my only recommendation is to pause Pi.Alert in the settings and start the update process after the scan has finished (as shown in the status box). Of course, this overlap can also happen with a "normal" scan after the update. I could avoid this if I did not start a test scan after the update. 🤔
You understand me correctly.
I will try pausing Pi.Alert next time I do an update.
Thank you!
Is there an existing issue for this?
Current Behavior
Just upgraded to today's release (9/28/24). Got this error message during the upgrade. Just reporting it as it things seem to be working fine so it's apparently not a big issue.
Traceback (most recent call last): File "/root/pialert/back/pialert.py", line 3817, in
sys.exit(main())
^^^^^^
File "/root/pialert/back/pialert.py", line 100, in main
res = scan_network()
^^^^^^^^^^^^^^
File "/root/pialert/back/pialert.py", line 825, in scan_network
icmp_monitoring()
File "/root/pialert/back/pialert.py", line 2884, in icmp_monitoring
icmp_save_scandata(icmp_scan_results)
File "/root/pialert/back/pialert.py", line 2900, in icmp_save_scandata
set_icmphost_current_scan(host_ip, scan_data['scantime'], scan_data['icmp_sta
cmp_rtt'])
File "/root/pialert/back/pialert.py", line 2963, in set_icmphost_current_scan
sql.execute(sqlite_insert, table_data)
sqlite3.IntegrityError: UNIQUE constraint failed: ICMP_Mon_CurrentScan.cur_ip
Environment
No response
Anything else?
No response