Closed modem7 closed 1 month ago
Thanks for the info. I'll have a look at it.
I have run the update process on a Debian 9, a Linux Mint 22 and an Ubuntu Server LTS 22.04 and have not been able to reproduce the error so far. I will test other distributions.
Are you able to try on Ubuntu LTS 24.04?
On 22.04, I don't seem to have any issues, but as soon as I upgrade to 24.04.1, I seem to get the issues.
On 22.04: python version = Python 3.11.6
On 24.04: python version = Python 3.12.3
Before the pialert upgrade (but post 24.04 upgrade), if I do ❯ python3 $HOME/pialert/back/pialert.py 1
I get:
Traceback (most recent call last):
File "/home/modem7//pialert/back/pialert.py", line 21, in <module>
from mac_vendor_lookup import MacLookup
ModuleNotFoundError: No module named 'mac_vendor_lookup'
And if I do the upgrade again, as above I get:
Configured Pi.Alert scans are enabled
- Testing Pi.Alert HW vendors database update process...
*** PLEASE WAIT A COUPLE OF MINUTES...
/home/modem7/pialert/back/update_vendors.sh: 20: cd: can't cd to /usr/share/ieee-data/
sudo: get-oui: command not found
Pi.Alert v2024-09-01
---------------------------------------------------------
Executing user: modem7
Update HW Vendors
Timestamp: 2024-09-05 03:23:00
Updating vendors DB...
Traceback (most recent call last):
File "/home/modem7//pialert/back/pialert.py", line 3609, in <module>
sys.exit(main())
^^^^^^
File "/home/modem7//pialert/back/pialert.py", line 94, in main
res = update_devices_MAC_vendors('-s')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/modem7//pialert/back/pialert.py", line 627, in update_devices_MAC_vendors
update_output = subprocess.check_output (update_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['sh', '/home/modem7/pialert/back/update_vendors.sh', '-s']' returned non-zero exit status 1.
Post update, I get:
❯ python3 $HOME/pialert/back/pialert.py 1
Pi.Alert v2024-09-01
---------------------------------------------------------
Executing user: modem7
Scan Devices
Timestamp: 2024-09-05 03:24:00
Scanning...
arp-scan Method...
arp-scan: Multiple interfaces
sudo: arp-scan: command not found
sudo: arp-scan: command not found
sudo: arp-scan: command not found
sudo: arp-scan: command not found
sudo: arp-scan: command not found
Pi-hole 5 Method...
...Skipped
DHCP Leases Method...
...Skipped
Fritzbox Method...
...Skipped
Mikrotik Method...
...Skipped
UniFi Method...
/usr/lib/python3/dist-packages/urllib3/connectionpool.py:1100: InsecureRequestWarning: Unverified HTTPS request is being made to host '192.168.0.200'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
warnings.warn(
Satellite Import...
...Skipped
Processing scan results...
Processing ignore list...
No MAC-Ignore list defined
IP-Ignore list is empty
Devices Detected.......: 40
arp-scan Method....: 0
Pi-hole Method.....: +0
Fritzbox Method....: +0
Mikrotik Method....: +0
UniFi Method.......: +39
New Devices........: 0
Devices in this scan...: 40
Down Alerts........: 6
New Down Alerts....: 0
New Connections....: 0
Disconnections.....: 0
IP Changes.........: 0
Updating DB Info...
Sessions Events (connect / discconnect) ...
Creating new devices...
Updating Devices Info...
grep: /usr/share/arp-scan/ieee-oui.txt: No such file or directory
Trying to resolve devices without name.......
Names updated: 0
Voiding false (ghost) disconnections...
Pairing session events (connection / disconnection) ...
Creating sessions snapshot...
Skipping repeated notifications...
Calculate Activity History...
Reporting...
Formating report...
No changes to report...
Notifications: 11
DONE!!!
So, looking further, it seems that the arp-scan
package gets removed/superseded/changed/whatever, and needs reinstalling.
❯ sudo apt-get install -y arp-scan
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
ibverbs-providers ieee-data libibverbs1 libnl-route-3-200 libpcap0.8t64
The following NEW packages will be installed:
arp-scan ibverbs-providers ieee-data libibverbs1 libnl-route-3-200 libpcap0.8t64
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 1274 kB/3387 kB of archives.
After this operation, 17.8 MB of additional disk space will be used.
So, if I do the upgrade to Noble (24.04), then manually install arp-scan, then do the pialert upgrade, I don't get the errors surrounding:
*** PLEASE WAIT A COUPLE OF MINUTES...
/home/modem7/pialert/back/update_vendors.sh: 20: cd: can't cd to /usr/share/ieee-data/
sudo: get-oui: command not found
and
Updating vendors DB...
Traceback (most recent call last):
File "/home/modem7//pialert/back/pialert.py", line 3609, in <module>
sys.exit(main())
^^^^^^
Resolution: Add arp-scan
to the update (and installation) script.
I have now found some time. Since reacting to an operating system update within my update script becomes a bit complex (there are not only Ubuntu servers), I will make a separate “Fix_Installation” script.
What I have found out thanks to your support is:
Because of the warning (InsecureRequestWarning) These warnings are actually deactivated in the script. The assumption is that they come from the python module used for the Unifi import.
EDIT:
I will also add "arp-scan" to the update script
Is there an existing issue for this?
Current Behavior
Issues with current update. Throws up errors.
Pi.Alert v2024-09-01
Environment
Static hostname: PiAlert Virtualization: lxc Operating System: Ubuntu 24.04.1 LTS Kernel: Linux 6.8.12-1-pve Architecture: x86-64
Anything else?
No response