jokob-sk / NetAlertX

πŸ–§πŸ” WIFI / LAN intruder detector. Scans for devices connected to your network and alerts you if new and unknown devices are found.
GNU General Public License v3.0
2.84k stars 163 forks source link

404 on Bare Metal install and missing dependencies on Debian 12 #753

Closed hardwareadictos closed 1 month ago

hardwareadictos commented 2 months ago

Is there an existing issue for this?

Current Behavior

Rear bare metal install i cannot access the web gui, i just get a 404 error accessing to http://serverip:20211

Expected Behavior

NetAlertX displaying the web service interface

Steps To Reproduce

Just following the bare metal install docs

app.conf

python
root@NetAlertX:/var/log/nginx# cat /app/config/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' ]

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

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'
PHOLUS_RUN='on_new_device'
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

No response

What branch are you running?

Production

app.log

---------------------------------------------------------
[INSTALL]                             Run start.debian.sh
---------------------------------------------------------
[INSTALL] Run setup scripts
---------------------------------------------------------
[INSTALL]                      Run user-mapping.debian.sh
---------------------------------------------------------
Nothing to do here.
---------------------------------------------------------
[INSTALL]              Run install_dependencies.debian.sh
---------------------------------------------------------
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package php-openssl
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
nginx is already the newest version (1.22.1-9).
nginx-core is already the newest version (1.22.1-9).
mtr is already the newest version (0.95-1).
php-fpm is already the newest version (2:8.2+93).
php8.2-fpm is already the newest version (8.2.20-1~deb12u1).
php-cli is already the newest version (2:8.2+93).
php8.2 is already the newest version (8.2.20-1~deb12u1).
php8.2-sqlite3 is already the newest version (8.2.20-1~deb12u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3.11-venv is already the newest version (3.11.2-6+deb12u2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Collecting netifaces
  Using cached netifaces-0.11.0.tar.gz (30 kB)
  Preparing metadata (setup.py) ... done
Collecting tplink-omada-client
  Using cached tplink_omada_client-1.4.1-py3-none-any.whl (45 kB)
Collecting pycryptodome
  Using cached pycryptodome-3.20.0-cp35-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB)
Collecting requests
  Using cached requests-2.32.3-py3-none-any.whl (64 kB)
Collecting paho-mqtt
  Using cached paho_mqtt-2.1.0-py3-none-any.whl (67 kB)
Collecting scapy
  Using cached scapy-2.5.0.tar.gz (1.3 MB)
  Preparing metadata (setup.py) ... done
Collecting cron-converter
  Using cached cron_converter-1.2.1-py3-none-any.whl (13 kB)
Collecting pytz
  Using cached pytz-2024.1-py2.py3-none-any.whl (505 kB)
Collecting json2table
  Using cached json2table-1.1.5-py2.py3-none-any.whl (8.7 kB)
Collecting dhcp-leases
  Using cached dhcp_leases-0.1.6-py3-none-any.whl (11 kB)
Collecting pyunifi
  Using cached pyunifi-2.21-py3-none-any.whl (11 kB)
Collecting speedtest-cli
  Using cached speedtest_cli-2.1.3-py2.py3-none-any.whl (23 kB)
Collecting chardet
  Using cached chardet-5.2.0-py3-none-any.whl (199 kB)
Collecting python-nmap
  Using cached python-nmap-0.7.1.tar.gz (44 kB)
  Preparing metadata (setup.py) ... done
Collecting dnspython
  Using cached dnspython-2.6.1-py3-none-any.whl (307 kB)
Collecting cryptography
  Using cached cryptography-43.0.0-cp39-abi3-manylinux_2_28_x86_64.whl (4.0 MB)
Collecting aiohttp<4,>=3.9.3
  Downloading aiohttp-3.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 17.5 MB/s eta 0:00:00
Collecting awesomeversion>=22.9.0
  Using cached awesomeversion-24.6.0-py3-none-any.whl (14 kB)
Collecting charset-normalizer<4,>=2
  Using cached charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (140 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.7-py3-none-any.whl (66 kB)
Collecting urllib3<3,>=1.21.1
  Using cached urllib3-2.2.2-py3-none-any.whl (121 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2024.7.4-py3-none-any.whl (162 kB)
Collecting python-dateutil
  Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
Collecting cffi>=1.12
  Using cached cffi-1.16.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (464 kB)
Collecting aiohappyeyeballs>=2.3.0
  Downloading aiohappyeyeballs-2.3.2-py3-none-any.whl (11 kB)
Collecting aiosignal>=1.1.2
  Using cached aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
Collecting attrs>=17.3.0
  Using cached attrs-23.2.0-py3-none-any.whl (60 kB)
Collecting frozenlist>=1.1.1
  Using cached frozenlist-1.4.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (272 kB)
Collecting multidict<7.0,>=4.5
  Using cached multidict-6.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (128 kB)
Collecting yarl<2.0,>=1.0
  Using cached yarl-1.9.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (328 kB)
Collecting pycparser
  Using cached pycparser-2.22-py3-none-any.whl (117 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: speedtest-cli, pytz, python-nmap, netifaces, json2table, dhcp-leases, urllib3, six, scapy, pycryptodome, pycparser, paho-mqtt, multidict, idna, frozenlist, dnspython, charset-normalizer, chardet, certifi, awesomeversion, attrs, aiohappyeyeballs, yarl, requests, python-dateutil, cffi, aiosignal, pyunifi, cryptography, cron-converter, aiohttp, tplink-omada-client
  DEPRECATION: python-nmap is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for python-nmap ... done
  DEPRECATION: netifaces is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for netifaces ... done
  DEPRECATION: scapy is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for scapy ... done
Successfully installed aiohappyeyeballs-2.3.2 aiohttp-3.10.0 aiosignal-1.3.1 attrs-23.2.0 awesomeversion-24.6.0 certifi-2024.7.4 cffi-1.16.0 chardet-5.2.0 charset-normalizer-3.3.2 cron-converter-1.2.1 cryptography-43.0.0 dhcp-leases-0.1.6 dnspython-2.6.1 frozenlist-1.4.1 idna-3.7 json2table-1.1.5 multidict-6.0.5 netifaces-0.11.0 paho-mqtt-2.1.0 pycparser-2.22 pycryptodome-3.20.0 python-dateutil-2.9.0.post0 python-nmap-0.7.1 pytz-2024.1 pyunifi-2.21 requests-2.32.3 scapy-2.5.0 six-1.16.0 speedtest-cli-2.1.3 tplink-omada-client-1.4.1 urllib3-2.2.2 yarl-1.9.4
[INSTALL] Setup NGINX
Removing existing NetAlertX web-UI
Removing existing NetAlertX NGINX config
[INSTALL] Run the hardware vendors update
The file ieee-oui.txt exists. Skipping update_vendors.sh...
touch: cannot touch '/app/api/{user_notifications.json}': No such file or directory
[INSTALL] Fixing file permissions
[INSTALL] Fixing WEB_UI_DIR: /var/www/html/netalertx
[INSTALL] Fixing INSTALL_DIR: /app
[INSTALL] Copy starter app.db and app.conf if they don't exist
[INSTALL] Fixing permissions after copied starter config & DB
Starting php8.2-fpm (via systemctl): php8.2-fpm.service.
Starting nginx (via systemctl): nginx.service.
[INSTALL] πŸš€ Starting app - navigate to your <server IP>:
10:25:49 [MAIN] Setting up ...
10:25:49 [conf.tz] Setting up ...
10:25:49 

10:25:49 The backend restarted (started). If this is unexpected check https://bit.ly/NetAlertX_debug for troubleshooting tips.
10:25:49 

10:25:49 Permissions check (All should be True)
10:25:49 ------------------------------------------------
10:25:49   /config/app.conf |  READ  | True
10:25:49   /config/app.conf |  WRITE | True
10:25:49   /db/app.db       |  READ  | True
10:25:49   /db/app.db       |  WRITE | True
10:25:49 ------------------------------------------------
10:25:49 [Setup] Attempting to fix permissions.
10:25:49 [Setup] Attempting to fix permissions.
10:25:49 [Database] Opening DB
10:25:49 [upgradeDB] Re-creating Settings table
10:25:49 [upgradeDB] Re-creating Pholus_Scan table
10:25:49 [upgradeDB] Re-creating Parameters table
10:25:49 [Config] reading config file
10:25:49 [Config] Plugins: Number of all plugins (including not loaded): 34
10:25:49 [Plugin utils] ---------------------------------------------
10:25:49 [Plugin utils] display_name: OMADA SDN import
10:25:49 [Plugin utils] description: Plugin to import data from OMADA SDN.
10:25:49 [Plugin utils] ---------------------------------------------
10:25:49 [Plugin utils] display_name: SNMP discovery
10:25:49 [Plugin utils] description: This plugin is used to discover devices via the arp table(s) of a RFC1213 compliant router or switch.
10:25:49 [Plugin utils] ---------------------------------------------
10:25:49 [Plugin utils] display_name: UniFi import
10:25:49 [Plugin utils] description: This plugin is used to import devices from an UNIFI controller.
10:25:49 [Plugin utils] ---------------------------------------------
10:25:49 [Plugin utils] display_name: Arp-Scan (Network scan)
10:25:49 [Plugin utils] description: This plugin is to execute an arp-scan on the local network
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: PiHole (Device sync)
10:25:50 [Plugin utils] description: This plugin syncs devices from the PiHole database
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: DHCP Leases (Device import)
10:25:50 [Plugin utils] description: This plugin is to import devices from dhcp.leases files.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: Rogue DHCP
10:25:50 [Plugin utils] description: This plugin is to use NMAP to monitor for rogue DHCP servers.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: Internet-Check
10:25:50 [Plugin utils] description: A plugin to check your internet connectivity and IP.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: NBTSCAN (Name discovery)
10:25:50 [Plugin utils] description: A plugin to discover device names via NetBIOS.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: NMAP Device discovery
10:25:50 [Plugin utils] description: This plugin is to execute an NMAP scan for device discovery on the local network
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: Services & Ports (NMAP)
10:25:50 [Plugin utils] description: This plugin shows all services discovered by NMAP scans.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: NSLOOKUP (Name discovery)
10:25:50 [Plugin utils] description: A plugin to discover device names.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: Apprise publisher
10:25:50 [Plugin utils] description: A plugin to publish a notification via the Apprise gateway.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: Email publisher (SMTP)
10:25:50 [Plugin utils] description: A plugin to publish a notification via Email (SMTP) gateway.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: MQTT publisher
10:25:50 [Plugin utils] description: A plugin to publish a notification via MQTT to Home Assistant.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: NTFY publisher
10:25:50 [Plugin utils] description: A plugin to publish a notification via the NTFY gateway.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: Pushover publisher
10:25:50 [Plugin utils] description: A plugin to publish a notification via the pushover.net
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: Pushsafer publisher
10:25:50 [Plugin utils] description: A plugin to publish a notification via the Pushsafer gateway.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: Webhook publisher
10:25:50 [Plugin utils] description: A plugin to publish a notification via Webhooks.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: CSV backup
10:25:50 [Plugin utils] description: A plugin to auto-generate devices.csv backups.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: DB cleanup
10:25:50 [Plugin utils] description: A plugin to schedule database cleanup & upkeep tasks.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: DDNS update
10:25:50 [Plugin utils] description: A plugin update the DDNS record.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: Internet speedtest
10:25:50 [Plugin utils] description: A plugin to perform a scheduled internet speedtest.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: Maintenance
10:25:50 [Plugin utils] description: A plugin for maintenance tasks.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: New Devices
10:25:50 [Plugin utils] description: The template used for new devices.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: Notification Processing
10:25:50 [Plugin utils] description: A plugin to for advanced notification processing.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: Pholus (Name discovery)
10:25:50 [Plugin utils] description: This plugin is to execute a Pholus (name discovery) on the local network
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: Set password
10:25:50 [Plugin utils] description: A simple plugin to set the web ui password on app start.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: Sync Hub
10:25:50 [Plugin utils] description: Plugin to synchronize multiple NetAlertX instances.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: UI settings
10:25:50 [Plugin utils] description: Plugin to adjust UI settings.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: Un-Discoverable Devices
10:25:50 [Plugin utils] description: This plugin is to import undiscoverable devices from a file.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: Vendor update
10:25:50 [Plugin utils] description: A plugin to schedule vendor database updates for mac based vendor resolution.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: Website monitor
10:25:50 [Plugin utils] description: This plugin is to monitor status changes of services or websites.
10:25:50 [Plugin utils] ---------------------------------------------
10:25:50 [Plugin utils] display_name: Workflows
10:25:50 [Plugin utils] description: A plugin to adjust behavior of workflows.
10:25:50 [Config] β›” Unloading WEBMON
10:25:50 [Config] β›” Unloading UNDIS
10:25:50 [Config] β›” Unloading INTRSPD
10:25:50 [Config] β›” Unloading DDNS
10:25:50 [Config] β›” Unloading WEBHOOK
10:25:50 [Config] β›” Unloading PUSHSAFER
10:25:50 [Config] β›” Unloading PUSHOVER
10:25:50 [Config] β›” Unloading NTFY
10:25:50 [Config] β›” Unloading MQTT
10:25:50 [Config] β›” Unloading APPRISE
10:25:50 [Config] β›” Unloading NMAP
10:25:50 [Config] β›” Unloading NMAPDEV
10:25:50 [Config] β›” Unloading NBTSCAN
10:25:50 [Config] β›” Unloading DHCPSRVS
10:25:50 [Config] β›” Unloading DHCPLSS
10:25:50 [Config] β›” Unloading PIHOLE
10:25:50 [Config] β›” Unloading UNFIMP
10:25:50 [Config] β›” Unloading SNMPDSC
10:25:50 [Config] β›” Unloading OMDSDN
10:25:50 [Config] Number of Plugins to load: 15
10:25:50 [Config] Plugins to load: ['ARPSCAN', 'INTRNT', 'NSLOOKUP', 'SMTP', 'CSVBCKP', 'DBCLNP', 'MAINT', 'NEWDEV', 'NTFPRCS', 'PHOLUS', 'SETPWD', 'SYNC', 'UI', 'VNDRPDT', 'WORKFLOWS']
10:25:51 [API] Updating table_settings.json file in /front/api
10:25:51 [Config] Imported new config
10:25:51 [API] Updating table_appevents.json file in /front/api
10:25:51 [API] Updating table_devices.json file in /front/api
10:25:51 [API] Updating table_events_pending_alert.json file in /front/api
10:25:51 [API] Updating table_plugins_events.json file in /front/api
10:25:51 [API] Updating table_plugins_history.json file in /front/api
10:25:51 [API] Updating table_plugins_objects.json file in /front/api
10:25:51 [API] Updating table_plugins_language_strings.json file in /front/api
10:25:51 [API] Updating table_notifications.json file in /front/api
10:25:51 [API] Updating table_custom_endpoint.json file in /front/api
10:25:51 [Plugin utils] ---------------------------------------------
10:25:51 [Plugin utils] display_name: NSLOOKUP (Name discovery)
10:25:51 [Plugins] Executing: python3 /app/front/plugins/nslookup_scan/nslookup.py
10:25:51 [Plugins] No output received from the plugin NSLOOKUP - enable LOG_LEVEL=debug and check logs
10:25:51 [Notification] Check if something to report
10:25:51 [Notification] Included sections: ['new_devices', 'down_devices', 'events']
10:25:51 [Notification] No changes to report
10:25:51 [MAIN] Process: Wait

Debug enabled

hardwareadictos commented 2 months ago

For giving more info, nginx works and serves the correct port:

root@NetAlertX:/var/log/nginx# netstat -putan |grep -i nginx
tcp        0      0 0.0.0.0:20211           0.0.0.0:*               LISTEN      182/nginx: master p

And logs reports devices trying to access to the services receiving the 404 also.

That seems the issue, nginx doesnt find the root files:

root@NetAlertX:/var/log/nginx# cat error.log  
2024/07/30 17:58:52 [notice] 6221#6221: using inherited sockets from "5;6;"
2024/07/30 18:53:29 [error] 262#262: *1 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.110, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 18:53:30 [error] 262#262: *1 open() "/var/www/html/app/favicon.ico" failed (2: No such file or directory), client: 192.168.1.110, server: , request: "GET /favicon.ico HTTP/1.1", host: "192.168.1.50:20211", referrer: "http://192.168.1.50:20211/"
2024/07/30 18:53:49 [error] 262#262: *1 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.110, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 18:55:21 [error] 262#262: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.110, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 18:59:31 [error] 262#262: *5 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.110, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 18:59:32 [error] 262#262: *5 open() "/var/www/html/app/favicon.ico" failed (2: No such file or directory), client: 192.168.1.110, server: , request: "GET /favicon.ico HTTP/1.1", host: "192.168.1.50:20211", referrer: "http://192.168.1.50:20211/"
2024/07/30 19:04:00 [error] 223#223: *1 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.110, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 19:07:43 [error] 223#223: *4 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.110, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 19:11:16 [error] 223#223: *5 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.110, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 19:11:18 [error] 223#223: *5 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.110, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 19:11:29 [error] 223#223: *5 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.110, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 19:11:35 [error] 223#223: *5 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.110, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 20:46:23 [error] 225#225: *2 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 20:46:23 [error] 225#225: *2 open() "/var/www/html/app/favicon.ico" failed (2: No such file or directory), client: 192.168.1.8, server: , request: "GET /favicon.ico HTTP/1.1", host: "192.168.1.50:20211", referrer: "http://192.168.1.50:20211/"
2024/07/31 10:11:14 [error] 190#190: *1 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:12:40 [error] 190#190: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:12:42 [error] 190#190: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:12:42 [error] 190#190: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:12:42 [error] 190#190: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:12:43 [error] 190#190: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:12:43 [error] 190#190: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:12:43 [error] 190#190: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:12:43 [error] 190#190: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:14:33 [error] 183#183: *1 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:15:59 [error] 183#183: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:16:00 [error] 183#183: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:18:15 [error] 183#183: *6 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:18:28 [error] 183#183: *7 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.50, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:18:36 [error] 183#183: *8 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 127.0.0.1, server: , request: "GET / HTTP/1.1", host: "127.0.0.1:20211"
hardwareadictos commented 2 months ago

And something more to point, during the install i had to resolve those dependencies (if you want to add them to the script) on Debian 12:

apt install arp-scan build-essential python3-dev

Thank you for the hard work :)

hardwareadictos commented 2 months ago

Edit, fixed it with a softlink:

root@NetAlertX:~# ln -s /var/www/html/netalertx /var/www/html/app
root@NetAlertX:~# ls -lrt /var/www/html/
total 4
-rw-r--r-- 1 root root 615 Jul 30 17:58 index.nginx-debian.html
lrwxrwxrwx 1 root root  23 Jul 31 11:48 app -> /var/www/html/netalertx
lrwxrwxrwx 1 root root  11 Jul 31 11:48 netalertx -> /app//front

It's not the most elegant solution but it works. Maybe fixable on the installation script?

jokob-sk commented 1 month ago

Hi @hardwareadictos ,

Thank you for the help!

I'm relying on users like you the community, to help with the bare-metal install script, so thank you very much πŸ™

I added the missing dependencies.

I thought I'm creating a softlink correctly in this script:

INSTALL_DIR=/app  # Specify the installation directory here

# DO NOT CHANGE ANYTHING BELOW THIS LINE!
CONF_FILE=app.conf
DB_FILE=app.db
NGINX_CONF_FILE=netalertx.debian.conf
WEB_UI_DIR=/var/www/html/netalertx

...

# create symbolic link to the  install directory
ln -s $INSTALL_PATH/front $WEB_UI_DIR

https://github.com/jokob-sk/NetAlertX/blob/e22b12e5d798ef523c7b6ae8cdb9b513d6de32a6/install/start.debian.sh#L65

I don;t know why you had to create a softlink manually πŸ€”

jokob-sk commented 1 month ago

I think I found it - it was probably the ngnx config file: https://github.com/jokob-sk/NetAlertX/commit/4b2b8d6dd138b93edf59678bbaa6f5760da84b76

jokob-sk commented 1 month ago

should be fixed -> closing

hardwareadictos commented 1 month ago

Thanks a lot! Keep the hard work going!!! Will keep reporting if I found something! πŸ˜ƒ

Ullulaki commented 2 weeks ago

should be fixed -> closing

I'm sorry but problem is still occuring, tried both bare metal methods. With the softfix the frontend ist starting but this notification popup keeps returning, no matter what I try: image even if followed the instructions, it returns after a few seconds and makes the UI unusable.

jokob-sk commented 2 weeks ago

Could you please try to:

If the pop up still appear can double check if the app is not restarting unexpectedly?

Can you please try to save settings to see if it disappears afterwards?