From 95e9315c88ced17507bee5d498486303147fe3c0 Mon Sep 17 00:00:00 2001 From: Adam Outler Date: Mon, 22 Dec 2025 02:08:50 +0000 Subject: [PATCH] Improving mount diagnostics --- .../entrypoint.d/10-mounts.py | 113 +- .../docker-compose.mount-test.api_noread.yml | 39 + .../docker-compose.mount-test.data_noread.yml | 39 + .../docker-compose.mount-test.db_noread.yml | 39 + .../docker-compose.mount-test.tmp_noread.yml | 39 + .../configurations/test_results.log | 1738 ++++++++++++++--- test/docker_tests/conftest.py | 1 + .../test_container_environment.py | 64 +- .../test_mount_diagnostics_pytest.py | 212 +- 9 files changed, 1925 insertions(+), 359 deletions(-) create mode 100644 test/docker_tests/configurations/mount-tests/docker-compose.mount-test.api_noread.yml create mode 100644 test/docker_tests/configurations/mount-tests/docker-compose.mount-test.data_noread.yml create mode 100644 test/docker_tests/configurations/mount-tests/docker-compose.mount-test.db_noread.yml create mode 100644 test/docker_tests/configurations/mount-tests/docker-compose.mount-test.tmp_noread.yml diff --git a/install/production-filesystem/entrypoint.d/10-mounts.py b/install/production-filesystem/entrypoint.d/10-mounts.py index c97956fe..bc35f396 100755 --- a/install/production-filesystem/entrypoint.d/10-mounts.py +++ b/install/production-filesystem/entrypoint.d/10-mounts.py @@ -31,6 +31,7 @@ class MountCheckResult: var_name: str path: str = "" is_writeable: bool = False + is_readable: bool = False is_mounted: bool = False is_mount_point: bool = False is_ramdisk: bool = False @@ -38,6 +39,7 @@ class MountCheckResult: fstype: str = "N/A" error: bool = False write_error: bool = False + read_error: bool = False performance_issue: bool = False dataloss_risk: bool = False category: str = "" @@ -97,7 +99,7 @@ def _resolve_writeable_state(target_path: str) -> bool: if os.path.exists(current): if not os.access(current, os.W_OK): return False - + # OverlayFS/Copy-up check: Try to actually write a file to verify if os.path.isdir(current): test_file = os.path.join(current, f".netalertx_write_test_{os.getpid()}") @@ -108,7 +110,7 @@ def _resolve_writeable_state(target_path: str) -> bool: return True except OSError: return False - + return True parent_dir = os.path.dirname(current) @@ -119,6 +121,27 @@ def _resolve_writeable_state(target_path: str) -> bool: return False +def _resolve_readable_state(target_path: str) -> bool: + """Determine if a path is readable, ascending to the first existing parent.""" + + current = target_path + seen: set[str] = set() + while True: + if current in seen: + break + seen.add(current) + + if os.path.exists(current): + return os.access(current, os.R_OK) + + parent_dir = os.path.dirname(current) + if not parent_dir or parent_dir == current: + break + current = parent_dir + + return False + + def analyze_path( spec: PathSpec, mounted_filesystems, @@ -142,14 +165,20 @@ def analyze_path( result.path = target_path - # --- 1. Check Write Permissions --- + # --- 1. Check Read/Write Permissions --- result.is_writeable = _resolve_writeable_state(target_path) + result.is_readable = _resolve_readable_state(target_path) if not result.is_writeable: result.error = True if spec.role != "secondary": result.write_error = True + if not result.is_readable: + result.error = True + if spec.role != "secondary": + result.read_error = True + # --- 2. Check Filesystem Type (Parent and Self) --- parent_mount_fstype = "" longest_mount = "" @@ -184,6 +213,8 @@ def analyze_path( result.is_ramdisk = parent_mount_fstype in non_persistent_fstypes # --- 4. Apply Risk Logic --- + # Keep risk flags about persistence/performance properties of the mount itself. + # Read/write permission problems are surfaced via the R/W columns and error flags. if spec.category == "persist": if result.underlying_fs_is_ramdisk or result.is_ramdisk: result.dataloss_risk = True @@ -198,17 +229,32 @@ def analyze_path( return result -def print_warning_message(): +def print_warning_message(results: list[MountCheckResult]): """Prints a formatted warning to stderr.""" YELLOW = "\033[1;33m" RESET = "\033[0m" + print(f"{YELLOW}══════════════════════════════════════════════════════════════════════════════", file=sys.stderr) + print("⚠️ ATTENTION: Configuration issues detected (marked with ❌).\n", file=sys.stderr) + + for r in results: + issues = [] + if not r.is_writeable: + issues.append("error writing") + if not r.is_readable: + issues.append("error reading") + if not r.is_mounted and (r.category == "persist" or r.category == "ramdisk"): + issues.append("not mounted") + if r.dataloss_risk: + issues.append("risk of dataloss") + if r.performance_issue: + issues.append("performance issue") + + if issues: + print(f" * {r.path} {', '.join(issues)}", file=sys.stderr) + message = ( - "══════════════════════════════════════════════════════════════════════════════\n" - "⚠️ ATTENTION: Configuration issues detected (marked with ❌).\n\n" - " Your configuration has write permission, dataloss, or performance issues\n" - " as shown in the table above.\n\n" - " We recommend starting with the default docker-compose.yml as the\n" + "\n We recommend starting with the default docker-compose.yml as the\n" " configuration can be quite complex.\n\n" " Review the documentation for a correct setup:\n" " https://github.com/jokob-sk/NetAlertX/blob/main/docs/DOCKER_COMPOSE.md\n" @@ -216,7 +262,7 @@ def print_warning_message(): "══════════════════════════════════════════════════════════════════════════════\n" ) - print(f"{YELLOW}{message}{RESET}", file=sys.stderr) + print(f"{message}{RESET}", file=sys.stderr) def _get_active_specs() -> list[PathSpec]: @@ -231,14 +277,14 @@ def _sub_result_is_healthy(result: MountCheckResult) -> bool: if result.category == "persist": if not result.is_mounted: return False - if result.dataloss_risk or result.write_error or result.error: + if result.dataloss_risk or result.write_error or result.read_error or result.error: return False return True if result.category == "ramdisk": if not result.is_mounted or not result.is_ramdisk: return False - if result.performance_issue or result.write_error or result.error: + if result.performance_issue or result.write_error or result.read_error or result.error: return False return True @@ -278,19 +324,9 @@ def _apply_primary_rules(specs: list[PathSpec], results_map: dict[str, MountChec ) all_core_subs_are_mounts = bool(core_sub_results) and len(core_mount_points) == len(core_sub_results) - if all_core_subs_healthy: - if result.write_error: - result.write_error = False - if not result.is_writeable: - result.is_writeable = True - if spec.category == "persist" and result.dataloss_risk: - result.dataloss_risk = False - if result.error and not (result.performance_issue or result.dataloss_risk or result.write_error): - result.error = False - suppress_primary = False if all_core_subs_healthy and all_core_subs_are_mounts: - if not result.is_mount_point and not result.error and not result.write_error: + if not result.is_mount_point and not result.error and not result.write_error and not result.read_error: suppress_primary = True if suppress_primary: @@ -329,14 +365,14 @@ def main(): results = _apply_primary_rules(active_specs, results_map) has_issues = any( - r.dataloss_risk or r.error or r.write_error or r.performance_issue + r.dataloss_risk or r.error or r.write_error or r.read_error or r.performance_issue for r in results ) - has_write_errors = any(r.write_error for r in results) + has_rw_errors = any(r.write_error or r.read_error for r in results) if has_issues or True: # Always print table for diagnostic purposes # --- Print Table --- - headers = ["Path", "Writeable", "Mount", "RAMDisk", "Performance", "DataLoss"] + headers = ["Path", "R", "W", "Mount", "RAMDisk", "Performance", "DataLoss"] CHECK_SYMBOL = "✅" CROSS_SYMBOL = "❌" @@ -355,7 +391,8 @@ def main(): f" {{:^{col_widths[2]}}} |" f" {{:^{col_widths[3]}}} |" f" {{:^{col_widths[4]}}} |" - f" {{:^{col_widths[5]}}} " + f" {{:^{col_widths[5]}}} |" + f" {{:^{col_widths[6]}}} " ) row_fmt = ( @@ -364,7 +401,8 @@ def main(): f" {{:^{col_widths[2]}}}|" # No space f" {{:^{col_widths[3]}}}|" # No space f" {{:^{col_widths[4]}}}|" # No space - f" {{:^{col_widths[5]}}} " # DataLoss is last, needs space + f" {{:^{col_widths[5]}}}|" # No space + f" {{:^{col_widths[6]}}} " # DataLoss is last, needs space ) separator = "".join([ @@ -378,13 +416,16 @@ def main(): "+", "-" * (col_widths[4] + 2), "+", - "-" * (col_widths[5] + 2) + "-" * (col_widths[5] + 2), + "+", + "-" * (col_widths[6] + 2) ]) - print(header_fmt.format(*headers)) - print(separator) + print(header_fmt.format(*headers), file=sys.stderr) + print(separator, file=sys.stderr) for r in results: # Symbol Logic + read_symbol = bool_to_check(r.is_readable) write_symbol = bool_to_check(r.is_writeable) mount_symbol = CHECK_SYMBOL if r.is_mounted else CROSS_SYMBOL @@ -407,21 +448,23 @@ def main(): print( row_fmt.format( r.path, + read_symbol, write_symbol, mount_symbol, ramdisk_symbol, perf_symbol, dataloss_symbol, - ) + ), + file=sys.stderr ) # --- Print Warning --- if has_issues: print("\n", file=sys.stderr) - print_warning_message() + print_warning_message(results) - # Exit with error only if there are write permission issues - if has_write_errors and os.environ.get("NETALERTX_DEBUG") != "1": + # Exit with error only if there are read/write permission issues + if has_rw_errors and os.environ.get("NETALERTX_DEBUG") != "1": sys.exit(1) diff --git a/test/docker_tests/configurations/mount-tests/docker-compose.mount-test.api_noread.yml b/test/docker_tests/configurations/mount-tests/docker-compose.mount-test.api_noread.yml new file mode 100644 index 00000000..08b499ef --- /dev/null +++ b/test/docker_tests/configurations/mount-tests/docker-compose.mount-test.api_noread.yml @@ -0,0 +1,39 @@ +# Expected outcome: Mounts table shows /tmp/api is mounted and writable but NOT readable (R=❌, W=✅) +# Note: This is a diagnostic-only container (entrypoint sleeps); the test chmods/chowns /tmp/api to mode 0300. +services: + netalertx: + network_mode: host + build: + context: ../../../ + dockerfile: Dockerfile + image: netalertx-test + container_name: netalertx-test-mount-api_noread + entrypoint: ["sh", "-lc", "sleep infinity"] + cap_drop: + - ALL + cap_add: + - NET_ADMIN + - NET_RAW + - NET_BIND_SERVICE + environment: + NETALERTX_DEBUG: 0 + NETALERTX_DATA: /data + NETALERTX_DB: /data/db + NETALERTX_CONFIG: /data/config + SYSTEM_SERVICES_RUN_TMP: /tmp + NETALERTX_API: /tmp/api + NETALERTX_LOG: /tmp/log + SYSTEM_SERVICES_RUN: /tmp/run + SYSTEM_SERVICES_ACTIVE_CONFIG: /tmp/nginx/active-config + + volumes: + - type: volume + source: test_netalertx_data + target: /data + read_only: false + + tmpfs: + - "/tmp:uid=20211,gid=20211,mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime" + +volumes: + test_netalertx_data: diff --git a/test/docker_tests/configurations/mount-tests/docker-compose.mount-test.data_noread.yml b/test/docker_tests/configurations/mount-tests/docker-compose.mount-test.data_noread.yml new file mode 100644 index 00000000..053f3469 --- /dev/null +++ b/test/docker_tests/configurations/mount-tests/docker-compose.mount-test.data_noread.yml @@ -0,0 +1,39 @@ +# Expected outcome: Mounts table shows /data is mounted and writable but NOT readable (R=❌, W=✅) +# Note: This is a diagnostic-only container (entrypoint sleeps); the test chmods/chowns /data to mode 0300. +services: + netalertx: + network_mode: host + build: + context: ../../../ + dockerfile: Dockerfile + image: netalertx-test + container_name: netalertx-test-mount-data_noread + entrypoint: ["sh", "-lc", "sleep infinity"] + cap_drop: + - ALL + cap_add: + - NET_ADMIN + - NET_RAW + - NET_BIND_SERVICE + environment: + NETALERTX_DEBUG: 0 + NETALERTX_DATA: /data + NETALERTX_DB: /data/db + NETALERTX_CONFIG: /data/config + SYSTEM_SERVICES_RUN_TMP: /tmp + NETALERTX_API: /tmp/api + NETALERTX_LOG: /tmp/log + SYSTEM_SERVICES_RUN: /tmp/run + SYSTEM_SERVICES_ACTIVE_CONFIG: /tmp/nginx/active-config + + volumes: + - type: volume + source: test_netalertx_data + target: /data + read_only: false + + tmpfs: + - "/tmp:uid=20211,gid=20211,mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime" + +volumes: + test_netalertx_data: diff --git a/test/docker_tests/configurations/mount-tests/docker-compose.mount-test.db_noread.yml b/test/docker_tests/configurations/mount-tests/docker-compose.mount-test.db_noread.yml new file mode 100644 index 00000000..df16525f --- /dev/null +++ b/test/docker_tests/configurations/mount-tests/docker-compose.mount-test.db_noread.yml @@ -0,0 +1,39 @@ +# Expected outcome: Mounts table shows /data/db is mounted and writable but NOT readable (R=❌, W=✅) +# Note: This is a diagnostic-only container (entrypoint sleeps); the test chmods/chowns /data/db to mode 0300. +services: + netalertx: + network_mode: host + build: + context: ../../../ + dockerfile: Dockerfile + image: netalertx-test + container_name: netalertx-test-mount-db_noread + entrypoint: ["sh", "-lc", "sleep infinity"] + cap_drop: + - ALL + cap_add: + - NET_ADMIN + - NET_RAW + - NET_BIND_SERVICE + environment: + NETALERTX_DEBUG: 0 + NETALERTX_DATA: /data + NETALERTX_DB: /data/db + NETALERTX_CONFIG: /data/config + SYSTEM_SERVICES_RUN_TMP: /tmp + NETALERTX_API: /tmp/api + NETALERTX_LOG: /tmp/log + SYSTEM_SERVICES_RUN: /tmp/run + SYSTEM_SERVICES_ACTIVE_CONFIG: /tmp/nginx/active-config + + volumes: + - type: volume + source: test_netalertx_data + target: /data + read_only: false + + tmpfs: + - "/tmp:uid=20211,gid=20211,mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime" + +volumes: + test_netalertx_data: diff --git a/test/docker_tests/configurations/mount-tests/docker-compose.mount-test.tmp_noread.yml b/test/docker_tests/configurations/mount-tests/docker-compose.mount-test.tmp_noread.yml new file mode 100644 index 00000000..e12285e0 --- /dev/null +++ b/test/docker_tests/configurations/mount-tests/docker-compose.mount-test.tmp_noread.yml @@ -0,0 +1,39 @@ +# Expected outcome: Mounts table shows /tmp is mounted and writable but NOT readable (R=❌, W=✅) +# Note: This is a diagnostic-only container (entrypoint sleeps); the test chmods/chowns /tmp to mode 0300. +services: + netalertx: + network_mode: host + build: + context: ../../../ + dockerfile: Dockerfile + image: netalertx-test + container_name: netalertx-test-mount-tmp_noread + entrypoint: ["sh", "-lc", "sleep infinity"] + cap_drop: + - ALL + cap_add: + - NET_ADMIN + - NET_RAW + - NET_BIND_SERVICE + environment: + NETALERTX_DEBUG: 0 + NETALERTX_DATA: /data + NETALERTX_DB: /data/db + NETALERTX_CONFIG: /data/config + SYSTEM_SERVICES_RUN_TMP: /tmp + NETALERTX_API: /tmp/api + NETALERTX_LOG: /tmp/log + SYSTEM_SERVICES_RUN: /tmp/run + SYSTEM_SERVICES_ACTIVE_CONFIG: /tmp/nginx/active-config + + volumes: + - type: volume + source: test_netalertx_data + target: /data + read_only: false + + tmpfs: + - "/tmp:uid=20211,gid=20211,mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime" + +volumes: + test_netalertx_data: diff --git a/test/docker_tests/configurations/test_results.log b/test/docker_tests/configurations/test_results.log index 4769624d..ba82940b 100644 --- a/test/docker_tests/configurations/test_results.log +++ b/test/docker_tests/configurations/test_results.log @@ -1,4 +1,4 @@ -Starting Docker Compose Tests - Sun Nov 23 15:52:32 UTC 2025 +Starting Docker Compose Tests - Sun Dec 21 23:37:01 UTC 2025 ========================================== File: docker-compose.missing-caps.yml ---------------------------------------- @@ -7,8 +7,13 @@ Testing: docker-compose.missing-caps.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations Running docker-compose up... + Volume "configurations_netalertx_data" Creating + Volume "configurations_netalertx_data" Created + Container netalertx-test-missing-caps Creating + Container netalertx-test-missing-caps Created Attaching to netalertx-test-missing-caps - netalertx-test-missing-caps exited with code 1 +netalertx-test-missing-caps | exec /bin/sh: operation not permitted + netalertx-test-missing-caps exited with code 255 File: docker-compose.readonly.yml ---------------------------------------- @@ -16,6 +21,10 @@ Testing: docker-compose.readonly.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations Running docker-compose up... + Volume "configurations_netalertx_data" Creating + Volume "configurations_netalertx_data" Created + Container netalertx-test-readonly Creating + Container netalertx-test-readonly Created Attaching to netalertx-test-readonly netalertx-test-readonly |  netalertx-test-readonly | _ _ _ ___ _ _ __ __ @@ -24,7 +33,6 @@ netalertx-test-readonly | | \| | ___| |_/ /_\ \ | ___ _ __| |_ \ V / netalertx-test-readonly | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-readonly | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-readonly | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-readonly | netalertx-test-readonly |  Network intruder and presence detector. netalertx-test-readonly | https://netalertx.com netalertx-test-readonly | @@ -34,8 +42,26 @@ netalertx-test-readonly | --> storage permission.sh netalertx-test-readonly | --> data migration.sh netalertx-test-readonly | --> mounts.py netalertx-test-readonly | --> first run config.sh +netalertx-test-readonly | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-readonly | 🆕 First run detected. Default configuration written to /data/config/app.conf. +netalertx-test-readonly | +netalertx-test-readonly | Review your settings in the UI or edit the file directly before trusting +netalertx-test-readonly | this instance in production. +netalertx-test-readonly | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-readonly | --> first run db.sh +netalertx-test-readonly | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-readonly | 🆕 First run detected — building initial database at: /data/db/app.db +netalertx-test-readonly | +netalertx-test-readonly | Do not interrupt this step. When complete, consider backing up the fresh +netalertx-test-readonly | DB before onboarding sensitive or critical networks. +netalertx-test-readonly | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-readonly | --> mandatory folders.sh +netalertx-test-readonly | --> apply conf override.sh +netalertx-test-readonly | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-readonly | 📝 APP_CONF_OVERRIDE detected. Configuration written to /data/config/app_conf_override.json. +netalertx-test-readonly | +netalertx-test-readonly | Make sure the JSON content is correct before starting the application. +netalertx-test-readonly | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-readonly | --> writable config.sh netalertx-test-readonly | --> nginx config.sh netalertx-test-readonly | --> user netalertx.sh @@ -44,12 +70,21 @@ netalertx-test-readonly | --> layer 2 capabilities.sh netalertx-test-readonly | --> excessive capabilities.sh netalertx-test-readonly | --> appliance integrity.sh netalertx-test-readonly | --> ports available.sh -netalertx-test-readonly | NETALERTX_DEBUG is set to 1, will not shut down other services if one fails. +netalertx-test-readonly | /services/scripts/update_vendors.sh: line 28: /tmp/run/tmp/ieee-oui.txt.tmp: Read-only file system netalertx-test-readonly | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & netalertx-test-readonly | Starting supercronic --debug "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & +netalertx-test-readonly | /services/start-php-fpm.sh: line 30: /tmp/log/app.php_errors.log: Read-only file system +netalertx-test-readonly | /services/start-cron.sh: line 37: /tmp/log/cron.log: Read-only file system netalertx-test-readonly | php-fpm stopped! (exit 1) netalertx-test-readonly | Supercronic stopped! (exit 1) +netalertx-test-readonly | mktemp: : Read-only file system netalertx-test-readonly | Starting python3 -m server > /tmp/log/stdout.log 2> >(tee /tmp/log/stderr.log >&2) +netalertx-test-readonly | /services/start-backend.sh: line 16: /tmp/log/stdout.log: Read-only file system +netalertx-test-readonly | ERROR: Failed to download or process OUI data +Gracefully stopping... (press Ctrl+C again to force) + Container netalertx-test-readonly Stopping + Container netalertx-test-readonly Stopped + File: docker-compose.writable.yml ---------------------------------------- @@ -57,6 +92,10 @@ Testing: docker-compose.writable.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations Running docker-compose up... + Volume "configurations_netalertx_data" Creating + Volume "configurations_netalertx_data" Created + Container netalertx-test-writable Creating + Container netalertx-test-writable Created Attaching to netalertx-test-writable netalertx-test-writable |  netalertx-test-writable | _ _ _ ___ _ _ __ __ @@ -65,7 +104,6 @@ netalertx-test-writable | | \| | ___| |_/ /_\ \ | ___ _ __| |_ \ V / netalertx-test-writable | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-writable | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-writable | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-writable | netalertx-test-writable |  Network intruder and presence detector. netalertx-test-writable | https://netalertx.com netalertx-test-writable | @@ -75,7 +113,19 @@ netalertx-test-writable | --> storage permission.sh netalertx-test-writable | --> data migration.sh netalertx-test-writable | --> mounts.py netalertx-test-writable | --> first run config.sh +netalertx-test-writable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-writable | 🆕 First run detected. Default configuration written to /data/config/app.conf. +netalertx-test-writable | +netalertx-test-writable | Review your settings in the UI or edit the file directly before trusting +netalertx-test-writable | this instance in production. +netalertx-test-writable | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-writable | --> first run db.sh +netalertx-test-writable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-writable | 🆕 First run detected — building initial database at: /data/db/app.db +netalertx-test-writable | +netalertx-test-writable | Do not interrupt this step. When complete, consider backing up the fresh +netalertx-test-writable | DB before onboarding sensitive or critical networks. +netalertx-test-writable | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-writable | --> mandatory folders.sh netalertx-test-writable | * Creating NetAlertX log directory. netalertx-test-writable | * Creating NetAlertX API cache. @@ -86,6 +136,12 @@ netalertx-test-writable | * Creating System services run log. netalertx-test-writable | * Creating System services run tmp. netalertx-test-writable | * Creating DB locked log. netalertx-test-writable | * Creating Execution queue log. +netalertx-test-writable | --> apply conf override.sh +netalertx-test-writable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-writable | 📝 APP_CONF_OVERRIDE detected. Configuration written to /data/config/app_conf_override.json. +netalertx-test-writable | +netalertx-test-writable | Make sure the JSON content is correct before starting the application. +netalertx-test-writable | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-writable | --> writable config.sh netalertx-test-writable | --> nginx config.sh netalertx-test-writable | --> user netalertx.sh @@ -94,11 +150,28 @@ netalertx-test-writable | --> layer 2 capabilities.sh netalertx-test-writable | --> excessive capabilities.sh netalertx-test-writable | --> appliance integrity.sh netalertx-test-writable | --> ports available.sh -netalertx-test-writable | NETALERTX_DEBUG is set to 1, will not shut down other services if one fails. netalertx-test-writable | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & netalertx-test-writable | Starting supercronic --debug "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & netalertx-test-writable | Starting python3 -m server > /tmp/log/stdout.log 2> >(tee /tmp/log/stderr.log >&2) netalertx-test-writable | 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;" & +netalertx-test-writable | Traceback (most recent call last): +netalertx-test-writable | File "", line 198, in _run_module_as_main +netalertx-test-writable | File "", line 88, in _run_code +netalertx-test-writable | File "/app/server/__main__.py", line 260, in +netalertx-test-writable | sys.exit(main()) +netalertx-test-writable | ^^^^^^ +netalertx-test-writable | File "/app/server/__main__.py", line 104, in main +netalertx-test-writable | pm, all_plugins, imported = importConfigs(pm, db, all_plugins) +netalertx-test-writable | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-writable | File "/app/server/initialise.py", line 586, in importConfigs +netalertx-test-writable | for setting_name, value in settings_override.items(): +netalertx-test-writable | ^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-writable | AttributeError: 'int' object has no attribute 'items' +netalertx-test-writable | Successfully updated IEEE OUI database (112333 entries) +Gracefully stopping... (press Ctrl+C again to force) + Container netalertx-test-writable Stopping + Container netalertx-test-writable Stopped + File: docker-compose.mount-test.active_config_mounted.yml ---------------------------------------- Expected outcome: Container starts successfully with proper nginx config mount @@ -110,6 +183,10 @@ Testing: docker-compose.mount-test.active_config_mounted.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_test_system_services_active_config" Creating + Volume "mount-tests_test_system_services_active_config" Created + Container netalertx-test-mount-active_config_mounted Creating + Container netalertx-test-mount-active_config_mounted Created Attaching to netalertx-test-mount-active_config_mounted netalertx-test-mount-active_config_mounted |  netalertx-test-mount-active_config_mounted | _ _ _ ___ _ _ __ __ @@ -118,7 +195,6 @@ netalertx-test-mount-active_config_mounted | | \| | ___| |_/ /_\ \ | ___ _ __| netalertx-test-mount-active_config_mounted | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-active_config_mounted | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-active_config_mounted | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-active_config_mounted | netalertx-test-mount-active_config_mounted |  Network intruder and presence detector. netalertx-test-mount-active_config_mounted | https://netalertx.com netalertx-test-mount-active_config_mounted | @@ -127,18 +203,40 @@ netalertx-test-mount-active_config_mounted | Startup pre-checks netalertx-test-mount-active_config_mounted | --> storage permission.sh netalertx-test-mount-active_config_mounted | --> data migration.sh netalertx-test-mount-active_config_mounted | --> mounts.py -netalertx-test-mount-active_config_mounted | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-active_config_mounted | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-active_config_mounted | /data | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-active_config_mounted | /data/db | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-active_config_mounted | /data/config | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-active_config_mounted | /tmp/run/tmp | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-active_config_mounted | /tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-active_config_mounted | /tmp/log | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-active_config_mounted | /tmp/run | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-active_config_mounted | /tmp/nginx/active-config | ✅ | ✅ | ❌ | ❌ | ✅ +netalertx-test-mount-active_config_mounted | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-active_config_mounted | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-active_config_mounted | /data | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-active_config_mounted | /data/db | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-active_config_mounted | /data/config | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-active_config_mounted | /tmp/run/tmp | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-active_config_mounted | /tmp/api | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-active_config_mounted | /tmp/log | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-active_config_mounted | /tmp/run | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-active_config_mounted | /tmp/nginx/active-config | ✅| ✅| ✅ | ❌ | ❌ | ✅ +netalertx-test-mount-active_config_mounted | +netalertx-test-mount-active_config_mounted | +netalertx-test-mount-active_config_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-active_config_mounted | ⚠️ ATTENTION: Configuration issues detected (marked with ❌). +netalertx-test-mount-active_config_mounted | +netalertx-test-mount-active_config_mounted | * /tmp/nginx/active-config performance issue +netalertx-test-mount-active_config_mounted | +netalertx-test-mount-active_config_mounted | We recommend starting with the default docker-compose.yml as the +netalertx-test-mount-active_config_mounted | configuration can be quite complex. +netalertx-test-mount-active_config_mounted | +netalertx-test-mount-active_config_mounted | Review the documentation for a correct setup: +netalertx-test-mount-active_config_mounted | https://github.com/jokob-sk/NetAlertX/blob/main/docs/DOCKER_COMPOSE.md +netalertx-test-mount-active_config_mounted | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/mount-configuration-issues.md +netalertx-test-mount-active_config_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-active_config_mounted |  netalertx-test-mount-active_config_mounted | --> first run config.sh netalertx-test-mount-active_config_mounted | --> first run db.sh +netalertx-test-mount-active_config_mounted | INFO: ALWAYS_FRESH_INSTALL enabled — removing existing database. +netalertx-test-mount-active_config_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-active_config_mounted | 🆕 First run detected — building initial database at: /data/db/app.db +netalertx-test-mount-active_config_mounted | +netalertx-test-mount-active_config_mounted | Do not interrupt this step. When complete, consider backing up the fresh +netalertx-test-mount-active_config_mounted | DB before onboarding sensitive or critical networks. +netalertx-test-mount-active_config_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-active_config_mounted | --> mandatory folders.sh netalertx-test-mount-active_config_mounted | * Creating NetAlertX log directory. netalertx-test-mount-active_config_mounted | * Creating NetAlertX API cache. @@ -148,6 +246,12 @@ netalertx-test-mount-active_config_mounted | * Creating System services run netalertx-test-mount-active_config_mounted | * Creating System services run tmp. netalertx-test-mount-active_config_mounted | * Creating DB locked log. netalertx-test-mount-active_config_mounted | * Creating Execution queue log. +netalertx-test-mount-active_config_mounted | --> apply conf override.sh +netalertx-test-mount-active_config_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-active_config_mounted | 📝 APP_CONF_OVERRIDE detected. Configuration written to /data/config/app_conf_override.json. +netalertx-test-mount-active_config_mounted | +netalertx-test-mount-active_config_mounted | Make sure the JSON content is correct before starting the application. +netalertx-test-mount-active_config_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-active_config_mounted | --> writable config.sh netalertx-test-mount-active_config_mounted | --> nginx config.sh netalertx-test-mount-active_config_mounted | --> user netalertx.sh @@ -158,18 +262,32 @@ netalertx-test-mount-active_config_mounted | --> appliance integrity.sh netalertx-test-mount-active_config_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-active_config_mounted | ⚠️ Warning: Container is running as read-write, not in read-only mode. netalertx-test-mount-active_config_mounted | -netalertx-test-mount-active_config_mounted | Please mount the root filesystem as --read-only or use read-only: true +netalertx-test-mount-active_config_mounted | Please mount the root filesystem as --read-only or use read_only: true netalertx-test-mount-active_config_mounted | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/read-only-filesystem.md netalertx-test-mount-active_config_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-active_config_mounted | --> ports available.sh netalertx-test-mount-active_config_mounted | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & netalertx-test-mount-active_config_mounted | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & +netalertx-test-mount-active_config_mounted | mktemp: : Permission denied netalertx-test-mount-active_config_mounted | Starting python3 -m server > /tmp/log/stdout.log 2> >(tee /tmp/log/stderr.log >&2) -netalertx-test-mount-active_config_mounted | Service nginx exited with status 1. -netalertx-test-mount-active_config_mounted | Supercronic stopped! (exit 143) -netalertx-test-mount-active_config_mounted | php-fpm stopped! (exit 143) -netalertx-test-mount-active_config_mounted | All services stopped. - netalertx-test-mount-active_config_mounted exited with code 1 +netalertx-test-mount-active_config_mounted | Traceback (most recent call last): +netalertx-test-mount-active_config_mounted | File "", line 198, in _run_module_as_main +netalertx-test-mount-active_config_mounted | File "", line 88, in _run_code +netalertx-test-mount-active_config_mounted | File "/app/server/__main__.py", line 260, in +netalertx-test-mount-active_config_mounted | sys.exit(main()) +netalertx-test-mount-active_config_mounted | ^^^^^^ +netalertx-test-mount-active_config_mounted | File "/app/server/__main__.py", line 104, in main +netalertx-test-mount-active_config_mounted | pm, all_plugins, imported = importConfigs(pm, db, all_plugins) +netalertx-test-mount-active_config_mounted | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-active_config_mounted | File "/app/server/initialise.py", line 586, in importConfigs +netalertx-test-mount-active_config_mounted | for setting_name, value in settings_override.items(): +netalertx-test-mount-active_config_mounted | ^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-active_config_mounted | AttributeError: 'int' object has no attribute 'items' +netalertx-test-mount-active_config_mounted | Successfully updated IEEE OUI database (112333 entries) +Gracefully stopping... (press Ctrl+C again to force) + Container netalertx-test-mount-active_config_mounted Stopping + Container netalertx-test-mount-active_config_mounted Stopped + File: docker-compose.mount-test.active_config_no-mount.yml ---------------------------------------- Expected outcome: Container shows warning about missing nginx config mount @@ -181,6 +299,10 @@ Testing: docker-compose.mount-test.active_config_no-mount.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_test_netalertx_data" Creating + Volume "mount-tests_test_netalertx_data" Created + Container netalertx-test-mount-active_config_no-mount Creating + Container netalertx-test-mount-active_config_no-mount Created Attaching to netalertx-test-mount-active_config_no-mount netalertx-test-mount-active_config_no-mount |  netalertx-test-mount-active_config_no-mount | _ _ _ ___ _ _ __ __ @@ -189,7 +311,6 @@ netalertx-test-mount-active_config_no-mount | | \| | ___| |_/ /_\ \ | ___ _ __ netalertx-test-mount-active_config_no-mount | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-active_config_no-mount | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-active_config_no-mount | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-active_config_no-mount | netalertx-test-mount-active_config_no-mount |  Network intruder and presence detector. netalertx-test-mount-active_config_no-mount | https://netalertx.com netalertx-test-mount-active_config_no-mount | @@ -198,18 +319,30 @@ netalertx-test-mount-active_config_no-mount | Startup pre-checks netalertx-test-mount-active_config_no-mount | --> storage permission.sh netalertx-test-mount-active_config_no-mount | --> data migration.sh netalertx-test-mount-active_config_no-mount | --> mounts.py -netalertx-test-mount-active_config_no-mount | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-active_config_no-mount | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-active_config_no-mount | /data | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-active_config_no-mount | /data/db | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-active_config_no-mount | /data/config | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-active_config_no-mount | /tmp/run/tmp | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-active_config_no-mount | /tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-active_config_no-mount | /tmp/log | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-active_config_no-mount | /tmp/run | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-active_config_no-mount | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-active_config_no-mount | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-active_config_no-mount | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-active_config_no-mount | /data | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-active_config_no-mount | /data/db | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-active_config_no-mount | /data/config | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-active_config_no-mount | /tmp/run/tmp | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-active_config_no-mount | /tmp/api | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-active_config_no-mount | /tmp/log | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-active_config_no-mount | /tmp/run | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-active_config_no-mount | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ netalertx-test-mount-active_config_no-mount | --> first run config.sh +netalertx-test-mount-active_config_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-active_config_no-mount | 🆕 First run detected. Default configuration written to /data/config/app.conf. +netalertx-test-mount-active_config_no-mount | +netalertx-test-mount-active_config_no-mount | Review your settings in the UI or edit the file directly before trusting +netalertx-test-mount-active_config_no-mount | this instance in production. +netalertx-test-mount-active_config_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-active_config_no-mount | --> first run db.sh +netalertx-test-mount-active_config_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-active_config_no-mount | 🆕 First run detected — building initial database at: /data/db/app.db +netalertx-test-mount-active_config_no-mount | +netalertx-test-mount-active_config_no-mount | Do not interrupt this step. When complete, consider backing up the fresh +netalertx-test-mount-active_config_no-mount | DB before onboarding sensitive or critical networks. +netalertx-test-mount-active_config_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-active_config_no-mount | --> mandatory folders.sh netalertx-test-mount-active_config_no-mount | * Creating NetAlertX log directory. netalertx-test-mount-active_config_no-mount | * Creating NetAlertX API cache. @@ -220,6 +353,12 @@ netalertx-test-mount-active_config_no-mount | * Creating System services ru netalertx-test-mount-active_config_no-mount | * Creating System services run tmp. netalertx-test-mount-active_config_no-mount | * Creating DB locked log. netalertx-test-mount-active_config_no-mount | * Creating Execution queue log. +netalertx-test-mount-active_config_no-mount | --> apply conf override.sh +netalertx-test-mount-active_config_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-active_config_no-mount | 📝 APP_CONF_OVERRIDE detected. Configuration written to /data/config/app_conf_override.json. +netalertx-test-mount-active_config_no-mount | +netalertx-test-mount-active_config_no-mount | Make sure the JSON content is correct before starting the application. +netalertx-test-mount-active_config_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-active_config_no-mount | --> writable config.sh netalertx-test-mount-active_config_no-mount | --> nginx config.sh netalertx-test-mount-active_config_no-mount | --> user netalertx.sh @@ -230,14 +369,32 @@ netalertx-test-mount-active_config_no-mount | --> appliance integrity.sh netalertx-test-mount-active_config_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-active_config_no-mount | ⚠️ Warning: Container is running as read-write, not in read-only mode. netalertx-test-mount-active_config_no-mount | -netalertx-test-mount-active_config_no-mount | Please mount the root filesystem as --read-only or use read-only: true +netalertx-test-mount-active_config_no-mount | Please mount the root filesystem as --read-only or use read_only: true netalertx-test-mount-active_config_no-mount | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/read-only-filesystem.md netalertx-test-mount-active_config_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-active_config_no-mount | --> ports available.sh +netalertx-test-mount-active_config_no-mount | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & netalertx-test-mount-active_config_no-mount | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & netalertx-test-mount-active_config_no-mount | Starting python3 -m server > /tmp/log/stdout.log 2> >(tee /tmp/log/stderr.log >&2) -netalertx-test-mount-active_config_no-mount | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & netalertx-test-mount-active_config_no-mount | 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;" & +netalertx-test-mount-active_config_no-mount | Traceback (most recent call last): +netalertx-test-mount-active_config_no-mount | File "", line 198, in _run_module_as_main +netalertx-test-mount-active_config_no-mount | File "", line 88, in _run_code +netalertx-test-mount-active_config_no-mount | File "/app/server/__main__.py", line 260, in +netalertx-test-mount-active_config_no-mount | sys.exit(main()) +netalertx-test-mount-active_config_no-mount | ^^^^^^ +netalertx-test-mount-active_config_no-mount | File "/app/server/__main__.py", line 104, in main +netalertx-test-mount-active_config_no-mount | pm, all_plugins, imported = importConfigs(pm, db, all_plugins) +netalertx-test-mount-active_config_no-mount | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-active_config_no-mount | File "/app/server/initialise.py", line 586, in importConfigs +netalertx-test-mount-active_config_no-mount | for setting_name, value in settings_override.items(): +netalertx-test-mount-active_config_no-mount | ^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-active_config_no-mount | AttributeError: 'int' object has no attribute 'items' +netalertx-test-mount-active_config_no-mount | Successfully updated IEEE OUI database (112333 entries) +Gracefully stopping... (press Ctrl+C again to force) + Container netalertx-test-mount-active_config_no-mount Stopping + Container netalertx-test-mount-active_config_no-mount Stopped + File: docker-compose.mount-test.active_config_ramdisk.yml ---------------------------------------- Expected outcome: Container shows performance warning for nginx config on RAM disk @@ -249,6 +406,10 @@ Testing: docker-compose.mount-test.active_config_ramdisk.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_test_netalertx_data" Creating + Volume "mount-tests_test_netalertx_data" Created + Container netalertx-test-mount-active_config_ramdisk Creating + Container netalertx-test-mount-active_config_ramdisk Created Attaching to netalertx-test-mount-active_config_ramdisk netalertx-test-mount-active_config_ramdisk |  netalertx-test-mount-active_config_ramdisk | _ _ _ ___ _ _ __ __ @@ -257,7 +418,6 @@ netalertx-test-mount-active_config_ramdisk | | \| | ___| |_/ /_\ \ | ___ _ __| netalertx-test-mount-active_config_ramdisk | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-active_config_ramdisk | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-active_config_ramdisk | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-active_config_ramdisk | netalertx-test-mount-active_config_ramdisk |  Network intruder and presence detector. netalertx-test-mount-active_config_ramdisk | https://netalertx.com netalertx-test-mount-active_config_ramdisk | @@ -266,18 +426,30 @@ netalertx-test-mount-active_config_ramdisk | Startup pre-checks netalertx-test-mount-active_config_ramdisk | --> storage permission.sh netalertx-test-mount-active_config_ramdisk | --> data migration.sh netalertx-test-mount-active_config_ramdisk | --> mounts.py -netalertx-test-mount-active_config_ramdisk | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-active_config_ramdisk | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-active_config_ramdisk | /data | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-active_config_ramdisk | /data/db | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-active_config_ramdisk | /data/config | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-active_config_ramdisk | /tmp/run/tmp | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-active_config_ramdisk | /tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-active_config_ramdisk | /tmp/log | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-active_config_ramdisk | /tmp/run | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-active_config_ramdisk | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-active_config_ramdisk | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-active_config_ramdisk | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-active_config_ramdisk | /data | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-active_config_ramdisk | /data/db | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-active_config_ramdisk | /data/config | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-active_config_ramdisk | /tmp/run/tmp | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-active_config_ramdisk | /tmp/api | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-active_config_ramdisk | /tmp/log | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-active_config_ramdisk | /tmp/run | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-active_config_ramdisk | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ netalertx-test-mount-active_config_ramdisk | --> first run config.sh +netalertx-test-mount-active_config_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-active_config_ramdisk | 🆕 First run detected. Default configuration written to /data/config/app.conf. +netalertx-test-mount-active_config_ramdisk | +netalertx-test-mount-active_config_ramdisk | Review your settings in the UI or edit the file directly before trusting +netalertx-test-mount-active_config_ramdisk | this instance in production. +netalertx-test-mount-active_config_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-active_config_ramdisk | --> first run db.sh +netalertx-test-mount-active_config_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-active_config_ramdisk | 🆕 First run detected — building initial database at: /data/db/app.db +netalertx-test-mount-active_config_ramdisk | +netalertx-test-mount-active_config_ramdisk | Do not interrupt this step. When complete, consider backing up the fresh +netalertx-test-mount-active_config_ramdisk | DB before onboarding sensitive or critical networks. +netalertx-test-mount-active_config_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-active_config_ramdisk | --> mandatory folders.sh netalertx-test-mount-active_config_ramdisk | * Creating NetAlertX log directory. netalertx-test-mount-active_config_ramdisk | * Creating NetAlertX API cache. @@ -288,6 +460,12 @@ netalertx-test-mount-active_config_ramdisk | * Creating System services run netalertx-test-mount-active_config_ramdisk | * Creating System services run tmp. netalertx-test-mount-active_config_ramdisk | * Creating DB locked log. netalertx-test-mount-active_config_ramdisk | * Creating Execution queue log. +netalertx-test-mount-active_config_ramdisk | --> apply conf override.sh +netalertx-test-mount-active_config_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-active_config_ramdisk | 📝 APP_CONF_OVERRIDE detected. Configuration written to /data/config/app_conf_override.json. +netalertx-test-mount-active_config_ramdisk | +netalertx-test-mount-active_config_ramdisk | Make sure the JSON content is correct before starting the application. +netalertx-test-mount-active_config_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-active_config_ramdisk | --> writable config.sh netalertx-test-mount-active_config_ramdisk | --> nginx config.sh netalertx-test-mount-active_config_ramdisk | --> user netalertx.sh @@ -298,14 +476,32 @@ netalertx-test-mount-active_config_ramdisk | --> appliance integrity.sh netalertx-test-mount-active_config_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-active_config_ramdisk | ⚠️ Warning: Container is running as read-write, not in read-only mode. netalertx-test-mount-active_config_ramdisk | -netalertx-test-mount-active_config_ramdisk | Please mount the root filesystem as --read-only or use read-only: true +netalertx-test-mount-active_config_ramdisk | Please mount the root filesystem as --read-only or use read_only: true netalertx-test-mount-active_config_ramdisk | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/read-only-filesystem.md netalertx-test-mount-active_config_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-active_config_ramdisk | --> ports available.sh -netalertx-test-mount-active_config_ramdisk | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & netalertx-test-mount-active_config_ramdisk | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & +netalertx-test-mount-active_config_ramdisk | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & netalertx-test-mount-active_config_ramdisk | Starting python3 -m server > /tmp/log/stdout.log 2> >(tee /tmp/log/stderr.log >&2) netalertx-test-mount-active_config_ramdisk | 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;" & +netalertx-test-mount-active_config_ramdisk | Traceback (most recent call last): +netalertx-test-mount-active_config_ramdisk | File "", line 198, in _run_module_as_main +netalertx-test-mount-active_config_ramdisk | File "", line 88, in _run_code +netalertx-test-mount-active_config_ramdisk | File "/app/server/__main__.py", line 260, in +netalertx-test-mount-active_config_ramdisk | sys.exit(main()) +netalertx-test-mount-active_config_ramdisk | ^^^^^^ +netalertx-test-mount-active_config_ramdisk | File "/app/server/__main__.py", line 104, in main +netalertx-test-mount-active_config_ramdisk | pm, all_plugins, imported = importConfigs(pm, db, all_plugins) +netalertx-test-mount-active_config_ramdisk | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-active_config_ramdisk | File "/app/server/initialise.py", line 586, in importConfigs +netalertx-test-mount-active_config_ramdisk | for setting_name, value in settings_override.items(): +netalertx-test-mount-active_config_ramdisk | ^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-active_config_ramdisk | AttributeError: 'int' object has no attribute 'items' +netalertx-test-mount-active_config_ramdisk | Successfully updated IEEE OUI database (112333 entries) +Gracefully stopping... (press Ctrl+C again to force) + Container netalertx-test-mount-active_config_ramdisk Stopping + Container netalertx-test-mount-active_config_ramdisk Stopped + File: docker-compose.mount-test.active_config_unwritable.yml ---------------------------------------- Expected outcome: Container fails to start due to unwritable nginx config partition @@ -317,6 +513,12 @@ Testing: docker-compose.mount-test.active_config_unwritable.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_test_netalertx_data" Creating + Volume "mount-tests_test_netalertx_data" Created + Volume "mount-tests_test_system_services_active_config" Creating + Volume "mount-tests_test_system_services_active_config" Created + Container netalertx-test-mount-active_config_unwritable Creating + Container netalertx-test-mount-active_config_unwritable Created Attaching to netalertx-test-mount-active_config_unwritable netalertx-test-mount-active_config_unwritable |  netalertx-test-mount-active_config_unwritable | _ _ _ ___ _ _ __ __ @@ -325,7 +527,6 @@ netalertx-test-mount-active_config_unwritable | | \| | ___| |_/ /_\ \ | ___ _ netalertx-test-mount-active_config_unwritable | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-active_config_unwritable | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-active_config_unwritable | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-active_config_unwritable | netalertx-test-mount-active_config_unwritable |  Network intruder and presence detector. netalertx-test-mount-active_config_unwritable | https://netalertx.com netalertx-test-mount-active_config_unwritable | @@ -334,18 +535,45 @@ netalertx-test-mount-active_config_unwritable | Startup pre-checks netalertx-test-mount-active_config_unwritable | --> storage permission.sh netalertx-test-mount-active_config_unwritable | --> data migration.sh netalertx-test-mount-active_config_unwritable | --> mounts.py -netalertx-test-mount-active_config_unwritable | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-active_config_unwritable | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-active_config_unwritable | /data | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-active_config_unwritable | /data/db | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-active_config_unwritable | /data/config | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-active_config_unwritable | /tmp/run/tmp | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-active_config_unwritable | /tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-active_config_unwritable | /tmp/log | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-active_config_unwritable | /tmp/run | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-active_config_unwritable | /tmp/nginx/active-config | ❌ | ✅ | ❌ | ❌ | ✅ +netalertx-test-mount-active_config_unwritable | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-active_config_unwritable | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-active_config_unwritable | /data | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-active_config_unwritable | /data/db | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-active_config_unwritable | /data/config | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-active_config_unwritable | /tmp/run/tmp | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-active_config_unwritable | /tmp/api | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-active_config_unwritable | /tmp/log | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-active_config_unwritable | /tmp/run | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-active_config_unwritable | /tmp/nginx/active-config | ✅| ❌| ✅ | ❌ | ❌ | ✅ +netalertx-test-mount-active_config_unwritable | +netalertx-test-mount-active_config_unwritable | +netalertx-test-mount-active_config_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-active_config_unwritable | ⚠️ ATTENTION: Configuration issues detected (marked with ❌). +netalertx-test-mount-active_config_unwritable | +netalertx-test-mount-active_config_unwritable | * /tmp/nginx/active-config error writing, performance issue +netalertx-test-mount-active_config_unwritable | +netalertx-test-mount-active_config_unwritable | We recommend starting with the default docker-compose.yml as the +netalertx-test-mount-active_config_unwritable | configuration can be quite complex. +netalertx-test-mount-active_config_unwritable | +netalertx-test-mount-active_config_unwritable | Review the documentation for a correct setup: +netalertx-test-mount-active_config_unwritable | https://github.com/jokob-sk/NetAlertX/blob/main/docs/DOCKER_COMPOSE.md +netalertx-test-mount-active_config_unwritable | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/mount-configuration-issues.md +netalertx-test-mount-active_config_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-active_config_unwritable |  netalertx-test-mount-active_config_unwritable | --> first run config.sh +netalertx-test-mount-active_config_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-active_config_unwritable | 🆕 First run detected. Default configuration written to /data/config/app.conf. +netalertx-test-mount-active_config_unwritable | +netalertx-test-mount-active_config_unwritable | Review your settings in the UI or edit the file directly before trusting +netalertx-test-mount-active_config_unwritable | this instance in production. +netalertx-test-mount-active_config_unwritable | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-active_config_unwritable | --> first run db.sh +netalertx-test-mount-active_config_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-active_config_unwritable | 🆕 First run detected — building initial database at: /data/db/app.db +netalertx-test-mount-active_config_unwritable | +netalertx-test-mount-active_config_unwritable | Do not interrupt this step. When complete, consider backing up the fresh +netalertx-test-mount-active_config_unwritable | DB before onboarding sensitive or critical networks. +netalertx-test-mount-active_config_unwritable | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-active_config_unwritable | --> mandatory folders.sh netalertx-test-mount-active_config_unwritable | * Creating NetAlertX log directory. netalertx-test-mount-active_config_unwritable | * Creating NetAlertX API cache. @@ -355,8 +583,30 @@ netalertx-test-mount-active_config_unwritable | * Creating System services netalertx-test-mount-active_config_unwritable | * Creating System services run tmp. netalertx-test-mount-active_config_unwritable | * Creating DB locked log. netalertx-test-mount-active_config_unwritable | * Creating Execution queue log. +netalertx-test-mount-active_config_unwritable | --> apply conf override.sh +netalertx-test-mount-active_config_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-active_config_unwritable | 📝 APP_CONF_OVERRIDE detected. Configuration written to /data/config/app_conf_override.json. +netalertx-test-mount-active_config_unwritable | +netalertx-test-mount-active_config_unwritable | Make sure the JSON content is correct before starting the application. +netalertx-test-mount-active_config_unwritable | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-active_config_unwritable | --> writable config.sh netalertx-test-mount-active_config_unwritable | --> nginx config.sh +netalertx-test-mount-active_config_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-active_config_unwritable | ⚠️ ATTENTION: Unable to write to /tmp/nginx/active-config/netalertx.conf. +netalertx-test-mount-active_config_unwritable | +netalertx-test-mount-active_config_unwritable | Ensure the conf.active mount is writable by the netalertx user before +netalertx-test-mount-active_config_unwritable | changing LISTEN_ADDR or PORT. Fix permissions: +netalertx-test-mount-active_config_unwritable | chown -R 20211:20211 /tmp/nginx/active-config +netalertx-test-mount-active_config_unwritable | find /tmp/nginx/active-config -type d -exec chmod 700 {} + +netalertx-test-mount-active_config_unwritable | find /tmp/nginx/active-config -type f -exec chmod 600 {} + +netalertx-test-mount-active_config_unwritable | +netalertx-test-mount-active_config_unwritable | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/nginx-configuration-mount.md +netalertx-test-mount-active_config_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-active_config_unwritable | \033[1;31m══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-active_config_unwritable | ❌ NetAlertX startup aborted: critical failure in nginx config.sh. +netalertx-test-mount-active_config_unwritable | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/troubleshooting.md +netalertx-test-mount-active_config_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-active_config_unwritable | \033[0m netalertx-test-mount-active_config_unwritable exited with code 1 File: docker-compose.mount-test.api_mounted.yml ---------------------------------------- @@ -369,6 +619,8 @@ Testing: docker-compose.mount-test.api_mounted.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Container netalertx-test-mount-api_mounted Creating + Container netalertx-test-mount-api_mounted Created Attaching to netalertx-test-mount-api_mounted netalertx-test-mount-api_mounted |  netalertx-test-mount-api_mounted | _ _ _ ___ _ _ __ __ @@ -377,7 +629,6 @@ netalertx-test-mount-api_mounted | | \| | ___| |_/ /_\ \ | ___ _ __| |_ \ V / netalertx-test-mount-api_mounted | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-api_mounted | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-api_mounted | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-api_mounted | netalertx-test-mount-api_mounted |  Network intruder and presence detector. netalertx-test-mount-api_mounted | https://netalertx.com netalertx-test-mount-api_mounted | @@ -386,23 +637,57 @@ netalertx-test-mount-api_mounted | Startup pre-checks netalertx-test-mount-api_mounted | --> storage permission.sh netalertx-test-mount-api_mounted | --> data migration.sh netalertx-test-mount-api_mounted | --> mounts.py -netalertx-test-mount-api_mounted | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-api_mounted | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-api_mounted | /data/db | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-api_mounted | /data/config | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-api_mounted | /tmp/run/tmp | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-api_mounted | /tmp/api | ✅ | ✅ | ❌ | ❌ | ✅ -netalertx-test-mount-api_mounted | /tmp/log | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-api_mounted | /tmp/run | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-api_mounted | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-api_mounted | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-api_mounted | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-api_mounted | /data/db | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-api_mounted | /data/config | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-api_mounted | /tmp/run/tmp | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-api_mounted | /tmp/api | ✅| ✅| ✅ | ❌ | ❌ | ✅ +netalertx-test-mount-api_mounted | /tmp/log | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-api_mounted | /tmp/run | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-api_mounted | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-api_mounted | +netalertx-test-mount-api_mounted | +netalertx-test-mount-api_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-api_mounted | ⚠️ ATTENTION: Configuration issues detected (marked with ❌). +netalertx-test-mount-api_mounted | +netalertx-test-mount-api_mounted | * /tmp/api performance issue +netalertx-test-mount-api_mounted | +netalertx-test-mount-api_mounted | We recommend starting with the default docker-compose.yml as the +netalertx-test-mount-api_mounted | configuration can be quite complex. +netalertx-test-mount-api_mounted | +netalertx-test-mount-api_mounted | Review the documentation for a correct setup: +netalertx-test-mount-api_mounted | https://github.com/jokob-sk/NetAlertX/blob/main/docs/DOCKER_COMPOSE.md +netalertx-test-mount-api_mounted | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/mount-configuration-issues.md +netalertx-test-mount-api_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-api_mounted |  netalertx-test-mount-api_mounted | --> first run config.sh +netalertx-test-mount-api_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-api_mounted | 🆕 First run detected. Default configuration written to /data/config/app.conf. +netalertx-test-mount-api_mounted | +netalertx-test-mount-api_mounted | Review your settings in the UI or edit the file directly before trusting +netalertx-test-mount-api_mounted | this instance in production. +netalertx-test-mount-api_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-api_mounted | --> first run db.sh +netalertx-test-mount-api_mounted | INFO: ALWAYS_FRESH_INSTALL enabled — removing existing database. +netalertx-test-mount-api_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-api_mounted | 🆕 First run detected — building initial database at: /data/db/app.db +netalertx-test-mount-api_mounted | +netalertx-test-mount-api_mounted | Do not interrupt this step. When complete, consider backing up the fresh +netalertx-test-mount-api_mounted | DB before onboarding sensitive or critical networks. +netalertx-test-mount-api_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-api_mounted | --> mandatory folders.sh netalertx-test-mount-api_mounted | * Creating Plugins log. netalertx-test-mount-api_mounted | * Creating System services run log. netalertx-test-mount-api_mounted | * Creating System services run tmp. netalertx-test-mount-api_mounted | * Creating DB locked log. netalertx-test-mount-api_mounted | * Creating Execution queue log. +netalertx-test-mount-api_mounted | --> apply conf override.sh +netalertx-test-mount-api_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-api_mounted | 📝 APP_CONF_OVERRIDE detected. Configuration written to /data/config/app_conf_override.json. +netalertx-test-mount-api_mounted | +netalertx-test-mount-api_mounted | Make sure the JSON content is correct before starting the application. +netalertx-test-mount-api_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-api_mounted | --> writable config.sh netalertx-test-mount-api_mounted | --> nginx config.sh netalertx-test-mount-api_mounted | --> user netalertx.sh @@ -413,14 +698,32 @@ netalertx-test-mount-api_mounted | --> appliance integrity.sh netalertx-test-mount-api_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-api_mounted | ⚠️ Warning: Container is running as read-write, not in read-only mode. netalertx-test-mount-api_mounted | -netalertx-test-mount-api_mounted | Please mount the root filesystem as --read-only or use read-only: true +netalertx-test-mount-api_mounted | Please mount the root filesystem as --read-only or use read_only: true netalertx-test-mount-api_mounted | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/read-only-filesystem.md netalertx-test-mount-api_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-api_mounted | --> ports available.sh -netalertx-test-mount-api_mounted | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & netalertx-test-mount-api_mounted | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & +netalertx-test-mount-api_mounted | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & netalertx-test-mount-api_mounted | Starting python3 -m server > /tmp/log/stdout.log 2> >(tee /tmp/log/stderr.log >&2) netalertx-test-mount-api_mounted | 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;" & +netalertx-test-mount-api_mounted | Traceback (most recent call last): +netalertx-test-mount-api_mounted | File "", line 198, in _run_module_as_main +netalertx-test-mount-api_mounted | File "", line 88, in _run_code +netalertx-test-mount-api_mounted | File "/app/server/__main__.py", line 260, in +netalertx-test-mount-api_mounted | sys.exit(main()) +netalertx-test-mount-api_mounted | ^^^^^^ +netalertx-test-mount-api_mounted | File "/app/server/__main__.py", line 104, in main +netalertx-test-mount-api_mounted | pm, all_plugins, imported = importConfigs(pm, db, all_plugins) +netalertx-test-mount-api_mounted | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-api_mounted | File "/app/server/initialise.py", line 586, in importConfigs +netalertx-test-mount-api_mounted | for setting_name, value in settings_override.items(): +netalertx-test-mount-api_mounted | ^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-api_mounted | AttributeError: 'int' object has no attribute 'items' +netalertx-test-mount-api_mounted | Successfully updated IEEE OUI database (112333 entries) +Gracefully stopping... (press Ctrl+C again to force) + Container netalertx-test-mount-api_mounted Stopping + Container netalertx-test-mount-api_mounted Stopped + File: docker-compose.mount-test.api_no-mount.yml ---------------------------------------- Expected outcome: Container shows mount error for API directory @@ -432,6 +735,12 @@ Testing: docker-compose.mount-test.api_no-mount.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_netalertx_db" Creating + Volume "mount-tests_netalertx_db" Created + Volume "mount-tests_netalertx_config" Creating + Volume "mount-tests_netalertx_config" Created + Container netalertx-test-mount-api_no-mount Creating + Container netalertx-test-mount-api_no-mount Created Attaching to netalertx-test-mount-api_no-mount netalertx-test-mount-api_no-mount |  netalertx-test-mount-api_no-mount | _ _ _ ___ _ _ __ __ @@ -440,7 +749,6 @@ netalertx-test-mount-api_no-mount | | \| | ___| |_/ /_\ \ | ___ _ __| |_ \ V / netalertx-test-mount-api_no-mount | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-api_no-mount | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-api_no-mount | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-api_no-mount | netalertx-test-mount-api_no-mount |  Network intruder and presence detector. netalertx-test-mount-api_no-mount | https://netalertx.com netalertx-test-mount-api_no-mount | @@ -449,23 +757,56 @@ netalertx-test-mount-api_no-mount | Startup pre-checks netalertx-test-mount-api_no-mount | --> storage permission.sh netalertx-test-mount-api_no-mount | --> data migration.sh netalertx-test-mount-api_no-mount | --> mounts.py -netalertx-test-mount-api_no-mount | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-api_no-mount | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-api_no-mount | /data/db | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-api_no-mount | /data/config | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-api_no-mount | /tmp/run/tmp | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-api_no-mount | /tmp/api | ✅ | ❌ | ❌ | ❌ | ✅ -netalertx-test-mount-api_no-mount | /tmp/log | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-api_no-mount | /tmp/run | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-api_no-mount | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-api_no-mount | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-api_no-mount | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-api_no-mount | /data/db | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-api_no-mount | /data/config | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-api_no-mount | /tmp/run/tmp | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-api_no-mount | /tmp/api | ✅| ✅| ❌ | ❌ | ❌ | ✅ +netalertx-test-mount-api_no-mount | /tmp/log | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-api_no-mount | /tmp/run | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-api_no-mount | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-api_no-mount | +netalertx-test-mount-api_no-mount | +netalertx-test-mount-api_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-api_no-mount | ⚠️ ATTENTION: Configuration issues detected (marked with ❌). +netalertx-test-mount-api_no-mount | +netalertx-test-mount-api_no-mount | * /tmp/api not mounted, performance issue +netalertx-test-mount-api_no-mount | +netalertx-test-mount-api_no-mount | We recommend starting with the default docker-compose.yml as the +netalertx-test-mount-api_no-mount | configuration can be quite complex. +netalertx-test-mount-api_no-mount | +netalertx-test-mount-api_no-mount | Review the documentation for a correct setup: +netalertx-test-mount-api_no-mount | https://github.com/jokob-sk/NetAlertX/blob/main/docs/DOCKER_COMPOSE.md +netalertx-test-mount-api_no-mount | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/mount-configuration-issues.md +netalertx-test-mount-api_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-api_no-mount |  netalertx-test-mount-api_no-mount | --> first run config.sh +netalertx-test-mount-api_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-api_no-mount | 🆕 First run detected. Default configuration written to /data/config/app.conf. +netalertx-test-mount-api_no-mount | +netalertx-test-mount-api_no-mount | Review your settings in the UI or edit the file directly before trusting +netalertx-test-mount-api_no-mount | this instance in production. +netalertx-test-mount-api_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-api_no-mount | --> first run db.sh +netalertx-test-mount-api_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-api_no-mount | 🆕 First run detected — building initial database at: /data/db/app.db +netalertx-test-mount-api_no-mount | +netalertx-test-mount-api_no-mount | Do not interrupt this step. When complete, consider backing up the fresh +netalertx-test-mount-api_no-mount | DB before onboarding sensitive or critical networks. +netalertx-test-mount-api_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-api_no-mount | --> mandatory folders.sh netalertx-test-mount-api_no-mount | * Creating Plugins log. netalertx-test-mount-api_no-mount | * Creating System services run log. netalertx-test-mount-api_no-mount | * Creating System services run tmp. netalertx-test-mount-api_no-mount | * Creating DB locked log. netalertx-test-mount-api_no-mount | * Creating Execution queue log. +netalertx-test-mount-api_no-mount | --> apply conf override.sh +netalertx-test-mount-api_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-api_no-mount | 📝 APP_CONF_OVERRIDE detected. Configuration written to /data/config/app_conf_override.json. +netalertx-test-mount-api_no-mount | +netalertx-test-mount-api_no-mount | Make sure the JSON content is correct before starting the application. +netalertx-test-mount-api_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-api_no-mount | --> writable config.sh netalertx-test-mount-api_no-mount | --> nginx config.sh netalertx-test-mount-api_no-mount | --> user netalertx.sh @@ -476,14 +817,32 @@ netalertx-test-mount-api_no-mount | --> appliance integrity.sh netalertx-test-mount-api_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-api_no-mount | ⚠️ Warning: Container is running as read-write, not in read-only mode. netalertx-test-mount-api_no-mount | -netalertx-test-mount-api_no-mount | Please mount the root filesystem as --read-only or use read-only: true +netalertx-test-mount-api_no-mount | Please mount the root filesystem as --read-only or use read_only: true netalertx-test-mount-api_no-mount | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/read-only-filesystem.md netalertx-test-mount-api_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-api_no-mount | --> ports available.sh -netalertx-test-mount-api_no-mount | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & netalertx-test-mount-api_no-mount | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & +netalertx-test-mount-api_no-mount | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & netalertx-test-mount-api_no-mount | Starting python3 -m server > /tmp/log/stdout.log 2> >(tee /tmp/log/stderr.log >&2) netalertx-test-mount-api_no-mount | 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;" & +netalertx-test-mount-api_no-mount | Traceback (most recent call last): +netalertx-test-mount-api_no-mount | File "", line 198, in _run_module_as_main +netalertx-test-mount-api_no-mount | File "", line 88, in _run_code +netalertx-test-mount-api_no-mount | File "/app/server/__main__.py", line 260, in +netalertx-test-mount-api_no-mount | sys.exit(main()) +netalertx-test-mount-api_no-mount | ^^^^^^ +netalertx-test-mount-api_no-mount | File "/app/server/__main__.py", line 104, in main +netalertx-test-mount-api_no-mount | pm, all_plugins, imported = importConfigs(pm, db, all_plugins) +netalertx-test-mount-api_no-mount | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-api_no-mount | File "/app/server/initialise.py", line 586, in importConfigs +netalertx-test-mount-api_no-mount | for setting_name, value in settings_override.items(): +netalertx-test-mount-api_no-mount | ^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-api_no-mount | AttributeError: 'int' object has no attribute 'items' +netalertx-test-mount-api_no-mount | Successfully updated IEEE OUI database (112333 entries) +Gracefully stopping... (press Ctrl+C again to force) + Container netalertx-test-mount-api_no-mount Stopping + Container netalertx-test-mount-api_no-mount Stopped + File: docker-compose.mount-test.api_ramdisk.yml ---------------------------------------- Expected outcome: Container shows performance warning for API on RAM disk @@ -495,6 +854,10 @@ Testing: docker-compose.mount-test.api_ramdisk.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_test_netalertx_data" Creating + Volume "mount-tests_test_netalertx_data" Created + Container netalertx-test-mount-api_ramdisk Creating + Container netalertx-test-mount-api_ramdisk Created Attaching to netalertx-test-mount-api_ramdisk netalertx-test-mount-api_ramdisk |  netalertx-test-mount-api_ramdisk | _ _ _ ___ _ _ __ __ @@ -503,7 +866,6 @@ netalertx-test-mount-api_ramdisk | | \| | ___| |_/ /_\ \ | ___ _ __| |_ \ V / netalertx-test-mount-api_ramdisk | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-api_ramdisk | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-api_ramdisk | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-api_ramdisk | netalertx-test-mount-api_ramdisk |  Network intruder and presence detector. netalertx-test-mount-api_ramdisk | https://netalertx.com netalertx-test-mount-api_ramdisk | @@ -512,18 +874,30 @@ netalertx-test-mount-api_ramdisk | Startup pre-checks netalertx-test-mount-api_ramdisk | --> storage permission.sh netalertx-test-mount-api_ramdisk | --> data migration.sh netalertx-test-mount-api_ramdisk | --> mounts.py -netalertx-test-mount-api_ramdisk | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-api_ramdisk | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-api_ramdisk | /data | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-api_ramdisk | /data/db | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-api_ramdisk | /data/config | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-api_ramdisk | /tmp/run/tmp | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-api_ramdisk | /tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-api_ramdisk | /tmp/log | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-api_ramdisk | /tmp/run | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-api_ramdisk | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-api_ramdisk | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-api_ramdisk | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-api_ramdisk | /data | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-api_ramdisk | /data/db | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-api_ramdisk | /data/config | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-api_ramdisk | /tmp/run/tmp | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-api_ramdisk | /tmp/api | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-api_ramdisk | /tmp/log | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-api_ramdisk | /tmp/run | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-api_ramdisk | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ netalertx-test-mount-api_ramdisk | --> first run config.sh +netalertx-test-mount-api_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-api_ramdisk | 🆕 First run detected. Default configuration written to /data/config/app.conf. +netalertx-test-mount-api_ramdisk | +netalertx-test-mount-api_ramdisk | Review your settings in the UI or edit the file directly before trusting +netalertx-test-mount-api_ramdisk | this instance in production. +netalertx-test-mount-api_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-api_ramdisk | --> first run db.sh +netalertx-test-mount-api_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-api_ramdisk | 🆕 First run detected — building initial database at: /data/db/app.db +netalertx-test-mount-api_ramdisk | +netalertx-test-mount-api_ramdisk | Do not interrupt this step. When complete, consider backing up the fresh +netalertx-test-mount-api_ramdisk | DB before onboarding sensitive or critical networks. +netalertx-test-mount-api_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-api_ramdisk | --> mandatory folders.sh netalertx-test-mount-api_ramdisk | * Creating NetAlertX log directory. netalertx-test-mount-api_ramdisk | * Creating NetAlertX API cache. @@ -534,6 +908,12 @@ netalertx-test-mount-api_ramdisk | * Creating System services run log. netalertx-test-mount-api_ramdisk | * Creating System services run tmp. netalertx-test-mount-api_ramdisk | * Creating DB locked log. netalertx-test-mount-api_ramdisk | * Creating Execution queue log. +netalertx-test-mount-api_ramdisk | --> apply conf override.sh +netalertx-test-mount-api_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-api_ramdisk | 📝 APP_CONF_OVERRIDE detected. Configuration written to /data/config/app_conf_override.json. +netalertx-test-mount-api_ramdisk | +netalertx-test-mount-api_ramdisk | Make sure the JSON content is correct before starting the application. +netalertx-test-mount-api_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-api_ramdisk | --> writable config.sh netalertx-test-mount-api_ramdisk | --> nginx config.sh netalertx-test-mount-api_ramdisk | --> user netalertx.sh @@ -544,14 +924,32 @@ netalertx-test-mount-api_ramdisk | --> appliance integrity.sh netalertx-test-mount-api_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-api_ramdisk | ⚠️ Warning: Container is running as read-write, not in read-only mode. netalertx-test-mount-api_ramdisk | -netalertx-test-mount-api_ramdisk | Please mount the root filesystem as --read-only or use read-only: true +netalertx-test-mount-api_ramdisk | Please mount the root filesystem as --read-only or use read_only: true netalertx-test-mount-api_ramdisk | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/read-only-filesystem.md netalertx-test-mount-api_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-api_ramdisk | --> ports available.sh -netalertx-test-mount-api_ramdisk | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & netalertx-test-mount-api_ramdisk | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & +netalertx-test-mount-api_ramdisk | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & netalertx-test-mount-api_ramdisk | Starting python3 -m server > /tmp/log/stdout.log 2> >(tee /tmp/log/stderr.log >&2) netalertx-test-mount-api_ramdisk | 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;" & +netalertx-test-mount-api_ramdisk | Traceback (most recent call last): +netalertx-test-mount-api_ramdisk | File "", line 198, in _run_module_as_main +netalertx-test-mount-api_ramdisk | File "", line 88, in _run_code +netalertx-test-mount-api_ramdisk | File "/app/server/__main__.py", line 260, in +netalertx-test-mount-api_ramdisk | sys.exit(main()) +netalertx-test-mount-api_ramdisk | ^^^^^^ +netalertx-test-mount-api_ramdisk | File "/app/server/__main__.py", line 104, in main +netalertx-test-mount-api_ramdisk | pm, all_plugins, imported = importConfigs(pm, db, all_plugins) +netalertx-test-mount-api_ramdisk | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-api_ramdisk | File "/app/server/initialise.py", line 586, in importConfigs +netalertx-test-mount-api_ramdisk | for setting_name, value in settings_override.items(): +netalertx-test-mount-api_ramdisk | ^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-api_ramdisk | AttributeError: 'int' object has no attribute 'items' +netalertx-test-mount-api_ramdisk | Successfully updated IEEE OUI database (112333 entries) +Gracefully stopping... (press Ctrl+C again to force) + Container netalertx-test-mount-api_ramdisk Stopping + Container netalertx-test-mount-api_ramdisk Stopped + File: docker-compose.mount-test.api_unwritable.yml ---------------------------------------- Expected outcome: Container fails to start due to unwritable API partition @@ -563,6 +961,14 @@ Testing: docker-compose.mount-test.api_unwritable.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_netalertx_db" Creating + Volume "mount-tests_netalertx_db" Created + Volume "mount-tests_netalertx_config" Creating + Volume "mount-tests_netalertx_config" Created + Volume "mount-tests_test_netalertx_api" Creating + Volume "mount-tests_test_netalertx_api" Created + Container netalertx-test-mount-api_unwritable Creating + Container netalertx-test-mount-api_unwritable Created Attaching to netalertx-test-mount-api_unwritable netalertx-test-mount-api_unwritable |  netalertx-test-mount-api_unwritable | _ _ _ ___ _ _ __ __ @@ -571,7 +977,6 @@ netalertx-test-mount-api_unwritable | | \| | ___| |_/ /_\ \ | ___ _ __| |_ \ V netalertx-test-mount-api_unwritable | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-api_unwritable | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-api_unwritable | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-api_unwritable | netalertx-test-mount-api_unwritable |  Network intruder and presence detector. netalertx-test-mount-api_unwritable | https://netalertx.com netalertx-test-mount-api_unwritable | @@ -580,15 +985,35 @@ netalertx-test-mount-api_unwritable | Startup pre-checks netalertx-test-mount-api_unwritable | --> storage permission.sh netalertx-test-mount-api_unwritable | --> data migration.sh netalertx-test-mount-api_unwritable | --> mounts.py -netalertx-test-mount-api_unwritable | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-api_unwritable | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-api_unwritable | /data/db | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-api_unwritable | /data/config | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-api_unwritable | /tmp/run/tmp | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-api_unwritable | /tmp/api | ❌ | ✅ | ❌ | ❌ | ✅ -netalertx-test-mount-api_unwritable | /tmp/log | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-api_unwritable | /tmp/run | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-api_unwritable | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-api_unwritable | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-api_unwritable | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-api_unwritable | /data/db | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-api_unwritable | /data/config | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-api_unwritable | /tmp/run/tmp | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-api_unwritable | /tmp/api | ✅| ❌| ✅ | ❌ | ❌ | ✅ +netalertx-test-mount-api_unwritable | /tmp/log | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-api_unwritable | /tmp/run | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-api_unwritable | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-api_unwritable | +netalertx-test-mount-api_unwritable | +netalertx-test-mount-api_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-api_unwritable | ⚠️ ATTENTION: Configuration issues detected (marked with ❌). +netalertx-test-mount-api_unwritable | +netalertx-test-mount-api_unwritable | * /tmp/api error writing, performance issue +netalertx-test-mount-api_unwritable | +netalertx-test-mount-api_unwritable | We recommend starting with the default docker-compose.yml as the +netalertx-test-mount-api_unwritable | configuration can be quite complex. +netalertx-test-mount-api_unwritable | +netalertx-test-mount-api_unwritable | Review the documentation for a correct setup: +netalertx-test-mount-api_unwritable | https://github.com/jokob-sk/NetAlertX/blob/main/docs/DOCKER_COMPOSE.md +netalertx-test-mount-api_unwritable | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/mount-configuration-issues.md +netalertx-test-mount-api_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-api_unwritable |  +netalertx-test-mount-api_unwritable | \033[1;31m══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-api_unwritable | ❌ NetAlertX startup aborted: critical failure in mounts.py. +netalertx-test-mount-api_unwritable | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/troubleshooting.md +netalertx-test-mount-api_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-api_unwritable | \033[0m netalertx-test-mount-api_unwritable exited with code 1 File: docker-compose.mount-test.config_mounted.yml ---------------------------------------- @@ -601,6 +1026,10 @@ Testing: docker-compose.mount-test.config_mounted.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_test_netalertx_data" Creating + Volume "mount-tests_test_netalertx_data" Created + Container netalertx-test-mount-config_mounted Creating + Container netalertx-test-mount-config_mounted Created Attaching to netalertx-test-mount-config_mounted netalertx-test-mount-config_mounted |  netalertx-test-mount-config_mounted | _ _ _ ___ _ _ __ __ @@ -609,7 +1038,6 @@ netalertx-test-mount-config_mounted | | \| | ___| |_/ /_\ \ | ___ _ __| |_ \ V netalertx-test-mount-config_mounted | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-config_mounted | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-config_mounted | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-config_mounted | netalertx-test-mount-config_mounted |  Network intruder and presence detector. netalertx-test-mount-config_mounted | https://netalertx.com netalertx-test-mount-config_mounted | @@ -618,18 +1046,30 @@ netalertx-test-mount-config_mounted | Startup pre-checks netalertx-test-mount-config_mounted | --> storage permission.sh netalertx-test-mount-config_mounted | --> data migration.sh netalertx-test-mount-config_mounted | --> mounts.py -netalertx-test-mount-config_mounted | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-config_mounted | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-config_mounted | /data | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-config_mounted | /data/db | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-config_mounted | /data/config | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-config_mounted | /tmp/run/tmp | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-config_mounted | /tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-config_mounted | /tmp/log | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-config_mounted | /tmp/run | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-config_mounted | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-config_mounted | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-config_mounted | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-config_mounted | /data | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-config_mounted | /data/db | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-config_mounted | /data/config | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-config_mounted | /tmp/run/tmp | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-config_mounted | /tmp/api | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-config_mounted | /tmp/log | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-config_mounted | /tmp/run | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-config_mounted | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ netalertx-test-mount-config_mounted | --> first run config.sh +netalertx-test-mount-config_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-config_mounted | 🆕 First run detected. Default configuration written to /data/config/app.conf. +netalertx-test-mount-config_mounted | +netalertx-test-mount-config_mounted | Review your settings in the UI or edit the file directly before trusting +netalertx-test-mount-config_mounted | this instance in production. +netalertx-test-mount-config_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-config_mounted | --> first run db.sh +netalertx-test-mount-config_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-config_mounted | 🆕 First run detected — building initial database at: /data/db/app.db +netalertx-test-mount-config_mounted | +netalertx-test-mount-config_mounted | Do not interrupt this step. When complete, consider backing up the fresh +netalertx-test-mount-config_mounted | DB before onboarding sensitive or critical networks. +netalertx-test-mount-config_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-config_mounted | --> mandatory folders.sh netalertx-test-mount-config_mounted | * Creating NetAlertX log directory. netalertx-test-mount-config_mounted | * Creating NetAlertX API cache. @@ -640,6 +1080,12 @@ netalertx-test-mount-config_mounted | * Creating System services run log. netalertx-test-mount-config_mounted | * Creating System services run tmp. netalertx-test-mount-config_mounted | * Creating DB locked log. netalertx-test-mount-config_mounted | * Creating Execution queue log. +netalertx-test-mount-config_mounted | --> apply conf override.sh +netalertx-test-mount-config_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-config_mounted | 📝 APP_CONF_OVERRIDE detected. Configuration written to /data/config/app_conf_override.json. +netalertx-test-mount-config_mounted | +netalertx-test-mount-config_mounted | Make sure the JSON content is correct before starting the application. +netalertx-test-mount-config_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-config_mounted | --> writable config.sh netalertx-test-mount-config_mounted | --> nginx config.sh netalertx-test-mount-config_mounted | --> user netalertx.sh @@ -650,14 +1096,32 @@ netalertx-test-mount-config_mounted | --> appliance integrity.sh netalertx-test-mount-config_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-config_mounted | ⚠️ Warning: Container is running as read-write, not in read-only mode. netalertx-test-mount-config_mounted | -netalertx-test-mount-config_mounted | Please mount the root filesystem as --read-only or use read-only: true +netalertx-test-mount-config_mounted | Please mount the root filesystem as --read-only or use read_only: true netalertx-test-mount-config_mounted | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/read-only-filesystem.md netalertx-test-mount-config_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-config_mounted | --> ports available.sh -netalertx-test-mount-config_mounted | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & netalertx-test-mount-config_mounted | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & +netalertx-test-mount-config_mounted | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & netalertx-test-mount-config_mounted | Starting python3 -m server > /tmp/log/stdout.log 2> >(tee /tmp/log/stderr.log >&2) netalertx-test-mount-config_mounted | 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;" & +netalertx-test-mount-config_mounted | Traceback (most recent call last): +netalertx-test-mount-config_mounted | File "", line 198, in _run_module_as_main +netalertx-test-mount-config_mounted | File "", line 88, in _run_code +netalertx-test-mount-config_mounted | File "/app/server/__main__.py", line 260, in +netalertx-test-mount-config_mounted | sys.exit(main()) +netalertx-test-mount-config_mounted | ^^^^^^ +netalertx-test-mount-config_mounted | File "/app/server/__main__.py", line 104, in main +netalertx-test-mount-config_mounted | pm, all_plugins, imported = importConfigs(pm, db, all_plugins) +netalertx-test-mount-config_mounted | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-config_mounted | File "/app/server/initialise.py", line 586, in importConfigs +netalertx-test-mount-config_mounted | for setting_name, value in settings_override.items(): +netalertx-test-mount-config_mounted | ^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-config_mounted | AttributeError: 'int' object has no attribute 'items' +netalertx-test-mount-config_mounted | Successfully updated IEEE OUI database (112333 entries) +Gracefully stopping... (press Ctrl+C again to force) + Container netalertx-test-mount-config_mounted Stopping + Container netalertx-test-mount-config_mounted Stopped + File: docker-compose.mount-test.config_no-mount.yml ---------------------------------------- Expected outcome: Container shows mount error for config directory @@ -669,6 +1133,10 @@ Testing: docker-compose.mount-test.config_no-mount.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_netalertx_db" Creating + Volume "mount-tests_netalertx_db" Created + Container netalertx-test-mount-config_no-mount Creating + Container netalertx-test-mount-config_no-mount Created Attaching to netalertx-test-mount-config_no-mount netalertx-test-mount-config_no-mount |  netalertx-test-mount-config_no-mount | _ _ _ ___ _ _ __ __ @@ -677,7 +1145,6 @@ netalertx-test-mount-config_no-mount | | \| | ___| |_/ /_\ \ | ___ _ __| |_ \ netalertx-test-mount-config_no-mount | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-config_no-mount | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-config_no-mount | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-config_no-mount | netalertx-test-mount-config_no-mount |  Network intruder and presence detector. netalertx-test-mount-config_no-mount | https://netalertx.com netalertx-test-mount-config_no-mount | @@ -686,23 +1153,57 @@ netalertx-test-mount-config_no-mount | Startup pre-checks netalertx-test-mount-config_no-mount | --> storage permission.sh netalertx-test-mount-config_no-mount | --> data migration.sh netalertx-test-mount-config_no-mount | --> mounts.py -netalertx-test-mount-config_no-mount | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-config_no-mount | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-config_no-mount | /data | ✅ | ❌ | ➖ | ➖ | ❌ -netalertx-test-mount-config_no-mount | /data/db | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-config_no-mount | /data/config | ✅ | ❌ | ➖ | ➖ | ❌ -netalertx-test-mount-config_no-mount | /tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-config_no-mount | /tmp/log | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-config_no-mount | /tmp/run | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-config_no-mount | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-config_no-mount | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-config_no-mount | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-config_no-mount | /data | ✅| ✅| ❌ | ➖ | ➖ | ❌ +netalertx-test-mount-config_no-mount | /data/db | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-config_no-mount | /data/config | ✅| ✅| ❌ | ➖ | ➖ | ❌ +netalertx-test-mount-config_no-mount | /tmp/api | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-config_no-mount | /tmp/log | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-config_no-mount | /tmp/run | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-config_no-mount | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-config_no-mount | +netalertx-test-mount-config_no-mount | +netalertx-test-mount-config_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-config_no-mount | ⚠️ ATTENTION: Configuration issues detected (marked with ❌). +netalertx-test-mount-config_no-mount | +netalertx-test-mount-config_no-mount | * /data not mounted, risk of dataloss +netalertx-test-mount-config_no-mount | * /data/config not mounted, risk of dataloss +netalertx-test-mount-config_no-mount | +netalertx-test-mount-config_no-mount | We recommend starting with the default docker-compose.yml as the +netalertx-test-mount-config_no-mount | configuration can be quite complex. +netalertx-test-mount-config_no-mount | +netalertx-test-mount-config_no-mount | Review the documentation for a correct setup: +netalertx-test-mount-config_no-mount | https://github.com/jokob-sk/NetAlertX/blob/main/docs/DOCKER_COMPOSE.md +netalertx-test-mount-config_no-mount | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/mount-configuration-issues.md +netalertx-test-mount-config_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-config_no-mount |  netalertx-test-mount-config_no-mount | --> first run config.sh +netalertx-test-mount-config_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-config_no-mount | 🆕 First run detected. Default configuration written to /data/config/app.conf. +netalertx-test-mount-config_no-mount | +netalertx-test-mount-config_no-mount | Review your settings in the UI or edit the file directly before trusting +netalertx-test-mount-config_no-mount | this instance in production. +netalertx-test-mount-config_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-config_no-mount | --> first run db.sh +netalertx-test-mount-config_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-config_no-mount | 🆕 First run detected — building initial database at: /data/db/app.db +netalertx-test-mount-config_no-mount | +netalertx-test-mount-config_no-mount | Do not interrupt this step. When complete, consider backing up the fresh +netalertx-test-mount-config_no-mount | DB before onboarding sensitive or critical networks. +netalertx-test-mount-config_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-config_no-mount | --> mandatory folders.sh netalertx-test-mount-config_no-mount | * Creating Plugins log. netalertx-test-mount-config_no-mount | * Creating System services run log. netalertx-test-mount-config_no-mount | * Creating System services run tmp. netalertx-test-mount-config_no-mount | * Creating DB locked log. netalertx-test-mount-config_no-mount | * Creating Execution queue log. +netalertx-test-mount-config_no-mount | --> apply conf override.sh +netalertx-test-mount-config_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-config_no-mount | 📝 APP_CONF_OVERRIDE detected. Configuration written to /data/config/app_conf_override.json. +netalertx-test-mount-config_no-mount | +netalertx-test-mount-config_no-mount | Make sure the JSON content is correct before starting the application. +netalertx-test-mount-config_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-config_no-mount | --> writable config.sh netalertx-test-mount-config_no-mount | --> nginx config.sh netalertx-test-mount-config_no-mount | --> user netalertx.sh @@ -713,14 +1214,32 @@ netalertx-test-mount-config_no-mount | --> appliance integrity.sh netalertx-test-mount-config_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-config_no-mount | ⚠️ Warning: Container is running as read-write, not in read-only mode. netalertx-test-mount-config_no-mount | -netalertx-test-mount-config_no-mount | Please mount the root filesystem as --read-only or use read-only: true +netalertx-test-mount-config_no-mount | Please mount the root filesystem as --read-only or use read_only: true netalertx-test-mount-config_no-mount | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/read-only-filesystem.md netalertx-test-mount-config_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-config_no-mount | --> ports available.sh -netalertx-test-mount-config_no-mount | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & netalertx-test-mount-config_no-mount | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & +netalertx-test-mount-config_no-mount | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & netalertx-test-mount-config_no-mount | Starting python3 -m server > /tmp/log/stdout.log 2> >(tee /tmp/log/stderr.log >&2) netalertx-test-mount-config_no-mount | 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;" & +netalertx-test-mount-config_no-mount | Traceback (most recent call last): +netalertx-test-mount-config_no-mount | File "", line 198, in _run_module_as_main +netalertx-test-mount-config_no-mount | File "", line 88, in _run_code +netalertx-test-mount-config_no-mount | File "/app/server/__main__.py", line 260, in +netalertx-test-mount-config_no-mount | sys.exit(main()) +netalertx-test-mount-config_no-mount | ^^^^^^ +netalertx-test-mount-config_no-mount | File "/app/server/__main__.py", line 104, in main +netalertx-test-mount-config_no-mount | pm, all_plugins, imported = importConfigs(pm, db, all_plugins) +netalertx-test-mount-config_no-mount | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-config_no-mount | File "/app/server/initialise.py", line 586, in importConfigs +netalertx-test-mount-config_no-mount | for setting_name, value in settings_override.items(): +netalertx-test-mount-config_no-mount | ^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-config_no-mount | AttributeError: 'int' object has no attribute 'items' +netalertx-test-mount-config_no-mount | Successfully updated IEEE OUI database (112333 entries) +Gracefully stopping... (press Ctrl+C again to force) + Container netalertx-test-mount-config_no-mount Stopping + Container netalertx-test-mount-config_no-mount Stopped + File: docker-compose.mount-test.config_ramdisk.yml ---------------------------------------- Expected outcome: Container shows dataloss risk warning for config on RAM disk @@ -732,6 +1251,10 @@ Testing: docker-compose.mount-test.config_ramdisk.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_netalertx_db" Creating + Volume "mount-tests_netalertx_db" Created + Container netalertx-test-mount-config_ramdisk Creating + Container netalertx-test-mount-config_ramdisk Created Attaching to netalertx-test-mount-config_ramdisk netalertx-test-mount-config_ramdisk |  netalertx-test-mount-config_ramdisk | _ _ _ ___ _ _ __ __ @@ -740,7 +1263,6 @@ netalertx-test-mount-config_ramdisk | | \| | ___| |_/ /_\ \ | ___ _ __| |_ \ V netalertx-test-mount-config_ramdisk | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-config_ramdisk | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-config_ramdisk | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-config_ramdisk | netalertx-test-mount-config_ramdisk |  Network intruder and presence detector. netalertx-test-mount-config_ramdisk | https://netalertx.com netalertx-test-mount-config_ramdisk | @@ -749,25 +1271,93 @@ netalertx-test-mount-config_ramdisk | Startup pre-checks netalertx-test-mount-config_ramdisk | --> storage permission.sh netalertx-test-mount-config_ramdisk | --> data migration.sh netalertx-test-mount-config_ramdisk | --> mounts.py -netalertx-test-mount-config_ramdisk | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-config_ramdisk | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-config_ramdisk | /data | ✅ | ❌ | ➖ | ➖ | ❌ -netalertx-test-mount-config_ramdisk | /data/db | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-config_ramdisk | /data/config | ✅ | ✅ | ❌ | ➖ | ❌ -netalertx-test-mount-config_ramdisk | /tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-config_ramdisk | /tmp/log | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-config_ramdisk | /tmp/run | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-config_ramdisk | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-config_ramdisk | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-config_ramdisk | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-config_ramdisk | /data | ✅| ✅| ❌ | ➖ | ➖ | ❌ +netalertx-test-mount-config_ramdisk | /data/db | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-config_ramdisk | /data/config | ✅| ✅| ✅ | ❌ | ➖ | ❌ +netalertx-test-mount-config_ramdisk | /tmp/api | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-config_ramdisk | /tmp/log | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-config_ramdisk | /tmp/run | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-config_ramdisk | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-config_ramdisk | +netalertx-test-mount-config_ramdisk | +netalertx-test-mount-config_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-config_ramdisk | ⚠️ ATTENTION: Configuration issues detected (marked with ❌). +netalertx-test-mount-config_ramdisk | +netalertx-test-mount-config_ramdisk | * /data not mounted, risk of dataloss +netalertx-test-mount-config_ramdisk | * /data/config risk of dataloss +netalertx-test-mount-config_ramdisk | +netalertx-test-mount-config_ramdisk | We recommend starting with the default docker-compose.yml as the +netalertx-test-mount-config_ramdisk | configuration can be quite complex. +netalertx-test-mount-config_ramdisk | +netalertx-test-mount-config_ramdisk | Review the documentation for a correct setup: +netalertx-test-mount-config_ramdisk | https://github.com/jokob-sk/NetAlertX/blob/main/docs/DOCKER_COMPOSE.md +netalertx-test-mount-config_ramdisk | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/mount-configuration-issues.md +netalertx-test-mount-config_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-config_ramdisk |  netalertx-test-mount-config_ramdisk | --> first run config.sh +netalertx-test-mount-config_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-config_ramdisk | 🆕 First run detected. Default configuration written to /data/config/app.conf. +netalertx-test-mount-config_ramdisk | +netalertx-test-mount-config_ramdisk | Review your settings in the UI or edit the file directly before trusting +netalertx-test-mount-config_ramdisk | this instance in production. +netalertx-test-mount-config_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-config_ramdisk | --> first run db.sh +netalertx-test-mount-config_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-config_ramdisk | 🆕 First run detected — building initial database at: /data/db/app.db +netalertx-test-mount-config_ramdisk | +netalertx-test-mount-config_ramdisk | Do not interrupt this step. When complete, consider backing up the fresh +netalertx-test-mount-config_ramdisk | DB before onboarding sensitive or critical networks. +netalertx-test-mount-config_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-config_ramdisk | --> mandatory folders.sh netalertx-test-mount-config_ramdisk | * Creating Plugins log. netalertx-test-mount-config_ramdisk | * Creating System services run log. netalertx-test-mount-config_ramdisk | * Creating System services run tmp. netalertx-test-mount-config_ramdisk | * Creating DB locked log. netalertx-test-mount-config_ramdisk | * Creating Execution queue log. +netalertx-test-mount-config_ramdisk | --> apply conf override.sh +netalertx-test-mount-config_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-config_ramdisk | 📝 APP_CONF_OVERRIDE detected. Configuration written to /data/config/app_conf_override.json. +netalertx-test-mount-config_ramdisk | +netalertx-test-mount-config_ramdisk | Make sure the JSON content is correct before starting the application. +netalertx-test-mount-config_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-config_ramdisk | --> writable config.sh - netalertx-test-mount-config_ramdisk exited with code 1 +netalertx-test-mount-config_ramdisk | --> nginx config.sh +netalertx-test-mount-config_ramdisk | --> user netalertx.sh +netalertx-test-mount-config_ramdisk | --> host mode network.sh +netalertx-test-mount-config_ramdisk | --> layer 2 capabilities.sh +netalertx-test-mount-config_ramdisk | --> excessive capabilities.sh +netalertx-test-mount-config_ramdisk | --> appliance integrity.sh +netalertx-test-mount-config_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-config_ramdisk | ⚠️ Warning: Container is running as read-write, not in read-only mode. +netalertx-test-mount-config_ramdisk | +netalertx-test-mount-config_ramdisk | Please mount the root filesystem as --read-only or use read_only: true +netalertx-test-mount-config_ramdisk | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/read-only-filesystem.md +netalertx-test-mount-config_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-config_ramdisk | --> ports available.sh +netalertx-test-mount-config_ramdisk | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & +netalertx-test-mount-config_ramdisk | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & +netalertx-test-mount-config_ramdisk | Starting python3 -m server > /tmp/log/stdout.log 2> >(tee /tmp/log/stderr.log >&2) +netalertx-test-mount-config_ramdisk | 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;" & +netalertx-test-mount-config_ramdisk | Traceback (most recent call last): +netalertx-test-mount-config_ramdisk | File "", line 198, in _run_module_as_main +netalertx-test-mount-config_ramdisk | File "", line 88, in _run_code +netalertx-test-mount-config_ramdisk | File "/app/server/__main__.py", line 260, in +netalertx-test-mount-config_ramdisk | sys.exit(main()) +netalertx-test-mount-config_ramdisk | ^^^^^^ +netalertx-test-mount-config_ramdisk | File "/app/server/__main__.py", line 104, in main +netalertx-test-mount-config_ramdisk | pm, all_plugins, imported = importConfigs(pm, db, all_plugins) +netalertx-test-mount-config_ramdisk | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-config_ramdisk | File "/app/server/initialise.py", line 586, in importConfigs +netalertx-test-mount-config_ramdisk | for setting_name, value in settings_override.items(): +netalertx-test-mount-config_ramdisk | ^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-config_ramdisk | AttributeError: 'int' object has no attribute 'items' +netalertx-test-mount-config_ramdisk | Successfully updated IEEE OUI database (112333 entries) +Gracefully stopping... (press Ctrl+C again to force) + Container netalertx-test-mount-config_ramdisk Stopping + Container netalertx-test-mount-config_ramdisk Stopped + File: docker-compose.mount-test.config_unwritable.yml ---------------------------------------- Expected outcome: Container fails to start due to unwritable config partition @@ -779,6 +1369,12 @@ Testing: docker-compose.mount-test.config_unwritable.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_test_netalertx_config" Creating + Volume "mount-tests_test_netalertx_config" Created + Volume "mount-tests_netalertx_db" Creating + Volume "mount-tests_netalertx_db" Created + Container netalertx-test-mount-config_unwritable Creating + Container netalertx-test-mount-config_unwritable Created Attaching to netalertx-test-mount-config_unwritable netalertx-test-mount-config_unwritable |  netalertx-test-mount-config_unwritable | _ _ _ ___ _ _ __ __ @@ -787,7 +1383,6 @@ netalertx-test-mount-config_unwritable | | \| | ___| |_/ /_\ \ | ___ _ __| |_ netalertx-test-mount-config_unwritable | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-config_unwritable | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-config_unwritable | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-config_unwritable | netalertx-test-mount-config_unwritable |  Network intruder and presence detector. netalertx-test-mount-config_unwritable | https://netalertx.com netalertx-test-mount-config_unwritable | @@ -796,15 +1391,36 @@ netalertx-test-mount-config_unwritable | Startup pre-checks netalertx-test-mount-config_unwritable | --> storage permission.sh netalertx-test-mount-config_unwritable | --> data migration.sh netalertx-test-mount-config_unwritable | --> mounts.py -netalertx-test-mount-config_unwritable | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-config_unwritable | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-config_unwritable | /data | ✅ | ❌ | ➖ | ➖ | ❌ -netalertx-test-mount-config_unwritable | /data/db | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-config_unwritable | /data/config | ❌ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-config_unwritable | /tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-config_unwritable | /tmp/log | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-config_unwritable | /tmp/run | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-config_unwritable | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-config_unwritable | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-config_unwritable | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-config_unwritable | /data | ✅| ✅| ❌ | ➖ | ➖ | ❌ +netalertx-test-mount-config_unwritable | /data/db | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-config_unwritable | /data/config | ✅| ❌| ✅ | ➖ | ➖ | ❌ +netalertx-test-mount-config_unwritable | /tmp/api | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-config_unwritable | /tmp/log | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-config_unwritable | /tmp/run | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-config_unwritable | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-config_unwritable | +netalertx-test-mount-config_unwritable | +netalertx-test-mount-config_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-config_unwritable | ⚠️ ATTENTION: Configuration issues detected (marked with ❌). +netalertx-test-mount-config_unwritable | +netalertx-test-mount-config_unwritable | * /data not mounted, risk of dataloss +netalertx-test-mount-config_unwritable | * /data/config error writing, risk of dataloss +netalertx-test-mount-config_unwritable | +netalertx-test-mount-config_unwritable | We recommend starting with the default docker-compose.yml as the +netalertx-test-mount-config_unwritable | configuration can be quite complex. +netalertx-test-mount-config_unwritable | +netalertx-test-mount-config_unwritable | Review the documentation for a correct setup: +netalertx-test-mount-config_unwritable | https://github.com/jokob-sk/NetAlertX/blob/main/docs/DOCKER_COMPOSE.md +netalertx-test-mount-config_unwritable | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/mount-configuration-issues.md +netalertx-test-mount-config_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-config_unwritable |  +netalertx-test-mount-config_unwritable | \033[1;31m══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-config_unwritable | ❌ NetAlertX startup aborted: critical failure in mounts.py. +netalertx-test-mount-config_unwritable | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/troubleshooting.md +netalertx-test-mount-config_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-config_unwritable | \033[0m netalertx-test-mount-config_unwritable exited with code 1 File: docker-compose.mount-test.db_mounted.yml ---------------------------------------- @@ -817,6 +1433,10 @@ Testing: docker-compose.mount-test.db_mounted.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_test_netalertx_data" Creating + Volume "mount-tests_test_netalertx_data" Created + Container netalertx-test-mount-db_mounted Creating + Container netalertx-test-mount-db_mounted Created Attaching to netalertx-test-mount-db_mounted netalertx-test-mount-db_mounted |  netalertx-test-mount-db_mounted | _ _ _ ___ _ _ __ __ @@ -825,7 +1445,6 @@ netalertx-test-mount-db_mounted | | \| | ___| |_/ /_\ \ | ___ _ __| |_ \ V / netalertx-test-mount-db_mounted | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-db_mounted | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-db_mounted | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-db_mounted | netalertx-test-mount-db_mounted |  Network intruder and presence detector. netalertx-test-mount-db_mounted | https://netalertx.com netalertx-test-mount-db_mounted | @@ -834,18 +1453,30 @@ netalertx-test-mount-db_mounted | Startup pre-checks netalertx-test-mount-db_mounted | --> storage permission.sh netalertx-test-mount-db_mounted | --> data migration.sh netalertx-test-mount-db_mounted | --> mounts.py -netalertx-test-mount-db_mounted | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-db_mounted | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-db_mounted | /data | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-db_mounted | /data/db | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-db_mounted | /data/config | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-db_mounted | /tmp/run/tmp | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-db_mounted | /tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-db_mounted | /tmp/log | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-db_mounted | /tmp/run | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-db_mounted | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-db_mounted | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-db_mounted | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-db_mounted | /data | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-db_mounted | /data/db | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-db_mounted | /data/config | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-db_mounted | /tmp/run/tmp | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-db_mounted | /tmp/api | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-db_mounted | /tmp/log | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-db_mounted | /tmp/run | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-db_mounted | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ netalertx-test-mount-db_mounted | --> first run config.sh +netalertx-test-mount-db_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-db_mounted | 🆕 First run detected. Default configuration written to /data/config/app.conf. +netalertx-test-mount-db_mounted | +netalertx-test-mount-db_mounted | Review your settings in the UI or edit the file directly before trusting +netalertx-test-mount-db_mounted | this instance in production. +netalertx-test-mount-db_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-db_mounted | --> first run db.sh +netalertx-test-mount-db_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-db_mounted | 🆕 First run detected — building initial database at: /data/db/app.db +netalertx-test-mount-db_mounted | +netalertx-test-mount-db_mounted | Do not interrupt this step. When complete, consider backing up the fresh +netalertx-test-mount-db_mounted | DB before onboarding sensitive or critical networks. +netalertx-test-mount-db_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-db_mounted | --> mandatory folders.sh netalertx-test-mount-db_mounted | * Creating NetAlertX log directory. netalertx-test-mount-db_mounted | * Creating NetAlertX API cache. @@ -856,6 +1487,12 @@ netalertx-test-mount-db_mounted | * Creating System services run log. netalertx-test-mount-db_mounted | * Creating System services run tmp. netalertx-test-mount-db_mounted | * Creating DB locked log. netalertx-test-mount-db_mounted | * Creating Execution queue log. +netalertx-test-mount-db_mounted | --> apply conf override.sh +netalertx-test-mount-db_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-db_mounted | 📝 APP_CONF_OVERRIDE detected. Configuration written to /data/config/app_conf_override.json. +netalertx-test-mount-db_mounted | +netalertx-test-mount-db_mounted | Make sure the JSON content is correct before starting the application. +netalertx-test-mount-db_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-db_mounted | --> writable config.sh netalertx-test-mount-db_mounted | --> nginx config.sh netalertx-test-mount-db_mounted | --> user netalertx.sh @@ -866,7 +1503,7 @@ netalertx-test-mount-db_mounted | --> appliance integrity.sh netalertx-test-mount-db_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-db_mounted | ⚠️ Warning: Container is running as read-write, not in read-only mode. netalertx-test-mount-db_mounted | -netalertx-test-mount-db_mounted | Please mount the root filesystem as --read-only or use read-only: true +netalertx-test-mount-db_mounted | Please mount the root filesystem as --read-only or use read_only: true netalertx-test-mount-db_mounted | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/read-only-filesystem.md netalertx-test-mount-db_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-db_mounted | --> ports available.sh @@ -874,6 +1511,24 @@ netalertx-test-mount-db_mounted | Starting /usr/sbin/php-fpm83 -y "/services/co netalertx-test-mount-db_mounted | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & netalertx-test-mount-db_mounted | Starting python3 -m server > /tmp/log/stdout.log 2> >(tee /tmp/log/stderr.log >&2) netalertx-test-mount-db_mounted | 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;" & +netalertx-test-mount-db_mounted | Traceback (most recent call last): +netalertx-test-mount-db_mounted | File "", line 198, in _run_module_as_main +netalertx-test-mount-db_mounted | File "", line 88, in _run_code +netalertx-test-mount-db_mounted | File "/app/server/__main__.py", line 260, in +netalertx-test-mount-db_mounted | sys.exit(main()) +netalertx-test-mount-db_mounted | ^^^^^^ +netalertx-test-mount-db_mounted | File "/app/server/__main__.py", line 104, in main +netalertx-test-mount-db_mounted | pm, all_plugins, imported = importConfigs(pm, db, all_plugins) +netalertx-test-mount-db_mounted | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-db_mounted | File "/app/server/initialise.py", line 586, in importConfigs +netalertx-test-mount-db_mounted | for setting_name, value in settings_override.items(): +netalertx-test-mount-db_mounted | ^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-db_mounted | AttributeError: 'int' object has no attribute 'items' +netalertx-test-mount-db_mounted | Successfully updated IEEE OUI database (112333 entries) +Gracefully stopping... (press Ctrl+C again to force) + Container netalertx-test-mount-db_mounted Stopping + Container netalertx-test-mount-db_mounted Stopped + File: docker-compose.mount-test.db_no-mount.yml ---------------------------------------- Expected outcome: Container shows mount error warning but continues running @@ -885,6 +1540,10 @@ Testing: docker-compose.mount-test.db_no-mount.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_netalertx_config" Creating + Volume "mount-tests_netalertx_config" Created + Container netalertx-test-mount-db_no-mount Creating + Container netalertx-test-mount-db_no-mount Created Attaching to netalertx-test-mount-db_no-mount netalertx-test-mount-db_no-mount |  netalertx-test-mount-db_no-mount | _ _ _ ___ _ _ __ __ @@ -893,7 +1552,6 @@ netalertx-test-mount-db_no-mount | | \| | ___| |_/ /_\ \ | ___ _ __| |_ \ V / netalertx-test-mount-db_no-mount | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-db_no-mount | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-db_no-mount | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-db_no-mount | netalertx-test-mount-db_no-mount |  Network intruder and presence detector. netalertx-test-mount-db_no-mount | https://netalertx.com netalertx-test-mount-db_no-mount | @@ -902,23 +1560,57 @@ netalertx-test-mount-db_no-mount | Startup pre-checks netalertx-test-mount-db_no-mount | --> storage permission.sh netalertx-test-mount-db_no-mount | --> data migration.sh netalertx-test-mount-db_no-mount | --> mounts.py -netalertx-test-mount-db_no-mount | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-db_no-mount | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-db_no-mount | /data | ✅ | ❌ | ➖ | ➖ | ❌ -netalertx-test-mount-db_no-mount | /data/db | ✅ | ❌ | ➖ | ➖ | ❌ -netalertx-test-mount-db_no-mount | /data/config | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-db_no-mount | /tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-db_no-mount | /tmp/log | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-db_no-mount | /tmp/run | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-db_no-mount | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-db_no-mount | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-db_no-mount | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-db_no-mount | /data | ✅| ✅| ❌ | ➖ | ➖ | ❌ +netalertx-test-mount-db_no-mount | /data/db | ✅| ✅| ❌ | ➖ | ➖ | ❌ +netalertx-test-mount-db_no-mount | /data/config | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-db_no-mount | /tmp/api | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-db_no-mount | /tmp/log | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-db_no-mount | /tmp/run | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-db_no-mount | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-db_no-mount | +netalertx-test-mount-db_no-mount | +netalertx-test-mount-db_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-db_no-mount | ⚠️ ATTENTION: Configuration issues detected (marked with ❌). +netalertx-test-mount-db_no-mount | +netalertx-test-mount-db_no-mount | * /data not mounted, risk of dataloss +netalertx-test-mount-db_no-mount | * /data/db not mounted, risk of dataloss +netalertx-test-mount-db_no-mount | +netalertx-test-mount-db_no-mount | We recommend starting with the default docker-compose.yml as the +netalertx-test-mount-db_no-mount | configuration can be quite complex. +netalertx-test-mount-db_no-mount | +netalertx-test-mount-db_no-mount | Review the documentation for a correct setup: +netalertx-test-mount-db_no-mount | https://github.com/jokob-sk/NetAlertX/blob/main/docs/DOCKER_COMPOSE.md +netalertx-test-mount-db_no-mount | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/mount-configuration-issues.md +netalertx-test-mount-db_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-db_no-mount |  netalertx-test-mount-db_no-mount | --> first run config.sh +netalertx-test-mount-db_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-db_no-mount | 🆕 First run detected. Default configuration written to /data/config/app.conf. +netalertx-test-mount-db_no-mount | +netalertx-test-mount-db_no-mount | Review your settings in the UI or edit the file directly before trusting +netalertx-test-mount-db_no-mount | this instance in production. +netalertx-test-mount-db_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-db_no-mount | --> first run db.sh +netalertx-test-mount-db_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-db_no-mount | 🆕 First run detected — building initial database at: /data/db/app.db +netalertx-test-mount-db_no-mount | +netalertx-test-mount-db_no-mount | Do not interrupt this step. When complete, consider backing up the fresh +netalertx-test-mount-db_no-mount | DB before onboarding sensitive or critical networks. +netalertx-test-mount-db_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-db_no-mount | --> mandatory folders.sh netalertx-test-mount-db_no-mount | * Creating Plugins log. netalertx-test-mount-db_no-mount | * Creating System services run log. netalertx-test-mount-db_no-mount | * Creating System services run tmp. netalertx-test-mount-db_no-mount | * Creating DB locked log. netalertx-test-mount-db_no-mount | * Creating Execution queue log. +netalertx-test-mount-db_no-mount | --> apply conf override.sh +netalertx-test-mount-db_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-db_no-mount | 📝 APP_CONF_OVERRIDE detected. Configuration written to /data/config/app_conf_override.json. +netalertx-test-mount-db_no-mount | +netalertx-test-mount-db_no-mount | Make sure the JSON content is correct before starting the application. +netalertx-test-mount-db_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-db_no-mount | --> writable config.sh netalertx-test-mount-db_no-mount | --> nginx config.sh netalertx-test-mount-db_no-mount | --> user netalertx.sh @@ -929,14 +1621,32 @@ netalertx-test-mount-db_no-mount | --> appliance integrity.sh netalertx-test-mount-db_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-db_no-mount | ⚠️ Warning: Container is running as read-write, not in read-only mode. netalertx-test-mount-db_no-mount | -netalertx-test-mount-db_no-mount | Please mount the root filesystem as --read-only or use read-only: true +netalertx-test-mount-db_no-mount | Please mount the root filesystem as --read-only or use read_only: true netalertx-test-mount-db_no-mount | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/read-only-filesystem.md netalertx-test-mount-db_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-db_no-mount | --> ports available.sh -netalertx-test-mount-db_no-mount | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & netalertx-test-mount-db_no-mount | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & +netalertx-test-mount-db_no-mount | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & netalertx-test-mount-db_no-mount | Starting python3 -m server > /tmp/log/stdout.log 2> >(tee /tmp/log/stderr.log >&2) netalertx-test-mount-db_no-mount | 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;" & +netalertx-test-mount-db_no-mount | Traceback (most recent call last): +netalertx-test-mount-db_no-mount | File "", line 198, in _run_module_as_main +netalertx-test-mount-db_no-mount | File "", line 88, in _run_code +netalertx-test-mount-db_no-mount | File "/app/server/__main__.py", line 260, in +netalertx-test-mount-db_no-mount | sys.exit(main()) +netalertx-test-mount-db_no-mount | ^^^^^^ +netalertx-test-mount-db_no-mount | File "/app/server/__main__.py", line 104, in main +netalertx-test-mount-db_no-mount | pm, all_plugins, imported = importConfigs(pm, db, all_plugins) +netalertx-test-mount-db_no-mount | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-db_no-mount | File "/app/server/initialise.py", line 586, in importConfigs +netalertx-test-mount-db_no-mount | for setting_name, value in settings_override.items(): +netalertx-test-mount-db_no-mount | ^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-db_no-mount | AttributeError: 'int' object has no attribute 'items' +netalertx-test-mount-db_no-mount | Successfully updated IEEE OUI database (112333 entries) +Gracefully stopping... (press Ctrl+C again to force) + Container netalertx-test-mount-db_no-mount Stopping + Container netalertx-test-mount-db_no-mount Stopped + File: docker-compose.mount-test.db_ramdisk.yml ---------------------------------------- Expected outcome: Container shows dataloss risk warning for database on RAM disk @@ -948,6 +1658,10 @@ Testing: docker-compose.mount-test.db_ramdisk.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_netalertx_config" Creating + Volume "mount-tests_netalertx_config" Created + Container netalertx-test-mount-db_ramdisk Creating + Container netalertx-test-mount-db_ramdisk Created Attaching to netalertx-test-mount-db_ramdisk netalertx-test-mount-db_ramdisk |  netalertx-test-mount-db_ramdisk | _ _ _ ___ _ _ __ __ @@ -956,7 +1670,6 @@ netalertx-test-mount-db_ramdisk | | \| | ___| |_/ /_\ \ | ___ _ __| |_ \ V / netalertx-test-mount-db_ramdisk | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-db_ramdisk | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-db_ramdisk | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-db_ramdisk | netalertx-test-mount-db_ramdisk |  Network intruder and presence detector. netalertx-test-mount-db_ramdisk | https://netalertx.com netalertx-test-mount-db_ramdisk | @@ -965,23 +1678,57 @@ netalertx-test-mount-db_ramdisk | Startup pre-checks netalertx-test-mount-db_ramdisk | --> storage permission.sh netalertx-test-mount-db_ramdisk | --> data migration.sh netalertx-test-mount-db_ramdisk | --> mounts.py -netalertx-test-mount-db_ramdisk | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-db_ramdisk | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-db_ramdisk | /data | ✅ | ❌ | ➖ | ➖ | ❌ -netalertx-test-mount-db_ramdisk | /data/db | ✅ | ✅ | ❌ | ➖ | ❌ -netalertx-test-mount-db_ramdisk | /data/config | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-db_ramdisk | /tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-db_ramdisk | /tmp/log | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-db_ramdisk | /tmp/run | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-db_ramdisk | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-db_ramdisk | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-db_ramdisk | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-db_ramdisk | /data | ✅| ✅| ❌ | ➖ | ➖ | ❌ +netalertx-test-mount-db_ramdisk | /data/db | ✅| ✅| ✅ | ❌ | ➖ | ❌ +netalertx-test-mount-db_ramdisk | /data/config | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-db_ramdisk | /tmp/api | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-db_ramdisk | /tmp/log | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-db_ramdisk | /tmp/run | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-db_ramdisk | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-db_ramdisk | +netalertx-test-mount-db_ramdisk | +netalertx-test-mount-db_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-db_ramdisk | ⚠️ ATTENTION: Configuration issues detected (marked with ❌). +netalertx-test-mount-db_ramdisk | +netalertx-test-mount-db_ramdisk | * /data not mounted, risk of dataloss +netalertx-test-mount-db_ramdisk | * /data/db risk of dataloss +netalertx-test-mount-db_ramdisk | +netalertx-test-mount-db_ramdisk | We recommend starting with the default docker-compose.yml as the +netalertx-test-mount-db_ramdisk | configuration can be quite complex. +netalertx-test-mount-db_ramdisk | +netalertx-test-mount-db_ramdisk | Review the documentation for a correct setup: +netalertx-test-mount-db_ramdisk | https://github.com/jokob-sk/NetAlertX/blob/main/docs/DOCKER_COMPOSE.md +netalertx-test-mount-db_ramdisk | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/mount-configuration-issues.md +netalertx-test-mount-db_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-db_ramdisk |  netalertx-test-mount-db_ramdisk | --> first run config.sh +netalertx-test-mount-db_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-db_ramdisk | 🆕 First run detected. Default configuration written to /data/config/app.conf. +netalertx-test-mount-db_ramdisk | +netalertx-test-mount-db_ramdisk | Review your settings in the UI or edit the file directly before trusting +netalertx-test-mount-db_ramdisk | this instance in production. +netalertx-test-mount-db_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-db_ramdisk | --> first run db.sh +netalertx-test-mount-db_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-db_ramdisk | 🆕 First run detected — building initial database at: /data/db/app.db +netalertx-test-mount-db_ramdisk | +netalertx-test-mount-db_ramdisk | Do not interrupt this step. When complete, consider backing up the fresh +netalertx-test-mount-db_ramdisk | DB before onboarding sensitive or critical networks. +netalertx-test-mount-db_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-db_ramdisk | --> mandatory folders.sh netalertx-test-mount-db_ramdisk | * Creating Plugins log. netalertx-test-mount-db_ramdisk | * Creating System services run log. netalertx-test-mount-db_ramdisk | * Creating System services run tmp. netalertx-test-mount-db_ramdisk | * Creating DB locked log. netalertx-test-mount-db_ramdisk | * Creating Execution queue log. +netalertx-test-mount-db_ramdisk | --> apply conf override.sh +netalertx-test-mount-db_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-db_ramdisk | 📝 APP_CONF_OVERRIDE detected. Configuration written to /data/config/app_conf_override.json. +netalertx-test-mount-db_ramdisk | +netalertx-test-mount-db_ramdisk | Make sure the JSON content is correct before starting the application. +netalertx-test-mount-db_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-db_ramdisk | --> writable config.sh netalertx-test-mount-db_ramdisk | --> nginx config.sh netalertx-test-mount-db_ramdisk | --> user netalertx.sh @@ -992,14 +1739,32 @@ netalertx-test-mount-db_ramdisk | --> appliance integrity.sh netalertx-test-mount-db_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-db_ramdisk | ⚠️ Warning: Container is running as read-write, not in read-only mode. netalertx-test-mount-db_ramdisk | -netalertx-test-mount-db_ramdisk | Please mount the root filesystem as --read-only or use read-only: true +netalertx-test-mount-db_ramdisk | Please mount the root filesystem as --read-only or use read_only: true netalertx-test-mount-db_ramdisk | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/read-only-filesystem.md netalertx-test-mount-db_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-db_ramdisk | --> ports available.sh -netalertx-test-mount-db_ramdisk | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & netalertx-test-mount-db_ramdisk | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & +netalertx-test-mount-db_ramdisk | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & netalertx-test-mount-db_ramdisk | Starting python3 -m server > /tmp/log/stdout.log 2> >(tee /tmp/log/stderr.log >&2) netalertx-test-mount-db_ramdisk | 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;" & +netalertx-test-mount-db_ramdisk | Traceback (most recent call last): +netalertx-test-mount-db_ramdisk | File "", line 198, in _run_module_as_main +netalertx-test-mount-db_ramdisk | File "", line 88, in _run_code +netalertx-test-mount-db_ramdisk | File "/app/server/__main__.py", line 260, in +netalertx-test-mount-db_ramdisk | sys.exit(main()) +netalertx-test-mount-db_ramdisk | ^^^^^^ +netalertx-test-mount-db_ramdisk | File "/app/server/__main__.py", line 104, in main +netalertx-test-mount-db_ramdisk | pm, all_plugins, imported = importConfigs(pm, db, all_plugins) +netalertx-test-mount-db_ramdisk | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-db_ramdisk | File "/app/server/initialise.py", line 586, in importConfigs +netalertx-test-mount-db_ramdisk | for setting_name, value in settings_override.items(): +netalertx-test-mount-db_ramdisk | ^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-db_ramdisk | AttributeError: 'int' object has no attribute 'items' +netalertx-test-mount-db_ramdisk | Successfully updated IEEE OUI database (112333 entries) +Gracefully stopping... (press Ctrl+C again to force) + Container netalertx-test-mount-db_ramdisk Stopping + Container netalertx-test-mount-db_ramdisk Stopped + File: docker-compose.mount-test.db_unwritable.yml ---------------------------------------- Expected outcome: Container fails to start due to unwritable database partition @@ -1011,6 +1776,12 @@ Testing: docker-compose.mount-test.db_unwritable.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_test_netalertx_db" Creating + Volume "mount-tests_test_netalertx_db" Created + Volume "mount-tests_netalertx_config" Creating + Volume "mount-tests_netalertx_config" Created + Container netalertx-test-mount-db_unwritable Creating + Container netalertx-test-mount-db_unwritable Created Attaching to netalertx-test-mount-db_unwritable netalertx-test-mount-db_unwritable |  netalertx-test-mount-db_unwritable | _ _ _ ___ _ _ __ __ @@ -1019,7 +1790,6 @@ netalertx-test-mount-db_unwritable | | \| | ___| |_/ /_\ \ | ___ _ __| |_ \ V netalertx-test-mount-db_unwritable | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-db_unwritable | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-db_unwritable | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-db_unwritable | netalertx-test-mount-db_unwritable |  Network intruder and presence detector. netalertx-test-mount-db_unwritable | https://netalertx.com netalertx-test-mount-db_unwritable | @@ -1028,15 +1798,36 @@ netalertx-test-mount-db_unwritable | Startup pre-checks netalertx-test-mount-db_unwritable | --> storage permission.sh netalertx-test-mount-db_unwritable | --> data migration.sh netalertx-test-mount-db_unwritable | --> mounts.py -netalertx-test-mount-db_unwritable | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-db_unwritable | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-db_unwritable | /data | ✅ | ❌ | ➖ | ➖ | ❌ -netalertx-test-mount-db_unwritable | /data/db | ❌ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-db_unwritable | /data/config | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-db_unwritable | /tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-db_unwritable | /tmp/log | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-db_unwritable | /tmp/run | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-db_unwritable | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-db_unwritable | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-db_unwritable | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-db_unwritable | /data | ✅| ✅| ❌ | ➖ | ➖ | ❌ +netalertx-test-mount-db_unwritable | /data/db | ✅| ❌| ✅ | ➖ | ➖ | ❌ +netalertx-test-mount-db_unwritable | /data/config | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-db_unwritable | /tmp/api | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-db_unwritable | /tmp/log | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-db_unwritable | /tmp/run | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-db_unwritable | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-db_unwritable | +netalertx-test-mount-db_unwritable | +netalertx-test-mount-db_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-db_unwritable | ⚠️ ATTENTION: Configuration issues detected (marked with ❌). +netalertx-test-mount-db_unwritable | +netalertx-test-mount-db_unwritable | * /data not mounted, risk of dataloss +netalertx-test-mount-db_unwritable | * /data/db error writing, risk of dataloss +netalertx-test-mount-db_unwritable | +netalertx-test-mount-db_unwritable | We recommend starting with the default docker-compose.yml as the +netalertx-test-mount-db_unwritable | configuration can be quite complex. +netalertx-test-mount-db_unwritable | +netalertx-test-mount-db_unwritable | Review the documentation for a correct setup: +netalertx-test-mount-db_unwritable | https://github.com/jokob-sk/NetAlertX/blob/main/docs/DOCKER_COMPOSE.md +netalertx-test-mount-db_unwritable | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/mount-configuration-issues.md +netalertx-test-mount-db_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-db_unwritable |  +netalertx-test-mount-db_unwritable | \033[1;31m══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-db_unwritable | ❌ NetAlertX startup aborted: critical failure in mounts.py. +netalertx-test-mount-db_unwritable | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/troubleshooting.md +netalertx-test-mount-db_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-db_unwritable | \033[0m netalertx-test-mount-db_unwritable exited with code 1 File: docker-compose.mount-test.log_mounted.yml ---------------------------------------- @@ -1049,6 +1840,14 @@ Testing: docker-compose.mount-test.log_mounted.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_netalertx_db" Creating + Volume "mount-tests_netalertx_db" Created + Volume "mount-tests_netalertx_config" Creating + Volume "mount-tests_netalertx_config" Created + Volume "mount-tests_test_netalertx_log" Creating + Volume "mount-tests_test_netalertx_log" Created + Container netalertx-test-mount-log_mounted Creating + Container netalertx-test-mount-log_mounted Created Attaching to netalertx-test-mount-log_mounted netalertx-test-mount-log_mounted |  netalertx-test-mount-log_mounted | _ _ _ ___ _ _ __ __ @@ -1057,7 +1856,6 @@ netalertx-test-mount-log_mounted | | \| | ___| |_/ /_\ \ | ___ _ __| |_ \ V / netalertx-test-mount-log_mounted | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-log_mounted | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-log_mounted | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-log_mounted | netalertx-test-mount-log_mounted |  Network intruder and presence detector. netalertx-test-mount-log_mounted | https://netalertx.com netalertx-test-mount-log_mounted | @@ -1066,20 +1864,53 @@ netalertx-test-mount-log_mounted | Startup pre-checks netalertx-test-mount-log_mounted | --> storage permission.sh netalertx-test-mount-log_mounted | --> data migration.sh netalertx-test-mount-log_mounted | --> mounts.py -netalertx-test-mount-log_mounted | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-log_mounted | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-log_mounted | /data/db | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-log_mounted | /data/config | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-log_mounted | /tmp/run/tmp | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-log_mounted | /tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-log_mounted | /tmp/log | ✅ | ✅ | ❌ | ❌ | ✅ -netalertx-test-mount-log_mounted | /tmp/run | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-log_mounted | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-log_mounted | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-log_mounted | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-log_mounted | /data/db | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-log_mounted | /data/config | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-log_mounted | /tmp/run/tmp | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-log_mounted | /tmp/api | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-log_mounted | /tmp/log | ✅| ✅| ✅ | ❌ | ❌ | ✅ +netalertx-test-mount-log_mounted | /tmp/run | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-log_mounted | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-log_mounted | +netalertx-test-mount-log_mounted | +netalertx-test-mount-log_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-log_mounted | ⚠️ ATTENTION: Configuration issues detected (marked with ❌). +netalertx-test-mount-log_mounted | +netalertx-test-mount-log_mounted | * /tmp/log performance issue +netalertx-test-mount-log_mounted | +netalertx-test-mount-log_mounted | We recommend starting with the default docker-compose.yml as the +netalertx-test-mount-log_mounted | configuration can be quite complex. +netalertx-test-mount-log_mounted | +netalertx-test-mount-log_mounted | Review the documentation for a correct setup: +netalertx-test-mount-log_mounted | https://github.com/jokob-sk/NetAlertX/blob/main/docs/DOCKER_COMPOSE.md +netalertx-test-mount-log_mounted | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/mount-configuration-issues.md +netalertx-test-mount-log_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-log_mounted |  netalertx-test-mount-log_mounted | --> first run config.sh +netalertx-test-mount-log_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-log_mounted | 🆕 First run detected. Default configuration written to /data/config/app.conf. +netalertx-test-mount-log_mounted | +netalertx-test-mount-log_mounted | Review your settings in the UI or edit the file directly before trusting +netalertx-test-mount-log_mounted | this instance in production. +netalertx-test-mount-log_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-log_mounted | --> first run db.sh +netalertx-test-mount-log_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-log_mounted | 🆕 First run detected — building initial database at: /data/db/app.db +netalertx-test-mount-log_mounted | +netalertx-test-mount-log_mounted | Do not interrupt this step. When complete, consider backing up the fresh +netalertx-test-mount-log_mounted | DB before onboarding sensitive or critical networks. +netalertx-test-mount-log_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-log_mounted | --> mandatory folders.sh netalertx-test-mount-log_mounted | * Creating System services run log. netalertx-test-mount-log_mounted | * Creating System services run tmp. +netalertx-test-mount-log_mounted | --> apply conf override.sh +netalertx-test-mount-log_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-log_mounted | 📝 APP_CONF_OVERRIDE detected. Configuration written to /data/config/app_conf_override.json. +netalertx-test-mount-log_mounted | +netalertx-test-mount-log_mounted | Make sure the JSON content is correct before starting the application. +netalertx-test-mount-log_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-log_mounted | --> writable config.sh netalertx-test-mount-log_mounted | --> nginx config.sh netalertx-test-mount-log_mounted | --> user netalertx.sh @@ -1090,14 +1921,32 @@ netalertx-test-mount-log_mounted | --> appliance integrity.sh netalertx-test-mount-log_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-log_mounted | ⚠️ Warning: Container is running as read-write, not in read-only mode. netalertx-test-mount-log_mounted | -netalertx-test-mount-log_mounted | Please mount the root filesystem as --read-only or use read-only: true +netalertx-test-mount-log_mounted | Please mount the root filesystem as --read-only or use read_only: true netalertx-test-mount-log_mounted | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/read-only-filesystem.md netalertx-test-mount-log_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-log_mounted | --> ports available.sh -netalertx-test-mount-log_mounted | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & netalertx-test-mount-log_mounted | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & +netalertx-test-mount-log_mounted | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & netalertx-test-mount-log_mounted | Starting python3 -m server > /tmp/log/stdout.log 2> >(tee /tmp/log/stderr.log >&2) netalertx-test-mount-log_mounted | 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;" & +netalertx-test-mount-log_mounted | Traceback (most recent call last): +netalertx-test-mount-log_mounted | File "", line 198, in _run_module_as_main +netalertx-test-mount-log_mounted | File "", line 88, in _run_code +netalertx-test-mount-log_mounted | File "/app/server/__main__.py", line 260, in +netalertx-test-mount-log_mounted | sys.exit(main()) +netalertx-test-mount-log_mounted | ^^^^^^ +netalertx-test-mount-log_mounted | File "/app/server/__main__.py", line 104, in main +netalertx-test-mount-log_mounted | pm, all_plugins, imported = importConfigs(pm, db, all_plugins) +netalertx-test-mount-log_mounted | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-log_mounted | File "/app/server/initialise.py", line 586, in importConfigs +netalertx-test-mount-log_mounted | for setting_name, value in settings_override.items(): +netalertx-test-mount-log_mounted | ^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-log_mounted | AttributeError: 'int' object has no attribute 'items' +netalertx-test-mount-log_mounted | Successfully updated IEEE OUI database (112333 entries) +Gracefully stopping... (press Ctrl+C again to force) + Container netalertx-test-mount-log_mounted Stopping + Container netalertx-test-mount-log_mounted Stopped + File: docker-compose.mount-test.log_no-mount.yml ---------------------------------------- Expected outcome: Container shows mount error warning but continues running @@ -1109,6 +1958,12 @@ Testing: docker-compose.mount-test.log_no-mount.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_netalertx_config" Creating + Volume "mount-tests_netalertx_config" Created + Volume "mount-tests_netalertx_db" Creating + Volume "mount-tests_netalertx_db" Created + Container netalertx-test-mount-log_no-mount Creating + Container netalertx-test-mount-log_no-mount Created Attaching to netalertx-test-mount-log_no-mount netalertx-test-mount-log_no-mount |  netalertx-test-mount-log_no-mount | _ _ _ ___ _ _ __ __ @@ -1117,7 +1972,6 @@ netalertx-test-mount-log_no-mount | | \| | ___| |_/ /_\ \ | ___ _ __| |_ \ V / netalertx-test-mount-log_no-mount | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-log_no-mount | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-log_no-mount | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-log_no-mount | netalertx-test-mount-log_no-mount |  Network intruder and presence detector. netalertx-test-mount-log_no-mount | https://netalertx.com netalertx-test-mount-log_no-mount | @@ -1126,20 +1980,53 @@ netalertx-test-mount-log_no-mount | Startup pre-checks netalertx-test-mount-log_no-mount | --> storage permission.sh netalertx-test-mount-log_no-mount | --> data migration.sh netalertx-test-mount-log_no-mount | --> mounts.py -netalertx-test-mount-log_no-mount | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-log_no-mount | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-log_no-mount | /data/db | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-log_no-mount | /data/config | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-log_no-mount | /tmp/run/tmp | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-log_no-mount | /tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-log_no-mount | /tmp/log | ✅ | ❌ | ❌ | ❌ | ✅ -netalertx-test-mount-log_no-mount | /tmp/run | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-log_no-mount | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-log_no-mount | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-log_no-mount | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-log_no-mount | /data/db | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-log_no-mount | /data/config | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-log_no-mount | /tmp/run/tmp | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-log_no-mount | /tmp/api | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-log_no-mount | /tmp/log | ✅| ✅| ❌ | ❌ | ❌ | ✅ +netalertx-test-mount-log_no-mount | /tmp/run | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-log_no-mount | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-log_no-mount | +netalertx-test-mount-log_no-mount | +netalertx-test-mount-log_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-log_no-mount | ⚠️ ATTENTION: Configuration issues detected (marked with ❌). +netalertx-test-mount-log_no-mount | +netalertx-test-mount-log_no-mount | * /tmp/log not mounted, performance issue +netalertx-test-mount-log_no-mount | +netalertx-test-mount-log_no-mount | We recommend starting with the default docker-compose.yml as the +netalertx-test-mount-log_no-mount | configuration can be quite complex. +netalertx-test-mount-log_no-mount | +netalertx-test-mount-log_no-mount | Review the documentation for a correct setup: +netalertx-test-mount-log_no-mount | https://github.com/jokob-sk/NetAlertX/blob/main/docs/DOCKER_COMPOSE.md +netalertx-test-mount-log_no-mount | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/mount-configuration-issues.md +netalertx-test-mount-log_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-log_no-mount |  netalertx-test-mount-log_no-mount | --> first run config.sh +netalertx-test-mount-log_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-log_no-mount | 🆕 First run detected. Default configuration written to /data/config/app.conf. +netalertx-test-mount-log_no-mount | +netalertx-test-mount-log_no-mount | Review your settings in the UI or edit the file directly before trusting +netalertx-test-mount-log_no-mount | this instance in production. +netalertx-test-mount-log_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-log_no-mount | --> first run db.sh +netalertx-test-mount-log_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-log_no-mount | 🆕 First run detected — building initial database at: /data/db/app.db +netalertx-test-mount-log_no-mount | +netalertx-test-mount-log_no-mount | Do not interrupt this step. When complete, consider backing up the fresh +netalertx-test-mount-log_no-mount | DB before onboarding sensitive or critical networks. +netalertx-test-mount-log_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-log_no-mount | --> mandatory folders.sh netalertx-test-mount-log_no-mount | * Creating System services run log. netalertx-test-mount-log_no-mount | * Creating System services run tmp. +netalertx-test-mount-log_no-mount | --> apply conf override.sh +netalertx-test-mount-log_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-log_no-mount | 📝 APP_CONF_OVERRIDE detected. Configuration written to /data/config/app_conf_override.json. +netalertx-test-mount-log_no-mount | +netalertx-test-mount-log_no-mount | Make sure the JSON content is correct before starting the application. +netalertx-test-mount-log_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-log_no-mount | --> writable config.sh netalertx-test-mount-log_no-mount | --> nginx config.sh netalertx-test-mount-log_no-mount | --> user netalertx.sh @@ -1150,14 +2037,32 @@ netalertx-test-mount-log_no-mount | --> appliance integrity.sh netalertx-test-mount-log_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-log_no-mount | ⚠️ Warning: Container is running as read-write, not in read-only mode. netalertx-test-mount-log_no-mount | -netalertx-test-mount-log_no-mount | Please mount the root filesystem as --read-only or use read-only: true +netalertx-test-mount-log_no-mount | Please mount the root filesystem as --read-only or use read_only: true netalertx-test-mount-log_no-mount | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/read-only-filesystem.md netalertx-test-mount-log_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-log_no-mount | --> ports available.sh -netalertx-test-mount-log_no-mount | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & netalertx-test-mount-log_no-mount | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & +netalertx-test-mount-log_no-mount | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & netalertx-test-mount-log_no-mount | Starting python3 -m server > /tmp/log/stdout.log 2> >(tee /tmp/log/stderr.log >&2) netalertx-test-mount-log_no-mount | 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;" & +netalertx-test-mount-log_no-mount | Traceback (most recent call last): +netalertx-test-mount-log_no-mount | File "", line 198, in _run_module_as_main +netalertx-test-mount-log_no-mount | File "", line 88, in _run_code +netalertx-test-mount-log_no-mount | File "/app/server/__main__.py", line 260, in +netalertx-test-mount-log_no-mount | sys.exit(main()) +netalertx-test-mount-log_no-mount | ^^^^^^ +netalertx-test-mount-log_no-mount | File "/app/server/__main__.py", line 104, in main +netalertx-test-mount-log_no-mount | pm, all_plugins, imported = importConfigs(pm, db, all_plugins) +netalertx-test-mount-log_no-mount | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-log_no-mount | File "/app/server/initialise.py", line 586, in importConfigs +netalertx-test-mount-log_no-mount | for setting_name, value in settings_override.items(): +netalertx-test-mount-log_no-mount | ^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-log_no-mount | AttributeError: 'int' object has no attribute 'items' +netalertx-test-mount-log_no-mount | Successfully updated IEEE OUI database (112333 entries) +Gracefully stopping... (press Ctrl+C again to force) + Container netalertx-test-mount-log_no-mount Stopping + Container netalertx-test-mount-log_no-mount Stopped + File: docker-compose.mount-test.log_ramdisk.yml ---------------------------------------- Expected outcome: Container shows dataloss risk warning for logs on RAM disk @@ -1169,6 +2074,10 @@ Testing: docker-compose.mount-test.log_ramdisk.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_test_netalertx_data" Creating + Volume "mount-tests_test_netalertx_data" Created + Container netalertx-test-mount-log_ramdisk Creating + Container netalertx-test-mount-log_ramdisk Created Attaching to netalertx-test-mount-log_ramdisk netalertx-test-mount-log_ramdisk |  netalertx-test-mount-log_ramdisk | _ _ _ ___ _ _ __ __ @@ -1177,7 +2086,6 @@ netalertx-test-mount-log_ramdisk | | \| | ___| |_/ /_\ \ | ___ _ __| |_ \ V / netalertx-test-mount-log_ramdisk | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-log_ramdisk | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-log_ramdisk | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-log_ramdisk | netalertx-test-mount-log_ramdisk |  Network intruder and presence detector. netalertx-test-mount-log_ramdisk | https://netalertx.com netalertx-test-mount-log_ramdisk | @@ -1186,18 +2094,30 @@ netalertx-test-mount-log_ramdisk | Startup pre-checks netalertx-test-mount-log_ramdisk | --> storage permission.sh netalertx-test-mount-log_ramdisk | --> data migration.sh netalertx-test-mount-log_ramdisk | --> mounts.py -netalertx-test-mount-log_ramdisk | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-log_ramdisk | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-log_ramdisk | /data | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-log_ramdisk | /data/db | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-log_ramdisk | /data/config | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-log_ramdisk | /tmp/run/tmp | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-log_ramdisk | /tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-log_ramdisk | /tmp/log | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-log_ramdisk | /tmp/run | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-log_ramdisk | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-log_ramdisk | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-log_ramdisk | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-log_ramdisk | /data | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-log_ramdisk | /data/db | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-log_ramdisk | /data/config | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-log_ramdisk | /tmp/run/tmp | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-log_ramdisk | /tmp/api | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-log_ramdisk | /tmp/log | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-log_ramdisk | /tmp/run | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-log_ramdisk | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ netalertx-test-mount-log_ramdisk | --> first run config.sh +netalertx-test-mount-log_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-log_ramdisk | 🆕 First run detected. Default configuration written to /data/config/app.conf. +netalertx-test-mount-log_ramdisk | +netalertx-test-mount-log_ramdisk | Review your settings in the UI or edit the file directly before trusting +netalertx-test-mount-log_ramdisk | this instance in production. +netalertx-test-mount-log_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-log_ramdisk | --> first run db.sh +netalertx-test-mount-log_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-log_ramdisk | 🆕 First run detected — building initial database at: /data/db/app.db +netalertx-test-mount-log_ramdisk | +netalertx-test-mount-log_ramdisk | Do not interrupt this step. When complete, consider backing up the fresh +netalertx-test-mount-log_ramdisk | DB before onboarding sensitive or critical networks. +netalertx-test-mount-log_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-log_ramdisk | --> mandatory folders.sh netalertx-test-mount-log_ramdisk | * Creating NetAlertX log directory. netalertx-test-mount-log_ramdisk | * Creating NetAlertX API cache. @@ -1208,6 +2128,12 @@ netalertx-test-mount-log_ramdisk | * Creating System services run log. netalertx-test-mount-log_ramdisk | * Creating System services run tmp. netalertx-test-mount-log_ramdisk | * Creating DB locked log. netalertx-test-mount-log_ramdisk | * Creating Execution queue log. +netalertx-test-mount-log_ramdisk | --> apply conf override.sh +netalertx-test-mount-log_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-log_ramdisk | 📝 APP_CONF_OVERRIDE detected. Configuration written to /data/config/app_conf_override.json. +netalertx-test-mount-log_ramdisk | +netalertx-test-mount-log_ramdisk | Make sure the JSON content is correct before starting the application. +netalertx-test-mount-log_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-log_ramdisk | --> writable config.sh netalertx-test-mount-log_ramdisk | --> nginx config.sh netalertx-test-mount-log_ramdisk | --> user netalertx.sh @@ -1218,14 +2144,32 @@ netalertx-test-mount-log_ramdisk | --> appliance integrity.sh netalertx-test-mount-log_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-log_ramdisk | ⚠️ Warning: Container is running as read-write, not in read-only mode. netalertx-test-mount-log_ramdisk | -netalertx-test-mount-log_ramdisk | Please mount the root filesystem as --read-only or use read-only: true +netalertx-test-mount-log_ramdisk | Please mount the root filesystem as --read-only or use read_only: true netalertx-test-mount-log_ramdisk | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/read-only-filesystem.md netalertx-test-mount-log_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-log_ramdisk | --> ports available.sh +netalertx-test-mount-log_ramdisk | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & netalertx-test-mount-log_ramdisk | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & netalertx-test-mount-log_ramdisk | Starting python3 -m server > /tmp/log/stdout.log 2> >(tee /tmp/log/stderr.log >&2) -netalertx-test-mount-log_ramdisk | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & netalertx-test-mount-log_ramdisk | 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;" & +netalertx-test-mount-log_ramdisk | Traceback (most recent call last): +netalertx-test-mount-log_ramdisk | File "", line 198, in _run_module_as_main +netalertx-test-mount-log_ramdisk | File "", line 88, in _run_code +netalertx-test-mount-log_ramdisk | File "/app/server/__main__.py", line 260, in +netalertx-test-mount-log_ramdisk | sys.exit(main()) +netalertx-test-mount-log_ramdisk | ^^^^^^ +netalertx-test-mount-log_ramdisk | File "/app/server/__main__.py", line 104, in main +netalertx-test-mount-log_ramdisk | pm, all_plugins, imported = importConfigs(pm, db, all_plugins) +netalertx-test-mount-log_ramdisk | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-log_ramdisk | File "/app/server/initialise.py", line 586, in importConfigs +netalertx-test-mount-log_ramdisk | for setting_name, value in settings_override.items(): +netalertx-test-mount-log_ramdisk | ^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-log_ramdisk | AttributeError: 'int' object has no attribute 'items' +netalertx-test-mount-log_ramdisk | Successfully updated IEEE OUI database (112333 entries) +Gracefully stopping... (press Ctrl+C again to force) + Container netalertx-test-mount-log_ramdisk Stopping + Container netalertx-test-mount-log_ramdisk Stopped + File: docker-compose.mount-test.log_unwritable.yml ---------------------------------------- Expected outcome: Container fails to start due to unwritable log partition @@ -1237,6 +2181,14 @@ Testing: docker-compose.mount-test.log_unwritable.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_test_netalertx_log" Creating + Volume "mount-tests_test_netalertx_log" Created + Volume "mount-tests_netalertx_db" Creating + Volume "mount-tests_netalertx_db" Created + Volume "mount-tests_netalertx_config" Creating + Volume "mount-tests_netalertx_config" Created + Container netalertx-test-mount-log_unwritable Creating + Container netalertx-test-mount-log_unwritable Created Attaching to netalertx-test-mount-log_unwritable netalertx-test-mount-log_unwritable |  netalertx-test-mount-log_unwritable | _ _ _ ___ _ _ __ __ @@ -1245,7 +2197,6 @@ netalertx-test-mount-log_unwritable | | \| | ___| |_/ /_\ \ | ___ _ __| |_ \ V netalertx-test-mount-log_unwritable | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-log_unwritable | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-log_unwritable | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-log_unwritable | netalertx-test-mount-log_unwritable |  Network intruder and presence detector. netalertx-test-mount-log_unwritable | https://netalertx.com netalertx-test-mount-log_unwritable | @@ -1254,15 +2205,35 @@ netalertx-test-mount-log_unwritable | Startup pre-checks netalertx-test-mount-log_unwritable | --> storage permission.sh netalertx-test-mount-log_unwritable | --> data migration.sh netalertx-test-mount-log_unwritable | --> mounts.py -netalertx-test-mount-log_unwritable | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-log_unwritable | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-log_unwritable | /data/db | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-log_unwritable | /data/config | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-log_unwritable | /tmp/run/tmp | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-log_unwritable | /tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-log_unwritable | /tmp/log | ❌ | ✅ | ❌ | ❌ | ✅ -netalertx-test-mount-log_unwritable | /tmp/run | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-log_unwritable | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-log_unwritable | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-log_unwritable | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-log_unwritable | /data/db | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-log_unwritable | /data/config | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-log_unwritable | /tmp/run/tmp | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-log_unwritable | /tmp/api | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-log_unwritable | /tmp/log | ✅| ❌| ✅ | ❌ | ❌ | ✅ +netalertx-test-mount-log_unwritable | /tmp/run | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-log_unwritable | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-log_unwritable | +netalertx-test-mount-log_unwritable | +netalertx-test-mount-log_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-log_unwritable | ⚠️ ATTENTION: Configuration issues detected (marked with ❌). +netalertx-test-mount-log_unwritable | +netalertx-test-mount-log_unwritable | * /tmp/log error writing, performance issue +netalertx-test-mount-log_unwritable | +netalertx-test-mount-log_unwritable | We recommend starting with the default docker-compose.yml as the +netalertx-test-mount-log_unwritable | configuration can be quite complex. +netalertx-test-mount-log_unwritable | +netalertx-test-mount-log_unwritable | Review the documentation for a correct setup: +netalertx-test-mount-log_unwritable | https://github.com/jokob-sk/NetAlertX/blob/main/docs/DOCKER_COMPOSE.md +netalertx-test-mount-log_unwritable | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/mount-configuration-issues.md +netalertx-test-mount-log_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-log_unwritable |  +netalertx-test-mount-log_unwritable | \033[1;31m══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-log_unwritable | ❌ NetAlertX startup aborted: critical failure in mounts.py. +netalertx-test-mount-log_unwritable | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/troubleshooting.md +netalertx-test-mount-log_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-log_unwritable | \033[0m netalertx-test-mount-log_unwritable exited with code 1 File: docker-compose.mount-test.run_mounted.yml ---------------------------------------- @@ -1275,6 +2246,14 @@ Testing: docker-compose.mount-test.run_mounted.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_netalertx_db" Creating + Volume "mount-tests_netalertx_db" Created + Volume "mount-tests_netalertx_config" Creating + Volume "mount-tests_netalertx_config" Created + Volume "mount-tests_test_system_services_run" Creating + Volume "mount-tests_test_system_services_run" Created + Container netalertx-test-mount-run_mounted Creating + Container netalertx-test-mount-run_mounted Created Attaching to netalertx-test-mount-run_mounted netalertx-test-mount-run_mounted |  netalertx-test-mount-run_mounted | _ _ _ ___ _ _ __ __ @@ -1283,7 +2262,6 @@ netalertx-test-mount-run_mounted | | \| | ___| |_/ /_\ \ | ___ _ __| |_ \ V / netalertx-test-mount-run_mounted | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-run_mounted | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-run_mounted | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-run_mounted | netalertx-test-mount-run_mounted |  Network intruder and presence detector. netalertx-test-mount-run_mounted | https://netalertx.com netalertx-test-mount-run_mounted | @@ -1292,21 +2270,55 @@ netalertx-test-mount-run_mounted | Startup pre-checks netalertx-test-mount-run_mounted | --> storage permission.sh netalertx-test-mount-run_mounted | --> data migration.sh netalertx-test-mount-run_mounted | --> mounts.py -netalertx-test-mount-run_mounted | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-run_mounted | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-run_mounted | /data/db | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-run_mounted | /data/config | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-run_mounted | /tmp/run/tmp | ✅ | ✅ | ❌ | ❌ | ✅ -netalertx-test-mount-run_mounted | /tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-run_mounted | /tmp/log | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-run_mounted | /tmp/run | ✅ | ✅ | ❌ | ❌ | ✅ -netalertx-test-mount-run_mounted | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-run_mounted | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-run_mounted | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-run_mounted | /data/db | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-run_mounted | /data/config | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-run_mounted | /tmp/run/tmp | ✅| ✅| ✅ | ❌ | ❌ | ✅ +netalertx-test-mount-run_mounted | /tmp/api | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-run_mounted | /tmp/log | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-run_mounted | /tmp/run | ✅| ✅| ✅ | ❌ | ❌ | ✅ +netalertx-test-mount-run_mounted | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-run_mounted | +netalertx-test-mount-run_mounted | +netalertx-test-mount-run_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-run_mounted | ⚠️ ATTENTION: Configuration issues detected (marked with ❌). +netalertx-test-mount-run_mounted | +netalertx-test-mount-run_mounted | * /tmp/run/tmp performance issue +netalertx-test-mount-run_mounted | * /tmp/run performance issue +netalertx-test-mount-run_mounted | +netalertx-test-mount-run_mounted | We recommend starting with the default docker-compose.yml as the +netalertx-test-mount-run_mounted | configuration can be quite complex. +netalertx-test-mount-run_mounted | +netalertx-test-mount-run_mounted | Review the documentation for a correct setup: +netalertx-test-mount-run_mounted | https://github.com/jokob-sk/NetAlertX/blob/main/docs/DOCKER_COMPOSE.md +netalertx-test-mount-run_mounted | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/mount-configuration-issues.md +netalertx-test-mount-run_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-run_mounted |  netalertx-test-mount-run_mounted | --> first run config.sh +netalertx-test-mount-run_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-run_mounted | 🆕 First run detected. Default configuration written to /data/config/app.conf. +netalertx-test-mount-run_mounted | +netalertx-test-mount-run_mounted | Review your settings in the UI or edit the file directly before trusting +netalertx-test-mount-run_mounted | this instance in production. +netalertx-test-mount-run_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-run_mounted | --> first run db.sh +netalertx-test-mount-run_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-run_mounted | 🆕 First run detected — building initial database at: /data/db/app.db +netalertx-test-mount-run_mounted | +netalertx-test-mount-run_mounted | Do not interrupt this step. When complete, consider backing up the fresh +netalertx-test-mount-run_mounted | DB before onboarding sensitive or critical networks. +netalertx-test-mount-run_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-run_mounted | --> mandatory folders.sh netalertx-test-mount-run_mounted | * Creating Plugins log. netalertx-test-mount-run_mounted | * Creating DB locked log. netalertx-test-mount-run_mounted | * Creating Execution queue log. +netalertx-test-mount-run_mounted | --> apply conf override.sh +netalertx-test-mount-run_mounted | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-run_mounted | 📝 APP_CONF_OVERRIDE detected. Configuration written to /data/config/app_conf_override.json. +netalertx-test-mount-run_mounted | +netalertx-test-mount-run_mounted | Make sure the JSON content is correct before starting the application. +netalertx-test-mount-run_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-run_mounted | --> writable config.sh netalertx-test-mount-run_mounted | --> nginx config.sh netalertx-test-mount-run_mounted | --> user netalertx.sh @@ -1317,14 +2329,32 @@ netalertx-test-mount-run_mounted | --> appliance integrity.sh netalertx-test-mount-run_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-run_mounted | ⚠️ Warning: Container is running as read-write, not in read-only mode. netalertx-test-mount-run_mounted | -netalertx-test-mount-run_mounted | Please mount the root filesystem as --read-only or use read-only: true +netalertx-test-mount-run_mounted | Please mount the root filesystem as --read-only or use read_only: true netalertx-test-mount-run_mounted | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/read-only-filesystem.md netalertx-test-mount-run_mounted | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-run_mounted | --> ports available.sh -netalertx-test-mount-run_mounted | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & netalertx-test-mount-run_mounted | Starting supercronic --quiet "/services/config/cron/crontab" >>"/tmp/log/cron.log" 2>&1 & +netalertx-test-mount-run_mounted | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & netalertx-test-mount-run_mounted | Starting python3 -m server > /tmp/log/stdout.log 2> >(tee /tmp/log/stderr.log >&2) netalertx-test-mount-run_mounted | 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;" & +netalertx-test-mount-run_mounted | Traceback (most recent call last): +netalertx-test-mount-run_mounted | File "", line 198, in _run_module_as_main +netalertx-test-mount-run_mounted | File "", line 88, in _run_code +netalertx-test-mount-run_mounted | File "/app/server/__main__.py", line 260, in +netalertx-test-mount-run_mounted | sys.exit(main()) +netalertx-test-mount-run_mounted | ^^^^^^ +netalertx-test-mount-run_mounted | File "/app/server/__main__.py", line 104, in main +netalertx-test-mount-run_mounted | pm, all_plugins, imported = importConfigs(pm, db, all_plugins) +netalertx-test-mount-run_mounted | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-run_mounted | File "/app/server/initialise.py", line 586, in importConfigs +netalertx-test-mount-run_mounted | for setting_name, value in settings_override.items(): +netalertx-test-mount-run_mounted | ^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-run_mounted | AttributeError: 'int' object has no attribute 'items' +netalertx-test-mount-run_mounted | Successfully updated IEEE OUI database (112333 entries) +Gracefully stopping... (press Ctrl+C again to force) + Container netalertx-test-mount-run_mounted Stopping + Container netalertx-test-mount-run_mounted Stopped + File: docker-compose.mount-test.run_no-mount.yml ---------------------------------------- Expected outcome: Container shows mount error warning but continues running @@ -1336,6 +2366,12 @@ Testing: docker-compose.mount-test.run_no-mount.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_netalertx_db" Creating + Volume "mount-tests_netalertx_db" Created + Volume "mount-tests_netalertx_config" Creating + Volume "mount-tests_netalertx_config" Created + Container netalertx-test-mount-run_no-mount Creating + Container netalertx-test-mount-run_no-mount Created Attaching to netalertx-test-mount-run_no-mount netalertx-test-mount-run_no-mount |  netalertx-test-mount-run_no-mount | _ _ _ ___ _ _ __ __ @@ -1344,7 +2380,6 @@ netalertx-test-mount-run_no-mount | | \| | ___| |_/ /_\ \ | ___ _ __| |_ \ V / netalertx-test-mount-run_no-mount | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-run_no-mount | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-run_no-mount | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-run_no-mount | netalertx-test-mount-run_no-mount |  Network intruder and presence detector. netalertx-test-mount-run_no-mount | https://netalertx.com netalertx-test-mount-run_no-mount | @@ -1353,21 +2388,55 @@ netalertx-test-mount-run_no-mount | Startup pre-checks netalertx-test-mount-run_no-mount | --> storage permission.sh netalertx-test-mount-run_no-mount | --> data migration.sh netalertx-test-mount-run_no-mount | --> mounts.py -netalertx-test-mount-run_no-mount | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-run_no-mount | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-run_no-mount | /data/db | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-run_no-mount | /data/config | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-run_no-mount | /tmp/run/tmp | ✅ | ❌ | ❌ | ❌ | ✅ -netalertx-test-mount-run_no-mount | /tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-run_no-mount | /tmp/log | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-run_no-mount | /tmp/run | ✅ | ❌ | ❌ | ❌ | ✅ -netalertx-test-mount-run_no-mount | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-run_no-mount | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-run_no-mount | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-run_no-mount | /data/db | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-run_no-mount | /data/config | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-run_no-mount | /tmp/run/tmp | ✅| ✅| ❌ | ❌ | ❌ | ✅ +netalertx-test-mount-run_no-mount | /tmp/api | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-run_no-mount | /tmp/log | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-run_no-mount | /tmp/run | ✅| ✅| ❌ | ❌ | ❌ | ✅ +netalertx-test-mount-run_no-mount | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-run_no-mount | +netalertx-test-mount-run_no-mount | +netalertx-test-mount-run_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-run_no-mount | ⚠️ ATTENTION: Configuration issues detected (marked with ❌). +netalertx-test-mount-run_no-mount | +netalertx-test-mount-run_no-mount | * /tmp/run/tmp not mounted, performance issue +netalertx-test-mount-run_no-mount | * /tmp/run not mounted, performance issue +netalertx-test-mount-run_no-mount | +netalertx-test-mount-run_no-mount | We recommend starting with the default docker-compose.yml as the +netalertx-test-mount-run_no-mount | configuration can be quite complex. +netalertx-test-mount-run_no-mount | +netalertx-test-mount-run_no-mount | Review the documentation for a correct setup: +netalertx-test-mount-run_no-mount | https://github.com/jokob-sk/NetAlertX/blob/main/docs/DOCKER_COMPOSE.md +netalertx-test-mount-run_no-mount | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/mount-configuration-issues.md +netalertx-test-mount-run_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-run_no-mount |  netalertx-test-mount-run_no-mount | --> first run config.sh +netalertx-test-mount-run_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-run_no-mount | 🆕 First run detected. Default configuration written to /data/config/app.conf. +netalertx-test-mount-run_no-mount | +netalertx-test-mount-run_no-mount | Review your settings in the UI or edit the file directly before trusting +netalertx-test-mount-run_no-mount | this instance in production. +netalertx-test-mount-run_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-run_no-mount | --> first run db.sh +netalertx-test-mount-run_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-run_no-mount | 🆕 First run detected — building initial database at: /data/db/app.db +netalertx-test-mount-run_no-mount | +netalertx-test-mount-run_no-mount | Do not interrupt this step. When complete, consider backing up the fresh +netalertx-test-mount-run_no-mount | DB before onboarding sensitive or critical networks. +netalertx-test-mount-run_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-run_no-mount | --> mandatory folders.sh netalertx-test-mount-run_no-mount | * Creating Plugins log. netalertx-test-mount-run_no-mount | * Creating DB locked log. netalertx-test-mount-run_no-mount | * Creating Execution queue log. +netalertx-test-mount-run_no-mount | --> apply conf override.sh +netalertx-test-mount-run_no-mount | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-run_no-mount | 📝 APP_CONF_OVERRIDE detected. Configuration written to /data/config/app_conf_override.json. +netalertx-test-mount-run_no-mount | +netalertx-test-mount-run_no-mount | Make sure the JSON content is correct before starting the application. +netalertx-test-mount-run_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-run_no-mount | --> writable config.sh netalertx-test-mount-run_no-mount | --> nginx config.sh netalertx-test-mount-run_no-mount | --> user netalertx.sh @@ -1378,7 +2447,7 @@ netalertx-test-mount-run_no-mount | --> appliance integrity.sh netalertx-test-mount-run_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-run_no-mount | ⚠️ Warning: Container is running as read-write, not in read-only mode. netalertx-test-mount-run_no-mount | -netalertx-test-mount-run_no-mount | Please mount the root filesystem as --read-only or use read-only: true +netalertx-test-mount-run_no-mount | Please mount the root filesystem as --read-only or use read_only: true netalertx-test-mount-run_no-mount | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/read-only-filesystem.md netalertx-test-mount-run_no-mount | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-run_no-mount | --> ports available.sh @@ -1386,6 +2455,24 @@ netalertx-test-mount-run_no-mount | Starting supercronic --quiet "/services/con netalertx-test-mount-run_no-mount | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & netalertx-test-mount-run_no-mount | Starting python3 -m server > /tmp/log/stdout.log 2> >(tee /tmp/log/stderr.log >&2) netalertx-test-mount-run_no-mount | 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;" & +netalertx-test-mount-run_no-mount | Traceback (most recent call last): +netalertx-test-mount-run_no-mount | File "", line 198, in _run_module_as_main +netalertx-test-mount-run_no-mount | File "", line 88, in _run_code +netalertx-test-mount-run_no-mount | File "/app/server/__main__.py", line 260, in +netalertx-test-mount-run_no-mount | sys.exit(main()) +netalertx-test-mount-run_no-mount | ^^^^^^ +netalertx-test-mount-run_no-mount | File "/app/server/__main__.py", line 104, in main +netalertx-test-mount-run_no-mount | pm, all_plugins, imported = importConfigs(pm, db, all_plugins) +netalertx-test-mount-run_no-mount | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-run_no-mount | File "/app/server/initialise.py", line 586, in importConfigs +netalertx-test-mount-run_no-mount | for setting_name, value in settings_override.items(): +netalertx-test-mount-run_no-mount | ^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-run_no-mount | AttributeError: 'int' object has no attribute 'items' +netalertx-test-mount-run_no-mount | Successfully updated IEEE OUI database (112333 entries) +Gracefully stopping... (press Ctrl+C again to force) + Container netalertx-test-mount-run_no-mount Stopping + Container netalertx-test-mount-run_no-mount Stopped + File: docker-compose.mount-test.run_ramdisk.yml ---------------------------------------- Expected outcome: Container shows dataloss risk warning for run on RAM disk @@ -1397,6 +2484,10 @@ Testing: docker-compose.mount-test.run_ramdisk.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_test_netalertx_data" Creating + Volume "mount-tests_test_netalertx_data" Created + Container netalertx-test-mount-run_ramdisk Creating + Container netalertx-test-mount-run_ramdisk Created Attaching to netalertx-test-mount-run_ramdisk netalertx-test-mount-run_ramdisk |  netalertx-test-mount-run_ramdisk | _ _ _ ___ _ _ __ __ @@ -1405,7 +2496,6 @@ netalertx-test-mount-run_ramdisk | | \| | ___| |_/ /_\ \ | ___ _ __| |_ \ V / netalertx-test-mount-run_ramdisk | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-run_ramdisk | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-run_ramdisk | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-run_ramdisk | netalertx-test-mount-run_ramdisk |  Network intruder and presence detector. netalertx-test-mount-run_ramdisk | https://netalertx.com netalertx-test-mount-run_ramdisk | @@ -1414,18 +2504,30 @@ netalertx-test-mount-run_ramdisk | Startup pre-checks netalertx-test-mount-run_ramdisk | --> storage permission.sh netalertx-test-mount-run_ramdisk | --> data migration.sh netalertx-test-mount-run_ramdisk | --> mounts.py -netalertx-test-mount-run_ramdisk | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-run_ramdisk | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-run_ramdisk | /data | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-run_ramdisk | /data/db | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-run_ramdisk | /data/config | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-run_ramdisk | /tmp/run/tmp | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-run_ramdisk | /tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-run_ramdisk | /tmp/log | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-run_ramdisk | /tmp/run | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-run_ramdisk | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-run_ramdisk | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-run_ramdisk | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-run_ramdisk | /data | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-run_ramdisk | /data/db | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-run_ramdisk | /data/config | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-run_ramdisk | /tmp/run/tmp | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-run_ramdisk | /tmp/api | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-run_ramdisk | /tmp/log | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-run_ramdisk | /tmp/run | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-run_ramdisk | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ netalertx-test-mount-run_ramdisk | --> first run config.sh +netalertx-test-mount-run_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-run_ramdisk | 🆕 First run detected. Default configuration written to /data/config/app.conf. +netalertx-test-mount-run_ramdisk | +netalertx-test-mount-run_ramdisk | Review your settings in the UI or edit the file directly before trusting +netalertx-test-mount-run_ramdisk | this instance in production. +netalertx-test-mount-run_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-run_ramdisk | --> first run db.sh +netalertx-test-mount-run_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-run_ramdisk | 🆕 First run detected — building initial database at: /data/db/app.db +netalertx-test-mount-run_ramdisk | +netalertx-test-mount-run_ramdisk | Do not interrupt this step. When complete, consider backing up the fresh +netalertx-test-mount-run_ramdisk | DB before onboarding sensitive or critical networks. +netalertx-test-mount-run_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-run_ramdisk | --> mandatory folders.sh netalertx-test-mount-run_ramdisk | * Creating NetAlertX log directory. netalertx-test-mount-run_ramdisk | * Creating NetAlertX API cache. @@ -1436,6 +2538,12 @@ netalertx-test-mount-run_ramdisk | * Creating System services run log. netalertx-test-mount-run_ramdisk | * Creating System services run tmp. netalertx-test-mount-run_ramdisk | * Creating DB locked log. netalertx-test-mount-run_ramdisk | * Creating Execution queue log. +netalertx-test-mount-run_ramdisk | --> apply conf override.sh +netalertx-test-mount-run_ramdisk | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-run_ramdisk | 📝 APP_CONF_OVERRIDE detected. Configuration written to /data/config/app_conf_override.json. +netalertx-test-mount-run_ramdisk | +netalertx-test-mount-run_ramdisk | Make sure the JSON content is correct before starting the application. +netalertx-test-mount-run_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-run_ramdisk | --> writable config.sh netalertx-test-mount-run_ramdisk | --> nginx config.sh netalertx-test-mount-run_ramdisk | --> user netalertx.sh @@ -1446,7 +2554,7 @@ netalertx-test-mount-run_ramdisk | --> appliance integrity.sh netalertx-test-mount-run_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-run_ramdisk | ⚠️ Warning: Container is running as read-write, not in read-only mode. netalertx-test-mount-run_ramdisk | -netalertx-test-mount-run_ramdisk | Please mount the root filesystem as --read-only or use read-only: true +netalertx-test-mount-run_ramdisk | Please mount the root filesystem as --read-only or use read_only: true netalertx-test-mount-run_ramdisk | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/read-only-filesystem.md netalertx-test-mount-run_ramdisk | ══════════════════════════════════════════════════════════════════════════════ netalertx-test-mount-run_ramdisk | --> ports available.sh @@ -1454,6 +2562,24 @@ netalertx-test-mount-run_ramdisk | Starting supercronic --quiet "/services/conf netalertx-test-mount-run_ramdisk | Starting /usr/sbin/php-fpm83 -y "/services/config/php/php-fpm.conf" -F >>"/tmp/log/app.php_errors.log" 2>/dev/stderr & netalertx-test-mount-run_ramdisk | Starting python3 -m server > /tmp/log/stdout.log 2> >(tee /tmp/log/stderr.log >&2) netalertx-test-mount-run_ramdisk | 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;" & +netalertx-test-mount-run_ramdisk | Traceback (most recent call last): +netalertx-test-mount-run_ramdisk | File "", line 198, in _run_module_as_main +netalertx-test-mount-run_ramdisk | File "", line 88, in _run_code +netalertx-test-mount-run_ramdisk | File "/app/server/__main__.py", line 260, in +netalertx-test-mount-run_ramdisk | sys.exit(main()) +netalertx-test-mount-run_ramdisk | ^^^^^^ +netalertx-test-mount-run_ramdisk | File "/app/server/__main__.py", line 104, in main +netalertx-test-mount-run_ramdisk | pm, all_plugins, imported = importConfigs(pm, db, all_plugins) +netalertx-test-mount-run_ramdisk | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-run_ramdisk | File "/app/server/initialise.py", line 586, in importConfigs +netalertx-test-mount-run_ramdisk | for setting_name, value in settings_override.items(): +netalertx-test-mount-run_ramdisk | ^^^^^^^^^^^^^^^^^^^^^^^ +netalertx-test-mount-run_ramdisk | AttributeError: 'int' object has no attribute 'items' +netalertx-test-mount-run_ramdisk | Successfully updated IEEE OUI database (112333 entries) +Gracefully stopping... (press Ctrl+C again to force) + Container netalertx-test-mount-run_ramdisk Stopping + Container netalertx-test-mount-run_ramdisk Stopped + File: docker-compose.mount-test.run_unwritable.yml ---------------------------------------- Expected outcome: Container fails to start due to unwritable run partition @@ -1465,6 +2591,14 @@ Testing: docker-compose.mount-test.run_unwritable.yml Directory: /workspaces/NetAlertX/test/docker_tests/configurations/mount-tests Running docker-compose up... + Volume "mount-tests_test_system_services_run" Creating + Volume "mount-tests_test_system_services_run" Created + Volume "mount-tests_netalertx_db" Creating + Volume "mount-tests_netalertx_db" Created + Volume "mount-tests_netalertx_config" Creating + Volume "mount-tests_netalertx_config" Created + Container netalertx-test-mount-run_unwritable Creating + Container netalertx-test-mount-run_unwritable Created Attaching to netalertx-test-mount-run_unwritable netalertx-test-mount-run_unwritable |  netalertx-test-mount-run_unwritable | _ _ _ ___ _ _ __ __ @@ -1473,7 +2607,6 @@ netalertx-test-mount-run_unwritable | | \| | ___| |_/ /_\ \ | ___ _ __| |_ \ V netalertx-test-mount-run_unwritable | | . |/ _ \ __| _ | |/ _ \ __| __|/ \ netalertx-test-mount-run_unwritable | | |\ | __/ |_| | | | | __/ | | |_/ /^\ \ netalertx-test-mount-run_unwritable | \_| \_/\___|\__\_| |_/_|\___|_| \__\/ \/ -netalertx-test-mount-run_unwritable | netalertx-test-mount-run_unwritable |  Network intruder and presence detector. netalertx-test-mount-run_unwritable | https://netalertx.com netalertx-test-mount-run_unwritable | @@ -1482,14 +2615,35 @@ netalertx-test-mount-run_unwritable | Startup pre-checks netalertx-test-mount-run_unwritable | --> storage permission.sh netalertx-test-mount-run_unwritable | --> data migration.sh netalertx-test-mount-run_unwritable | --> mounts.py -netalertx-test-mount-run_unwritable | Path | Writeable | Mount | RAMDisk | Performance | DataLoss -netalertx-test-mount-run_unwritable | --------------------------+-----------+-------+---------+-------------+---------- -netalertx-test-mount-run_unwritable | /data/db | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-run_unwritable | /data/config | ✅ | ✅ | ➖ | ➖ | ✅ -netalertx-test-mount-run_unwritable | /tmp/run/tmp | ❌ | ✅ | ❌ | ❌ | ✅ -netalertx-test-mount-run_unwritable | /tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-run_unwritable | /tmp/log | ✅ | ✅ | ✅ | ✅ | ✅ -netalertx-test-mount-run_unwritable | /tmp/run | ❌ | ✅ | ❌ | ❌ | ✅ -netalertx-test-mount-run_unwritable | /tmp/nginx/active-config | ✅ | ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-run_unwritable | Path | R | W | Mount | RAMDisk | Performance | DataLoss +netalertx-test-mount-run_unwritable | --------------------------+---+---+-------+---------+-------------+---------- +netalertx-test-mount-run_unwritable | /data/db | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-run_unwritable | /data/config | ✅| ✅| ✅ | ➖ | ➖ | ✅ +netalertx-test-mount-run_unwritable | /tmp/run/tmp | ✅| ❌| ✅ | ❌ | ❌ | ✅ +netalertx-test-mount-run_unwritable | /tmp/api | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-run_unwritable | /tmp/log | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-run_unwritable | /tmp/run | ✅| ❌| ✅ | ❌ | ❌ | ✅ +netalertx-test-mount-run_unwritable | /tmp/nginx/active-config | ✅| ✅| ✅ | ✅ | ✅ | ✅ +netalertx-test-mount-run_unwritable | +netalertx-test-mount-run_unwritable | +netalertx-test-mount-run_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-run_unwritable | ⚠️ ATTENTION: Configuration issues detected (marked with ❌). +netalertx-test-mount-run_unwritable | +netalertx-test-mount-run_unwritable | * /tmp/run/tmp error writing, performance issue +netalertx-test-mount-run_unwritable | * /tmp/run error writing, performance issue +netalertx-test-mount-run_unwritable | +netalertx-test-mount-run_unwritable | We recommend starting with the default docker-compose.yml as the +netalertx-test-mount-run_unwritable | configuration can be quite complex. +netalertx-test-mount-run_unwritable | +netalertx-test-mount-run_unwritable | Review the documentation for a correct setup: +netalertx-test-mount-run_unwritable | https://github.com/jokob-sk/NetAlertX/blob/main/docs/DOCKER_COMPOSE.md +netalertx-test-mount-run_unwritable | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/mount-configuration-issues.md +netalertx-test-mount-run_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-run_unwritable |  +netalertx-test-mount-run_unwritable | \033[1;31m══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-run_unwritable | ❌ NetAlertX startup aborted: critical failure in mounts.py. +netalertx-test-mount-run_unwritable | https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/troubleshooting.md +netalertx-test-mount-run_unwritable | ══════════════════════════════════════════════════════════════════════════════ +netalertx-test-mount-run_unwritable | \033[0m netalertx-test-mount-run_unwritable exited with code 1 -All tests completed - Sun Nov 23 15:55:50 UTC 2025 +All tests completed - Sun Dec 21 23:41:22 UTC 2025 diff --git a/test/docker_tests/conftest.py b/test/docker_tests/conftest.py index ad902e2f..14fce16c 100644 --- a/test/docker_tests/conftest.py +++ b/test/docker_tests/conftest.py @@ -18,6 +18,7 @@ def build_netalertx_test_image(request: pytest.FixtureRequest) -> None: """Build the docker test image before running any docker-based tests.""" image = os.environ.get("NETALERTX_TEST_IMAGE", "netalertx-test") + project_root = pathlib.Path(__file__).resolve().parents[2] cmd = [ diff --git a/test/docker_tests/test_container_environment.py b/test/docker_tests/test_container_environment.py index c78066be..979a412e 100644 --- a/test/docker_tests/test_container_environment.py +++ b/test/docker_tests/test_container_environment.py @@ -589,23 +589,36 @@ def _assert_contains(result, snippet: str, cmd: list[str] = None) -> None: def _extract_mount_rows(output: str) -> dict[str, list[str]]: rows: dict[str, list[str]] = {} in_table = False + expected_cols = 0 + for raw_line in (output or "").splitlines(): line = raw_line.rstrip() if not in_table: if line.startswith(" Path") and "Writeable" in line: + # Legacy format: Path | Writeable | Mount | RAMDisk | Performance | DataLoss in_table = True + expected_cols = 5 + elif line.startswith(" Path") and "| R" in line and "| W" in line: + # Current format: Path | R | W | Mount | RAMDisk | Performance | DataLoss + in_table = True + expected_cols = 6 continue + if not line.strip(): break if line.lstrip().startswith("Path"): continue if set(line.strip()) <= {"-", "+"}: continue + parts = [part.strip() for part in line.split("|")] - if len(parts) < 6: + if len(parts) < 1 + expected_cols: continue path = parts[0].strip() - rows[path] = parts[1:6] + if not path: + continue + rows[path] = parts[1 : 1 + expected_cols] + return rows @@ -625,16 +638,49 @@ def _assert_mount_row( f"Mount table row for {path} not found. Rows: {sorted(rows)}\nOutput:\n{result.output}" ) columns = rows[path] - labels = ["Writeable", "Mount", "RAMDisk", "Performance", "DataLoss"] - expectations = [write, mount, ramdisk, performance, dataloss] - for idx, expected in enumerate(expectations): + + # Legacy: [Writeable, Mount, RAMDisk, Performance, DataLoss] + # Current: [R, W, Mount, RAMDisk, Performance, DataLoss] + if len(columns) == 5: + label_to_value = { + "Writeable": columns[0], + "Mount": columns[1], + "RAMDisk": columns[2], + "Performance": columns[3], + "DataLoss": columns[4], + } + write_label = "Writeable" + elif len(columns) == 6: + label_to_value = { + "R": columns[0], + "W": columns[1], + "Mount": columns[2], + "RAMDisk": columns[3], + "Performance": columns[4], + "DataLoss": columns[5], + } + write_label = "W" + else: + raise AssertionError( + f"Unexpected mount table column count for {path}: {len(columns)}. Columns: {columns}\nOutput:\n{result.output}" + ) + + checks = [ + (write_label, write), + ("Mount", mount), + ("RAMDisk", ramdisk), + ("Performance", performance), + ("DataLoss", dataloss), + ] + + for label, expected in checks: if expected is None: continue - actual = columns[idx] + actual = label_to_value.get(label) if actual != expected: raise AssertionError( - f"{path} {labels[idx]} expected {expected}, got {actual}.\n" - f"Rows: {rows}\nOutput:\n{result.output}" + f"{path} {label} expected {expected}, got {actual}.\n" + f"Row: {label_to_value}\nOutput:\n{result.output}" ) @@ -958,6 +1004,7 @@ def test_mandatory_folders_creation(tmp_path: pathlib.Path) -> None: # Ensure other directories are writable and owned by netalertx user so container gets past mounts.py for key in [ + "data", "app_db", "app_config", "app_log", @@ -1001,6 +1048,7 @@ def test_writable_config_validation(tmp_path: pathlib.Path) -> None: # Ensure directories are writable and owned by netalertx user so container gets past mounts.py for key in [ + "data", "app_db", "app_config", "app_log", diff --git a/test/docker_tests/test_mount_diagnostics_pytest.py b/test/docker_tests/test_mount_diagnostics_pytest.py index ec0a8858..c5450081 100644 --- a/test/docker_tests/test_mount_diagnostics_pytest.py +++ b/test/docker_tests/test_mount_diagnostics_pytest.py @@ -55,6 +55,7 @@ class MountTableRow: """Represents a parsed row from the mount diagnostic table.""" path: str + readable: bool writeable: bool mount: bool ramdisk: Optional[bool] # None for ➖ @@ -103,7 +104,7 @@ def parse_mount_table(output: str) -> List[MountTableRow]: # Split by | and clean up parts = [part.strip() for part in line.split("|")] - if len(parts) < 6: + if len(parts) < 7: continue path = parts[0] @@ -124,11 +125,12 @@ def parse_mount_table(output: str) -> List[MountTableRow]: try: row = MountTableRow( path=path, - writeable=emoji_to_bool(parts[1]), - mount=emoji_to_bool(parts[2]), - ramdisk=emoji_to_bool(parts[3]), - performance=emoji_to_bool(parts[4]), - dataloss=emoji_to_bool(parts[5]), + readable=emoji_to_bool(parts[1]), + writeable=emoji_to_bool(parts[2]), + mount=emoji_to_bool(parts[3]), + ramdisk=emoji_to_bool(parts[4]), + performance=emoji_to_bool(parts[5]), + dataloss=emoji_to_bool(parts[6]), ) rows.append(row) except (IndexError, ValueError): @@ -140,6 +142,7 @@ def parse_mount_table(output: str) -> List[MountTableRow]: def assert_table_row( output: str, expected_path: str, + readable: Expectation = UNSET, writeable: Expectation = UNSET, mount: Expectation = UNSET, ramdisk: Expectation = UNSET, @@ -169,7 +172,7 @@ def assert_table_row( assert raw_line is not None, f"Raw table line for '{expected_path}' not found in output." raw_parts = [part.strip() for part in raw_line.split("|")] - assert len(raw_parts) >= 6, f"Malformed table row for '{expected_path}': {raw_line}" + assert len(raw_parts) >= 7, f"Malformed table row for '{expected_path}': {raw_line}" def _check(field_name: str, expected: Expectation, actual: Optional[bool], column_index: int) -> None: if expected is UNSET: @@ -183,11 +186,12 @@ def assert_table_row( f"got '{raw_parts[column_index]}' in row: {raw_line}" ) - _check("writeable", writeable, matching_row.writeable, 1) - _check("mount", mount, matching_row.mount, 2) - _check("ramdisk", ramdisk, matching_row.ramdisk, 3) - _check("performance", performance, matching_row.performance, 4) - _check("dataloss", dataloss, matching_row.dataloss, 5) + _check("readable", readable, matching_row.readable, 1) + _check("writeable", writeable, matching_row.writeable, 2) + _check("mount", mount, matching_row.mount, 3) + _check("ramdisk", ramdisk, matching_row.ramdisk, 4) + _check("performance", performance, matching_row.performance, 5) + _check("dataloss", dataloss, matching_row.dataloss, 6) return matching_row @@ -212,9 +216,23 @@ def netalertx_test_image(): image_name = os.environ.get("NETALERTX_TEST_IMAGE", "netalertx-test") # Check if image exists - result = subprocess.run( - ["docker", "images", "-q", image_name], capture_output=True, text=True - ) + try: + result = subprocess.run( + ["docker", "images", "-q", image_name], + capture_output=True, + text=True, + timeout=10, + check=False, + ) + except FileNotFoundError: + pytest.skip("Docker CLI not found; skipping docker-based mount diagnostics tests.") + except subprocess.TimeoutExpired: + pytest.skip("Docker is not responding; skipping docker-based mount diagnostics tests.") + + if result.returncode != 0: + pytest.skip( + f"Docker returned error while checking images (rc={result.returncode}): {result.stderr.strip() or ''}" + ) if not result.stdout.strip(): pytest.skip(f"NetAlertX test image '{image_name}' not found. Build it first.") @@ -293,6 +311,49 @@ def create_test_scenarios() -> List[TestScenario]: ) ) + # Focused coverage: mounted-but-unreadable (-wx) scenarios. + # These are intentionally not part of the full matrix to avoid runtime bloat. + scenarios.extend( + [ + TestScenario( + name="data_noread", + path_var="NETALERTX_DATA", + container_path="/data", + is_persistent=True, + docker_compose="docker-compose.mount-test.data_noread.yml", + expected_issues=["table_issues", "warning_message"], + expected_exit_code=0, + ), + TestScenario( + name="db_noread", + path_var="NETALERTX_DB", + container_path="/data/db", + is_persistent=True, + docker_compose="docker-compose.mount-test.db_noread.yml", + expected_issues=["table_issues", "warning_message"], + expected_exit_code=0, + ), + TestScenario( + name="tmp_noread", + path_var="SYSTEM_SERVICES_RUN_TMP", + container_path="/tmp", + is_persistent=False, + docker_compose="docker-compose.mount-test.tmp_noread.yml", + expected_issues=["table_issues", "warning_message"], + expected_exit_code=0, + ), + TestScenario( + name="api_noread", + path_var="NETALERTX_API", + container_path=CONTAINER_PATHS["api"], + is_persistent=False, + docker_compose="docker-compose.mount-test.api_noread.yml", + expected_issues=["table_issues", "warning_message"], + expected_exit_code=0, + ), + ] + ) + return scenarios @@ -343,6 +404,35 @@ def validate_scenario_table_output(output: str, test_scenario: TestScenario) -> return try: + if test_scenario.name.endswith("_noread"): + # Mounted but unreadable: R should fail, W should succeed, and the mount itself + # should otherwise be correctly configured. + if test_scenario.container_path.startswith("/data"): + # Persistent paths: mounted, not a ramdisk, no dataloss flag. + assert_table_row( + output, + test_scenario.container_path, + readable=False, + writeable=True, + mount=True, + ramdisk=None, + performance=None, + dataloss=True, + ) + else: + # Ramdisk paths: mounted tmpfs, ramdisk ok, performance ok. + assert_table_row( + output, + test_scenario.container_path, + readable=False, + writeable=True, + mount=True, + ramdisk=True, + performance=True, + dataloss=True, + ) + return + if test_scenario.name.startswith("db_"): if test_scenario.name == "db_ramdisk": assert_table_row( @@ -474,6 +564,17 @@ def test_mount_diagnostic(netalertx_test_image, test_scenario): base_cmd + ["down", "-v"], capture_output=True, timeout=30, env=compose_env ) + # The compose files use a fixed container name; ensure no stale container blocks the run. + container_name = f"netalertx-test-mount-{test_scenario.name}" + subprocess.run( + ["docker", "rm", "-f", container_name], + capture_output=True, + text=True, + timeout=30, + check=False, + env=compose_env, + ) + cmd_up = base_cmd + ["up", "-d"] try: @@ -493,7 +594,6 @@ def test_mount_diagnostic(netalertx_test_image, test_scenario): time.sleep(1) # Check if container is still running - container_name = f"netalertx-test-mount-{test_scenario.name}" result_ps = subprocess.run( ["docker", "ps", "-q", "-f", f"name={container_name}"], capture_output=True, @@ -529,6 +629,68 @@ def test_mount_diagnostic(netalertx_test_image, test_scenario): return # Test passed - container correctly detected issues and exited # Container is still running - run diagnostic tool + if test_scenario.name.endswith("_noread"): + # Craft a mounted-but-unreadable (-wx) directory owned by uid 20211. + # Do this after container start so entrypoint scripts cannot overwrite it. + prep_cmd = [ + "docker", + "exec", + "--user", + "netalertx", + container_name, + "/bin/sh", + "-c", + " ".join( + [ + # Baseline structure for stable diagnostics (best-effort). + "mkdir -p /data/db /data/config /tmp/api /tmp/log /tmp/run /tmp/nginx/active-config || true;", + "chmod 0700 /data/db /data/config /tmp/api /tmp/log /tmp/run /tmp/nginx/active-config 2>/dev/null || true;", + # Target path: remove read permission but keep write+execute. + f"chmod 0300 '{test_scenario.container_path}';", + ] + ), + ] + result_prep = subprocess.run( + prep_cmd, capture_output=True, text=True, timeout=30, check=False + ) + if result_prep.returncode != 0: + ensure_logs("failed to prepare noread permissions") + pytest.fail( + f"Failed to prepare noread permissions: {result_prep.stderr}\nSTDOUT: {result_prep.stdout}" + ) + + # Verify as the effective app user: not readable, but writable+executable. + verify_cmd = [ + "docker", + "exec", + "--user", + "netalertx", + container_name, + "python3", + "-c", + "".join( + [ + "import os, sys; ", + f"p={test_scenario.container_path!r}; ", + "r=os.access(p, os.R_OK); ", + "w=os.access(p, os.W_OK); ", + "x=os.access(p, os.X_OK); ", + "sys.exit(0 if (not r and w and x) else 1)", + ] + ), + ] + result_verify = subprocess.run( + verify_cmd, capture_output=True, text=True, timeout=30, check=False + ) + if result_verify.returncode != 0: + ensure_logs("noread verification failed") + pytest.fail( + "noread verification failed for " + f"{test_scenario.container_path}:\n" + f"stdout: {result_verify.stdout}\n" + f"stderr: {result_verify.stderr}" + ) + cmd_exec = [ "docker", "exec", @@ -543,10 +705,10 @@ def test_mount_diagnostic(netalertx_test_image, test_scenario): ) diagnostic_output = result_exec.stdout + result_exec.stderr - # The diagnostic tool returns 1 for unwritable paths except active_config, which only warns + # The diagnostic tool returns 1 for rw permission issues except active_config, which only warns if (test_scenario.name.startswith("active_config_") and "unwritable" in test_scenario.name): expected_tool_exit = 0 - elif "unwritable" in test_scenario.name: + elif "unwritable" in test_scenario.name or test_scenario.name.endswith("_noread"): expected_tool_exit = 1 else: expected_tool_exit = 0 @@ -564,8 +726,8 @@ def test_mount_diagnostic(netalertx_test_image, test_scenario): ) else: # Should have table output but no warning message - assert "Path" in result_exec.stdout, ( - f"Good config {test_scenario.name} should show table, got: {result_exec.stdout}" + assert "Path" in diagnostic_output, ( + f"Good config {test_scenario.name} should show table, got: {diagnostic_output}" ) assert "⚠️" not in diagnostic_output, ( f"Good config {test_scenario.name} should not show warning, got stderr: {result_exec.stderr}" @@ -583,10 +745,10 @@ def test_table_parsing(): """Test the table parsing and assertion functions.""" sample_output = """ - Path | Writeable | Mount | RAMDisk | Performance | DataLoss ----------------------+-----------+-------+---------+-------------+---------- -/data/db | ✅ | ❌ | ➖ | ➖ | ❌ -/tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ + Path | R | W | Mount | RAMDisk | Performance | DataLoss +---------------------+---+---+-------+---------+-------------+---------- +/data/db | ✅ | ✅ | ❌ | ➖ | ➖ | ❌ +/tmp/api | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ """ # Test parsing @@ -597,6 +759,7 @@ def test_table_parsing(): assert_table_row( sample_output, "/data/db", + readable=True, writeable=True, mount=False, ramdisk=None, @@ -606,6 +769,7 @@ def test_table_parsing(): assert_table_row( sample_output, CONTAINER_PATHS["api"], + readable=True, writeable=True, mount=True, ramdisk=True,