-
-
Notifications
You must be signed in to change notification settings - Fork 372
Description
What installation are you running?
Production (netalertx) 📦
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 clicking Save in any Settings Page (even if no Setting has been altered !), the Spinner Importing settings and re-initializing ... keeps spinning an never disappears, leaving the remainder of the Page unusable:
This seems to be done via the showSpinner Javascript Function affecting the td#loadingSpinnerText HTML Block.
Without being a Javascript Expert and being able to use the Browser Console+Debugger effectively, there seem to be some Errors in some Libraries or how they are used:
Not sure if the Warning in the Console about Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content. is due to me having set a Breakpoint on any Exception:
Currently the only Solution to get it working again is to:
# Shut the Container down
podman-compose down
# Make sure it's really down
podman-compose down
# Restart Container
podman-compose up -d
Then it works again (until you try to save Settings yet another Time).
Tested on Librewolf (Firefox) and Brave (Chromium-like).
Expected Behavior
After saving Settings, the spinner should disappear within 1 Second or less.
Steps To Reproduce
- With these Settings
- With this Config
- Go to the Settings Page and click
Save
Configuration
app.conf.txt
Logs
app.log.txt
Relevant app.conf settings
See `Steps To Reproduce` (File is too long to be pasted in this Section)docker-compose.yml
version: "3.8"
services:
netalertx-caddy:
network_mode: host
image: docker.io/library/caddy:latest
pull: missing
container_name: netalertx-caddy
env_file:
- .env.caddy
environment:
CADDY_DOCKER_CADDYFILE_PATH: "/etc/caddy/Caddyfile"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro,z
- /var/lib/containers/data/netalertx/caddy:/data/caddy:rw,z
- /var/lib/containers/log/netalertx/caddy:/var/log:rw,z
- /var/lib/containers/config/netalertx/caddy:/config/caddy:rw,z
- /var/lib/containers/certificates/letsencrypt:/certificates:ro,z
# Security Settings
security_opt:
- no-new-privileges:true
# Automatically restart Container
restart: always
netalertx-server:
network_mode: host # Use host networking for ARP scanning and other services
#build:
# context: . # Build context is the current directory
# dockerfile: Dockerfile # Specify the Dockerfile to use
depends_on:
netalertx-caddy:
condition: service_started
restart: true
image: ghcr.io/jokob-sk/netalertx:latest
container_name: netalertx-server # The name when you docker contiainer ls
read_only: true # Make the container filesystem read-only
# It is most secure to start with user 20211, but then we lose provisioning capabilities.
# user: "${NETALERTX_UID:-20211}:${NETALERTX_GID:-20211}"
cap_drop: # Drop all capabilities for enhanced security
- ALL
cap_add: # Add only the necessary capabilities
- NET_ADMIN # Required for scanning with arp-scan, nmap, nbtscan, traceroute, and zero-conf
- NET_RAW # Required for raw socket operations with arp-scan, nmap, nbtscan, traceroute and zero-conf
- NET_BIND_SERVICE # Required to bind to privileged ports with nbtscan
# - CHOWN # Required for root-entrypoint to chown /data + /tmp before dropping privileges
# - SETUID # Required for root-entrypoint to switch to non-root user
# - SETGID # Required for root-entrypoint to switch to non-root group
volumes:
# Override the Configuration Template
- type: bind
source: /var/lib/containers/config/netalertx/server/nginx/netalertx.conf.template
target: /services/config/nginx/netalertx.conf.template
read_only: true
# Override the Configuration File as it is
# - type: bind
# source: /var/lib/containers/config/netalertx/server/nginx/sites-available/default
# target: /etc/nginx/sites-available/default
# read_only: true
- type: bind # Persistent Docker-managed Named Volume for storage
source: /var/lib/containers/data/netalertx/server
target: /data # consolidated configuration and database storage
read_only: false # writable volume
# - type: bind # Persistent Docker-managed Named Volume for storage
# source: /var/lib/containers/config/netalertx/server
# target: /data/config # consolidated configuration and database storage
# read_only: false # writable volume
# - type: bind # Persistent Docker-managed Named Volume for storage
# source: /var/lib/containers/db/netalertx/server
# target: /data/db # consolidated configuration and database storage
# read_only: false # writable volume
# Privileged Container
# privileged: true
# Example custom local folder called /home/user/netalertx_data
# - type: bind
# source: /home/user/netalertx_data
# target: /data
# read_only: false
# ... or use the alternative format
# - /home/user/netalertx_data:/data:rw
- type: bind # Bind mount for timezone consistency
source: /etc/localtime
target: /etc/localtime
read_only: true
# Use a custom Enterprise-configured nginx config for ldap or other settings
# - /custom-enterprise.conf:/tmp/nginx/active-config/netalertx.conf:ro
# Test your plugin on the production container
# - /path/on/host:/app/front/plugins/custom
# Retain logs - comment out tmpfs /tmp/log if you want to retain logs between container restarts
# - /path/on/host/log:/tmp/log
# tmpfs mounts for writable directories in a read-only container and improve system performance
# All writes now live under /tmp/* subdirectories which are created dynamically by entrypoint.d scripts
# mode=1700 gives rwx------ permissions; ownership is set by /root-entrypoint.sh
#tmpfs:
# # - "/tmp:mode=1700,uid=0,gid=0,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
# - "/tmp:mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
- type: tmpfs
target: /tmp
tmpfs-mode: 1700
uid: 0
gid: 0
rw: true
noexec: true
nosuid: true
nodev: true
async: true
noatime: true
nodiratime: true
env_file:
- .env
environment:
PUID: ${NETALERTX_UID:-20211} # Runtime UID after priming (Synology/no-copy-up safe)
PGID: ${NETALERTX_GID:-20211} # Runtime GID after priming (Synology/no-copy-up safe)
LISTEN_ADDR: ${LISTEN_ADDR:-0.0.0.0} # Listen for connections on all interfaces
PORT: ${PORT:-20211} # Application port
GRAPHQL_PORT: ${GRAPHQL_PORT:-20212} # GraphQL API port
ALWAYS_FRESH_INSTALL: ${ALWAYS_FRESH_INSTALL:-false} # Set to true to reset your config and database on each container start
NETALERTX_DEBUG: ${NETALERTX_DEBUG:-0} # 0=kill all services and restart if any dies. 1 keeps running dead services.
# Security Settings
#security_opt:
# - no-new-privileges:true
# Resource limits to prevent resource exhaustion
mem_limit: 2048m # Maximum memory usage
mem_reservation: 1024m # Soft memory limit
cpu_shares: 512 # Relative CPU weight for CPU contention scenarios
pids_limit: 512 # Limit the number of processes/threads to prevent fork bombs
logging:
driver: "json-file" # Use JSON file logging driver
options:
max-size: "10m" # Rotate log files after they reach 10MB
max-file: "3" # Keep a maximum of 3 log files
# Always restart the container unless explicitly stopped
restart: unless-stoppedDebug or Trace 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.
Relevant app.log section
See Steps To Reproduce (File is too long to be pasted in this Section)
Docker Logs
\033[1;31m
_ _ _ ___ _ _ __ __
| \ | | | | / _ \| | | | \ \ / /
| \| | ___| |_/ /_\ \ | ___ _ __| |_ \ V /
| . |/ _ \ __| _ | |/ _ \ __| __|/ \
| |\ | __/ |_| | | | | __/ | | |_/ /^\ \
\_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/
\033[0m Network intruder and presence detector.
https://netalertx.com
Startup pre-checks
--> storage permission.sh
--> data migration.sh
--> mounts.py
Path | Writeable | Mount | RAMDisk | Performance | DataLoss
--------------------------+-----------+-------+---------+-------------+----------
/data | ✅ | ✅ | ➖ | ➖ | ✅
/data/db | ✅ | ✅ | ➖ | ➖ | ✅
/data/config | ✅ | ✅ | ➖ | ➖ | ✅
/tmp/run/tmp | ✅ | ✅ | ✅ | ✅ | ✅
/tmp/api | ✅ | ✅ | ✅ | ✅ | ✅
/tmp/log | ✅ | ✅ | ✅ | ✅ | ✅
/tmp/run | ✅ | ✅ | ✅ | ✅ | ✅
/tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅
--> first run config.sh
--> first run db.sh
--> mandatory folders.sh
--> writable config.sh
--> nginx config.sh
--> user netalertx.sh
--> host mode network.sh
--> layer 2 capabilities.sh
--> excessive capabilities.sh
--> appliance integrity.sh
--> ports available.sh
Setting APP_CONF_OVERRIDE to {"GRAPHQL_PORT":"20212"}
Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 &
Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr &
Starting python3 -m server > /tmp/log/stdout.log 2> >(tee /tmp/log/stderr.log >&2)
Starting /usr/sbin/nginx -p "/tmp/run/" -c "/tmp/nginx/active-config/nginx.conf" -g "error_log /dev/stderr; error_log /tmp/log/nginx-error.log; daemon off;" &
Successfully updated IEEE OUI database (112542 entries)