-
-
Notifications
You must be signed in to change notification settings - Fork 372
Description
Is there an existing issue for this?
- I have searched the existing open and closed issues and I checked the docs https://jokob-sk.github.io/NetAlertX/
The issue occurs in the following browsers. Select at least 2.
- Firefox
- Chrome
- Edge
- Safari (unsupported) - PRs welcome
- N/A - This is an issue with the backend
Current Behavior
After a scan, the routine fails due to an error in create_new_device and this completely stops the current and further checks.
Here are some logs from the Docker container. I turned off most plugins but it still happens.
22:55:41 [ARPSCAN] Devices List len:40
22:55:41 [ARPSCAN] Devices List:[{'ip': '192.168.1.21', 'mac': '14:c9:13:d2:7e:72', 'hw': 'LG Electronics', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.38', 'mac': 'dc:00:b0:5d:f7:4f', 'hw': 'FREEBOX SAS', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.64', 'mac': '38:b8:eb:c8:c3:29', 'hw': 'Ajax Systems Inc', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.82', 'mac': 'bc:24:11:2a:f5:d7', 'hw': '(Unknown)', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.3', 'mac': 'e8:b2:fe:1c:f9:ba', 'hw': 'HUMAX Co., Ltd.', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.101', 'mac': 'a8:42:a1:5e:1d:65', 'hw': '(Unknown)', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.94', 'mac': 'd8:be:65:9f:96:3c', 'hw': 'Amazon Technologies Inc.', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.111', 'mac': 'a8:42:a1:5e:1d:65', 'hw': '(Unknown)', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.11', 'mac': '9c:53:22:2a:8c:44', 'hw': 'TP-Link Corporation Limited', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.108', 'mac': 'e8:4c:4a:e4:70:06', 'hw': '(Unknown)', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.132', 'mac': 'bc:24:11:7a:7f:bf', 'hw': '(Unknown)', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.23', 'mac': 'e8:d8:7e:71:5b:dd', 'hw': 'Amazon Technologies Inc.', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.140', 'mac': 'dc:00:b0:5d:ad:25', 'hw': 'FREEBOX SAS', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.141', 'mac': 'd8:3a:dd:73:cd:81', 'hw': 'Raspberry Pi Trading Ltd', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.142', 'mac': 'bc:24:11:d5:78:c0', 'hw': '(Unknown)', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.25', 'mac': 'c4:82:e1:d7:09:6c', 'hw': '(Unknown)', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.146', 'mac': 'c8:a3:62:d2:5e:f3', 'hw': '(Unknown)', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.26', 'mac': '48:55:19:ca:45:c2', 'hw': 'Espressif Inc.', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.138', 'mac': '1c:f8:d0:85:9f:8d', 'hw': 'Samsung Electronics Co.,Ltd', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.184', 'mac': 'ec:2b:eb:8a:4d:ad', 'hw': 'Amazon Technologies Inc.', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.202', 'mac': '00:14:fd:17:6d:af', 'hw': 'Thecus Technology Corp.', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.83', 'mac': '1c:93:c4:65:fb:9e', 'hw': 'Amazon Technologies Inc.', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.254', 'mac': 'dc:00:b0:61:81:91', 'hw': 'FREEBOX SAS', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.71', 'mac': '10:27:f5:9f:7b:f6', 'hw': 'TP-Link Corporation Limited', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.144', 'mac': '38:b8:eb:c8:c3:2a', 'hw': 'Ajax Systems Inc', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.148', 'mac': '90:11:95:fc:a9:1d', 'hw': 'Amazon Technologies Inc.', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.154', 'mac': 'c4:82:e1:d6:f9:b2', 'hw': '(Unknown)', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.131', 'mac': '48:5f:99:37:58:13', 'hw': 'Cloud Network Technology (Samoa) Limited', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.189', 'mac': '7c:b0:c2:1f:ec:44', 'hw': 'Intel Corporate', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.51', 'mac': '08:a6:f7:a9:b6:34', 'hw': '(Unknown)', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.81', 'mac': '24:94:94:d7:62:05', 'hw': 'Hong Kong Bouffalo Lab Limited', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.158', 'mac': 'c4:82:e1:d7:10:c7', 'hw': '(Unknown)', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.166', 'mac': '9c:53:22:2a:7b:ea', 'hw': 'TP-Link Corporation Limited', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.170', 'mac': 'c4:82:e1:d7:06:a5', 'hw': '(Unknown)', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.190', 'mac': 'd0:c9:07:a1:a8:06', 'hw': '(Unknown)', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.153', 'mac': '28:ee:52:74:78:bc', 'hw': 'TP-LINK TECHNOLOGIES CO.,LTD.', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.24', 'mac': '0c:dc:91:0e:84:8d', 'hw': '(Unknown)', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.43', 'mac': 'cc:7b:5c:51:ad:74', 'hw': '(Unknown)', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.104', 'mac': '28:ee:52:74:70:ec', 'hw': 'TP-LINK TECHNOLOGIES CO.,LTD.', 'interface': '192.168.1.0/24 --interface=ens18'}, {'ip': '192.168.1.187', 'mac': '24:94:94:15:9e:9d', 'hw': 'Hong Kong Bouffalo Lab Limited', 'interface': '192.168.1.0/24 --interface=ens18'}]
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/app/server/__main__.py", line 244, in <module>
sys.exit(main())
^^^^^^
File "/app/server/__main__.py", line 147, in main
process_scan(db)
File "/app/server/scan/session_events.py", line 45, in process_scan
create_new_devices (db)
File "/app/server/scan/device_handling.py", line 450, in create_new_devices
cur_Name = cur_Name.strip() if cur_Name else '(unknown)'
^^^^^^^^^^^^^^
AttributeError: 'float' object has no attribute 'strip'
Expected Behavior
The routine should end and devices should be created.
Steps To Reproduce
No response
app.conf
docker-compose.yml
What installation are you running?
Production (netalertx)
app.log
22:55:43 [Plugins] Processed and deleted file: /app/log/plugins/last_result.INTRNT.log
22:55:43 [Plugins] SUCCESS for INTRNT received 1 entries
22:55:43 [Plugins] Processing : INTRNT
22:55:43 [Plugins] Should I update API (userUpdatedDevices): False
22:55:43 [Scheduler] run for CSVBCKP: NO
22:55:43 [Scheduler] run for DBCLNP: NO
22:55:43 [Scheduler] run for MAINT: NO
22:55:43 [Scheduler] run for VNDRPDT: NO
22:55:43 [Process Scan] Exclude ignored devices
22:55:43 [Process Scan] Processing scan results
22:55:43 [Process Scan] Print Stats
22:55:43 [Scan Stats] Devices Detected.......: 49
22:55:43 [Scan Stats] New Devices............: 0
22:55:43 [Scan Stats] Down Alerts............: 0
22:55:43 [Scan Stats] New Down Alerts........: 0
22:55:43 [Scan Stats] New Connections........: 16
22:55:43 [Scan Stats] Disconnections.........: 3
22:55:43 [Scan Stats] IP Changes.............: 4
22:55:43 [Scan Stats] Scan Method Statistics:
22:55:43 ARPSCAN: 2
22:55:43 Freebox: 46
22:55:43 INTRNT: 1
22:55:43 [Process Scan] Stats end
22:55:43 [Process Scan] Sessions Events (connect / disconnect)
22:55:43 [Process Scan] Creating new devices
Debug enabled
- I have read and followed the steps in the wiki link above and provided the required debug logs and the log section covers the time when the issue occurs.