Skip to content
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

Inconsistencies after fresh install #1001

Open
3 of 7 tasks
harr2969 opened this issue Feb 18, 2025 · 10 comments
Open
3 of 7 tasks

Inconsistencies after fresh install #1001

harr2969 opened this issue Feb 18, 2025 · 10 comments
Labels
bug 🐛 Something isn't working Waiting for reply⏳ Waiting for the original poster to respond, or discussion in progress.

Comments

@harr2969
Copy link

harr2969 commented Feb 18, 2025

Is there an existing issue for this?

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

  1. Slow UI after clean install
  2. Popup for DB upgrade after clean install

Expected Behavior

UI is responsive

Steps To Reproduce

clear DB and config folders
stop docker and rm container
start docker with below command
open UI -- wait.

get message 10 mins later?
Image


[Upgrade] : App upgraded 🚀 Please clear the cache:
Click OK below
Clear the browser cache (shift + browser refresh button)
Clear app cache with the  (reload) button in the header
Go to Settings and click Save
Check out new features and what has changed in the [📓 release notes](https://github.com/jokob-sk/NetAlertX/releases).

Hit shift-refresh... still shows spinny UI
hit the reload button on the netalertx UI per instructions... still shows spinny UI
Go to settings, hit reload in the netalertx UI - RELOADS QUICK
Hit save.. shows spinny UI

21:17:58 root@nas:/volume1/docker/netalertx/config# ls -l
total 288
-rw-rw-rw- 1 root root 140838 Feb 17 21:15 app.conf
-rw-r--r-- 1 1000 1000   3870 Feb 17 21:14 app.conf_2025-02-18_03-14-35.backup
-rw-r--r-- 1 1000 1000   3870 Feb 17 21:14 app.conf.bak
-rw-rw-rw- 1 root root 140813 Feb 17 21:15 app.conf_old_setting_names_20250218021517.bak

app.conf

this is (or should be ) the default app.conf with no changes since it was autocreated 10 mins ago

#-----------------AUTOGENERATED FILE-----------------#
#                                                    #
#         Generated:  2022-12-30_22-19-40            #
#                                                    #
#   Config file for the LAN intruder detection app:  #
#      https://github.com/jokob-sk/NetAlertX         #
#                                                    #
#-----------------AUTOGENERATED FILE-----------------#

# 🔺 Use the Settings UI - only edit when necessary 🔺

# General
#---------------------------
# Scan using interface eth0
# SCAN_SUBNETS    = ['192.168.1.0/24 --interface=eth0']
#
# Scan multiple interfaces (eth1 and eth0):
# SCAN_SUBNETS    = [ '192.168.1.0/24 --interface=eth1', '192.168.1.0/24 --interface=eth0' ]

DISCOVER_PLUGINS=True
SCAN_SUBNETS=['192.168.1.0/24 --interface=eth0']
TIMEZONE='Europe/Berlin'
LOADED_PLUGINS = ['ARPSCAN','CSVBCKP','DBCLNP', 'INTRNT','MAINT','NEWDEV','NSLOOKUP','NTFPRCS', 'AVAHISCAN', 'SETPWD','SMTP', 'SYNC', 'VNDRPDT', 'WORKFLOWS', 'UI']

DAYS_TO_KEEP_EVENTS=90
# Used for generating links in emails. Make sure not to add a trailing slash!
REPORT_DASHBOARD_URL='http://netalertx'

# Make sure at least these scanners are enabled for new installs, other defaults are taken from the config.json
INTRNT_RUN='schedule'
ARPSCAN_RUN='schedule'
NSLOOKUP_RUN='before_name_updates'

# Email
#-------------------------------------
# (add SMTP to LOADED_PLUGINS to load)
#-------------------------------------
SMTP_RUN='disabled'  # use 'on_notification' to enable
SMTP_SERVER='smtp.gmail.com'
SMTP_PORT=587
SMTP_REPORT_TO='user@gmail.com'
SMTP_REPORT_FROM='NetAlertX <user@gmail.com>'
SMTP_SKIP_LOGIN=False
SMTP_USER='user@gmail.com'
SMTP_PASS='password'
SMTP_SKIP_TLS=False


# Webhook
#-------------------------------------
# (add WEBHOOK to LOADED_PLUGINS to load)
#-------------------------------------
WEBHOOK_RUN='disabled'  # use 'on_notification' to enable
WEBHOOK_URL='http://n8n.local:5555/webhook-test/aaaaaaaa-aaaa-aaaa-aaaaa-aaaaaaaaaaaa'
WEBHOOK_PAYLOAD='json'                 # webhook payload data format for the "body > attachements > text" attribute
                                       # in https://github.com/jokob-sk/NetAlertX/blob/main/docs/webhook_json_sample.json
                                       #   supported values: 'json', 'html' or 'text'
                                       #   e.g.: for discord use 'html'
WEBHOOK_REQUEST_METHOD='GET'


#-------------------------------------
# (add APPRISE to LOADED_PLUGINS to load)
#-------------------------------------
#-------------------------------------
APPRISE_RUN='disabled'  # use 'on_notification' to enable
APPRISE_HOST='http://localhost:8000/notify'
APPRISE_URL='mailto://smtp-relay.sendinblue.com:587?from=user@gmail.com&name=apprise&user=user@gmail.com&pass=password&to=user@gmail.com'


# NTFY
#-------------------------------------
# (add NTFY to LOADED_PLUGINS to load)
#-------------------------------------
NTFY_RUN='disabled'  # use 'on_notification' to enable
NTFY_HOST='https://ntfy.sh'
NTFY_TOPIC='replace_my_secure_topicname_91h889f28'
NTFY_USER='user'
NTFY_PASSWORD='passw0rd'


# PUSHSAFER
#-------------------------------------
# (add PUSHSAFER to LOADED_PLUGINS to load)
#-------------------------------------
PUSHSAFER_RUN='disabled'  # use 'on_notification' to enable
PUSHSAFER_TOKEN='ApiKey'


# MQTT
#-------------------------------------
# (add MQTT to LOADED_PLUGINS to load)
#-------------------------------------
MQTT_RUN='disabled'  # use 'on_notification' to enable
MQTT_BROKER='192.168.1.2'
MQTT_PORT=1883
MQTT_USER='mqtt'
MQTT_PASSWORD='passw0rd'
MQTT_QOS=0
MQTT_DELAY_SEC=2


#-------------------IMPORTANT INFO-------------------#
#   This file is ingested by a python script, so if  #
#        modified it needs to use python syntax      #
#-------------------IMPORTANT INFO-------------------#
21:05:35 root@nas:/volume1/docker/netalertx/config#
21:05:35 root@nas:/volume1/docker/netalertx/config#
21:05:35 root@nas:/volume1/docker/netalertx/config#
21:05:35 root@nas:/volume1/docker/netalertx/config# cat app.conf
#-----------------AUTOGENERATED FILE-----------------#
#                                                    #
#         Generated:  2022-12-30_22-19-40            #
#                                                    #
#   Config file for the LAN intruder detection app:  #
#      https://github.com/jokob-sk/NetAlertX         #
#                                                    #
#-----------------AUTOGENERATED FILE-----------------#

# 🔺 Use the Settings UI - only edit when necessary 🔺

# General
#---------------------------
# Scan using interface eth0
# SCAN_SUBNETS    = ['192.168.1.0/24 --interface=eth0']
#
# Scan multiple interfaces (eth1 and eth0):
# SCAN_SUBNETS    = [ '192.168.1.0/24 --interface=eth1', '192.168.1.0/24 --interface=eth0' ]

DISCOVER_PLUGINS=True
SCAN_SUBNETS=['192.168.1.0/24 --interface=eth0']
TIMEZONE='Europe/Berlin'
LOADED_PLUGINS = ['ARPSCAN','CSVBCKP','DBCLNP', 'INTRNT','MAINT','NEWDEV','NSLOOKUP','NTFPRCS', 'AVAHISCAN', 'SETPWD','SMTP', 'SYNC', 'VNDRPDT', 'WORKFLOWS', 'UI']

DAYS_TO_KEEP_EVENTS=90
# Used for generating links in emails. Make sure not to add a trailing slash!
REPORT_DASHBOARD_URL='http://netalertx'

# Make sure at least these scanners are enabled for new installs, other defaults are taken from the config.json
INTRNT_RUN='schedule'
ARPSCAN_RUN='schedule'
NSLOOKUP_RUN='before_name_updates'

# Email
#-------------------------------------
# (add SMTP to LOADED_PLUGINS to load)
#-------------------------------------
SMTP_RUN='disabled'  # use 'on_notification' to enable
SMTP_SERVER='smtp.gmail.com'
SMTP_PORT=587
SMTP_REPORT_TO='user@gmail.com'
SMTP_REPORT_FROM='NetAlertX <user@gmail.com>'
SMTP_SKIP_LOGIN=False
SMTP_USER='user@gmail.com'
SMTP_PASS='password'
SMTP_SKIP_TLS=False


# Webhook
#-------------------------------------
# (add WEBHOOK to LOADED_PLUGINS to load)
#-------------------------------------
WEBHOOK_RUN='disabled'  # use 'on_notification' to enable
WEBHOOK_URL='http://n8n.local:5555/webhook-test/aaaaaaaa-aaaa-aaaa-aaaaa-aaaaaaaaaaaa'
WEBHOOK_PAYLOAD='json'                 # webhook payload data format for the "body > attachements > text" attribute
                                       # in https://github.com/jokob-sk/NetAlertX/blob/main/docs/webhook_json_sample.json
                                       #   supported values: 'json', 'html' or 'text'
                                       #   e.g.: for discord use 'html'
WEBHOOK_REQUEST_METHOD='GET'


# Apprise
#-------------------------------------
# (add APPRISE to LOADED_PLUGINS to load)
#-------------------------------------
APPRISE_RUN='disabled'  # use 'on_notification' to enable
APPRISE_HOST='http://localhost:8000/notify'
APPRISE_URL='mailto://smtp-relay.sendinblue.com:587?from=user@gmail.com&name=apprise&user=user@gmail.com&pass=password&to=user@gmail.com'


# NTFY
#-------------------------------------
# (add NTFY to LOADED_PLUGINS to load)
#-------------------------------------
NTFY_RUN='disabled'  # use 'on_notification' to enable
NTFY_HOST='https://ntfy.sh'
NTFY_TOPIC='replace_my_secure_topicname_91h889f28'
NTFY_USER='user'
NTFY_PASSWORD='passw0rd'


# PUSHSAFER
#-------------------------------------
# (add PUSHSAFER to LOADED_PLUGINS to load)
#-------------------------------------
PUSHSAFER_RUN='disabled'  # use 'on_notification' to enable
PUSHSAFER_TOKEN='ApiKey'


# MQTT
#-------------------------------------
# (add MQTT to LOADED_PLUGINS to load)
#-------------------------------------
MQTT_RUN='disabled'  # use 'on_notification' to enable
MQTT_BROKER='192.168.1.2'
MQTT_PORT=1883
MQTT_USER='mqtt'
MQTT_PASSWORD='passw0rd'
MQTT_QOS=0
MQTT_DELAY_SEC=2

#-------------------IMPORTANT INFO-------------------#
#   This file is ingested by a python script, so if  #
#        modified it needs to use python syntax      #
#-------------------IMPORTANT INFO-------------------#

docker-compose.yml

docker pull jokobsk/netalertx:latest
docker stop netalertx
docker rm netalertx
docker run --name "netalertx" --network=host -p 20211:20211  -e PUID=1000 -e PGID=1000 -v /volume1/docker/netalertx/config:/app/config -v /volume1/docker/netalertx/db:/app/db -v /volume1/docker/pihole/etc/pihole/pihole-FTL.db:/etc/pihole/pihole-FTL.db -v /volume1/docker/pihole/etc/pihole/dhcp.leases:/etc/pihole/dhcp.leases --restart unless-stopped -d jokobsk/netalertx:latest

What installation are you running?

Production (netalertx)

app.log

This is the docker log. There is no app log that I see

see attached file for docker log...

_netalertx_logs.txt

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.
@harr2969 harr2969 added the bug 🐛 Something isn't working label Feb 18, 2025
@jokob-sk
Copy link
Owner

Thanks for the report.

Regrettably the log file is insufficient. I can see only 30s worth of logs. Can you please follow this guide on how to get more detailed logs so I can help further?

https://jokob-sk.github.io/NetAlertX/DEBUG_TIPS/?h=debug

You can also try to follow these performance tips:

https://jokob-sk.github.io/NetAlertX/PERFORMANCE/?h=perf

@jokob-sk jokob-sk added the Waiting for reply⏳ Waiting for the original poster to respond, or discussion in progress. label Feb 18, 2025
@jokob-sk
Copy link
Owner

On top of the above I would strongly recommend to update teh settings via the UI - I can see you are missing the PIHOLE and DHCPLSS in the LOADED_PLUGINS list which will prevent you to ingest the pihole devices.

@harr2969 harr2969 changed the title Slow / unresponsive UI after fresh install Inconsistencies after fresh install Feb 21, 2025
@harr2969
Copy link
Author

harr2969 commented Feb 21, 2025

Just started fresh again. No extra plugins. Followed the process above of letting it settle, then logging in, follow the process to refresh, save the settings, then it's just loading the settings, and wants to spin and spin. I haven't even added any hosts. (My scans need to work on eth1, so it doesn't work out of the box, which is fine, I mention it just to say that it's not related to many hosts)

I let it finish loading settings and after several minutes it came up.. then I hit save again, and it's spinning again. It's been aobut 5 mins with me not specifically measuring. CPU around 20%, RAM about 50%, so not a resource issue. Ok.. finished loading, about 10 mins.

@harr2969
Copy link
Author

netalertx.log.txt

Console logs from running docker in foreground

@jokob-sk
Copy link
Owner

  • Could you post your docker compose?
  • What hardware are you using?

@jokob-sk
Copy link
Owner

No activity for a week -> Closing

@harr2969
Copy link
Author

  • Could you post your docker compose?
  • What hardware are you using?

Sorry, I don't use compose, it's all command line, which is above.
It's a synology DS920+ with 20GB RAM

@jokob-sk
Copy link
Owner

OK, to wind back, could you please let me know what is currently the issue?

  1. What is the expected behavior?
  2. What is the observed behavior?
  3. Can you post screenshots of inconsistencies you experience?
  4. Can you ssh into the container, install htop apk add htop then run htop and post a screenshot?

@jokob-sk jokob-sk reopened this Feb 27, 2025
@harr2969
Copy link
Author

  1. The expected is that (after booting and settling) clicking between screens should be fast
  2. it's not, it seems to wait / delay a long time
  3. screenshot doesn't help
  4. yes, but it will take a bit to reinstall the container fresh again

@jokob-sk
Copy link
Owner

Thanks for the details. Let me know how a fresh install goes. For reference, this is how fast/slow the interface is on a DS920+
CPU: INTEL Celeron J4125/20GB of ram.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working Waiting for reply⏳ Waiting for the original poster to respond, or discussion in progress.
Projects
None yet
Development

No branches or pull requests

2 participants