sqlite3.OperationalError: table Online_History has no column named Offline_Devices
Is there an existing issue for this?
- [x] 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
- [x] N/A - This is an issue with the backend
Current Behavior
Hello,
Since I upgraded the docker image from jokobsk/netalertx 24.9 to 25.3, I have this error:
09:03:49 [Config] Plugins to load: ['ARPSCAN', 'AVAHISCAN', 'INTRNT', 'NBTSCAN', 'ICMP', 'MQTT', 'PUSHOVER', 'CSVBCKP', 'CUSTPROP', 'DBCLNP', 'MAINT', 'NEWDEV', 'NTFPRCS', 'SETPWD', 'SYNC', 'UI', 'VNDRPDT', 'WORKFLOWS']
* Serving Flask app 'graphql_server.graphql_server_start'
* Debug mode: on
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 203, in <module>
sys.exit(main())
^^^^^^
File "/app/server/__main__.py", line 139, in main
process_scan(db)
File "/app/server/networkscan.py", line 61, in process_scan
insertOnlineHistory(db)
File "/app/server/networkscan.py", line 275, in insertOnlineHistory
sql.execute(insert_query, (scanTimestamp, onlineDevices, downDevices, allDevics, archivedDevices, offlineDevices))
sqlite3.OperationalError: table Online_History has no column named Offline_Devices
In addition, if I save a settings, it's well saved but unable to load the settings page in UI until I restart the container.
The status seems also to be freeze to
And all devices are reported like down/offline.
Best regards,
Expected Behavior
no error
Steps To Reproduce
- Starting netalertx with latest version
app.conf
# General
#---------------------------
LOADED_PLUGINS=['ARPSCAN','SYNC','WORKFLOWS','PUSHOVER','NBTSCAN','NEWDEV','MQTT','UI','CUSTPROP','DBCLNP','INTRNT','MAINT','SETPWD','VNDRPDT','ICMP']
LOADED_PLUGINS__metadata="{}"
DISCOVER_PLUGINS=True
DISCOVER_PLUGINS__metadata="{}"
SCAN_SUBNETS=[XXXX]
SCAN_SUBNETS__metadata="{}"
LOG_LEVEL='minimal'
LOG_LEVEL__metadata="{}"
TIMEZONE='Europe/Paris'
TIMEZONE__metadata="{}"
PLUGINS_KEEP_HIST=250
PLUGINS_KEEP_HIST__metadata="{}"
REPORT_DASHBOARD_URL='XXXXXXXXXXXX'
REPORT_DASHBOARD_URL__metadata="{}"
DAYS_TO_KEEP_EVENTS=90
DAYS_TO_KEEP_EVENTS__metadata="{}"
HRS_TO_KEEP_NEWDEV=0
HRS_TO_KEEP_NEWDEV__metadata="{}"
HRS_TO_KEEP_OFFDEV=0
HRS_TO_KEEP_OFFDEV__metadata="{}"
CLEAR_NEW_FLAG=0
CLEAR_NEW_FLAG__metadata="{}"
API_CUSTOM_SQL='SELECT * FROM Devices WHERE devPresentLastScan = 0'
API_CUSTOM_SQL__metadata="{}"
VERSION='1742025073'
VERSION__metadata="{}"
NETWORK_DEVICE_TYPES=['AP','Gateway','Firewall','Hypervisor','Powerline','Switch','WLAN','PLC','Router','USB LAN Adapter','USB WIFI Adapter','Internet']
NETWORK_DEVICE_TYPES__metadata="{}"
GRAPHQL_PORT=20212
GRAPHQL_PORT__metadata="{}"
API_TOKEN='XXXXXXX'
API_TOKEN__metadata="{}"
docker-compose.yml
netalert:
restart: always
container_name: netalertx
network_mode: "host"
environment:
- TZ=Europe/Paris
volumes:
- /xx/netalertx:/app/config
- /xx/netalertx:/app/db
- /xx/pihole/pihole-FTL.db:/etc/pihole/pihole-FTL.db:ro
image: "jokobsk/netalertx:25.3"
depends_on:
- pihole
What installation are you running?
Production (netalertx)
app.log
09:03:36 Permissions check (All should be True) 09:03:36 ------------------------------------------------ 09:03:36 /config/app.conf | READ | True 09:03:36 /config/app.conf | WRITE | True 09:03:36 /db/app.db | READ | True 09:03:36 /db/app.db | WRITE | True 09:03:36 ------------------------------------------------ 09:03:36 [Setup] Attempting to fix permissions. 09:03:36 [Setup] Attempting to fix permissions. 09:03:37 [Setup] Attempting to fix permissions. 09:03:37 [Setup] Attempting to fix permissions. 09:03:37 [Config] reading config file 09:03:37 [Config] Plugins: Number of all plugins (including not loaded): 43 09:03:49 [Config] ⛔ Unloading WEBMON 09:03:49 [Config] ⛔ Unloading INTRSPD 09:03:49 [Config] ⛔ Unloading DDNS 09:03:49 [Config] ⛔ Unloading WEBHOOK 09:03:49 [Config] ⛔ Unloading TELEGRAM 09:03:49 [Config] ⛔ Unloading PUSHSAFER 09:03:49 [Config] ⛔ Unloading NTFY 09:03:49 [Config] ⛔ Unloading SMTP 09:03:49 [Config] ⛔ Unloading APPRISE 09:03:49 [Config] ⛔ Unloading NSLOOKUP 09:03:49 [Config] ⛔ Unloading NMAP 09:03:49 [Config] ⛔ Unloading NMAPDEV 09:03:49 [Config] ⛔ Unloading DHCPSRVS 09:03:49 [Config] ⛔ Unloading DHCPLSS 09:03:49 [Config] ⛔ Unloading PIHOLE 09:03:49 [Config] ⛔ Unloading UNFIMP 09:03:49 [Config] ⛔ Unloading SNMPDSC 09:03:49 [Config] ⛔ Unloading MTSCAN 09:03:49 [Config] ⛔ Unloading LUCIRPC 09:03:49 [Config] ⛔ Unloading ASUSWRT 09:03:49 [Config] ⛔ Unloading WOL 09:03:49 [Config] ⛔ Unloading OMDSDNOPENAPI 09:03:49 [Config] ⛔ Unloading OMDSDN 09:03:49 [Config] ⛔ Unloading IPNEIGH 09:03:49 [Config] ⛔ Unloading FREEBOX 09:03:49 [Config] Number of Plugins to load: 18 09:03:49 [Config] Plugins to load: ['ARPSCAN', 'AVAHISCAN', 'INTRNT', 'NBTSCAN', 'ICMP', 'MQTT', 'PUSHOVER', 'CSVBCKP', 'CUSTPROP', 'DBCLNP', 'MAINT', 'NEWDEV', 'NTFPRCS', 'SETPWD', 'SYNC', 'UI', 'VNDRPDT', 'WORKFLOWS'] 09:03:54 [Config] Imported new settings config [31m[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.[0m
- Running on all addresses (0.0.0.0)
- Running on http://127.0.0.1:20212
- Running on http://XXXX:20212 [33mPress CTRL+C to quit[0m 09:03:54 [Process Scan] Print Stats 09:03:54 [Process Scan] Stats end
Debug enabled
- [x] 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.