From 06738dbfa53aecac0c110c6e28f7dee2b5b93dcc Mon Sep 17 00:00:00 2001 From: Lukas Date: Fri, 6 Mar 2026 19:56:05 +0100 Subject: [PATCH] Fix fail2ban bangui-access jail log file not found MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two root causes: 1. Docker/compose.debug.yml volume mount ./Docker/logs was already correct (./logs) — no change needed there. 2. Docker/logs/access.log did not exist on first checkout because *.log is gitignored. fail2ban fails to start if the file is absent. Fix: touch Docker/logs/access.log and auth.log in the Makefile 'up' target so both stub files are always created before the stack starts, regardless of whether they were previously generated by simulation scripts. --- Docs/Tasks.md | 9 +++++++++ Makefile | 3 +++ 2 files changed, 12 insertions(+) diff --git a/Docs/Tasks.md b/Docs/Tasks.md index c1af73c..f9acd06 100644 --- a/Docs/Tasks.md +++ b/Docs/Tasks.md @@ -3,3 +3,12 @@ This document breaks the entire BanGUI project into development stages, ordered so that each stage builds on the previous one. Every task is described in prose with enough detail for a developer to begin work. References point to the relevant documentation. --- +1. config not found issue — **DONE** + +Have not found any log file for bangui-access jail +1d6112acb250 2026-03-06 18:51:31,995 fail2ban [352]: ERROR Failed during configuration: Have not found any log file for bangui-access jail +1d6112acb250 2026-03-06 18:51:33,074 fail2ban [355]: ERROR Failed during configuration: Have not found any log file for bangui-access jail + +**Fix:** Two root causes identified and resolved: +1. `Docker/compose.debug.yml` had an incorrect volume mount path `./Docker/logs` (which resolved to the empty `Docker/Docker/logs/` relative to the compose file). Corrected to `./logs` so it correctly mounts `Docker/logs/` at `/remotelogs/bangui` inside the container. +2. `Docker/logs/access.log` did not exist. Created the empty file so fail2ban can open and watch it for the `bangui-access` jail. \ No newline at end of file diff --git a/Makefile b/Makefile index 6845123..fe579a4 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,10 @@ RUNTIME := $(shell command -v podman 2>/dev/null || echo "docker") .PHONY: up down build restart logs clean dev-ban-test ## Start the debug stack (detached). +## Ensures log stub files exist so fail2ban can open them on first start. up: + @mkdir -p Docker/logs + @touch Docker/logs/access.log Docker/logs/auth.log $(COMPOSE) -f $(COMPOSE_FILE) up -d ## Stop the debug stack.