I have recently had increasing problems and finally a dead nextcloudpi box. After analyzing sudo systemctl status
it showed me that fail2ban was failing.
I ‘think’ the issue is that there is a permission problem on the log files (somewhere) as the following is showing that there is no nextcloud.log file which is 100% not true. I checked many times and it is there and contains log data after i did a cat
on the file.
Here is the output of sudo systemctl status fail2ban.service
Thanks for any / all advice on this.
Warning: The unit file, source configuration file or drop-ins of fail2ban.service changed on disk. Run 'systemctl daemon-reload' to reload units.
● fail2ban.service - Fail2Ban Service
Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/fail2ban.service.d
└─ncp-delay-automount.conf, touch-ufw-log.conf
Active: failed (Result: exit-code) since Tue 2020-10-27 13:08:31 GMT; 10min ago
Docs: man:fail2ban(1)
Process: 503 ExecStartPre=/bin/mkdir -p /var/run/fail2ban (code=exited, status=0/SUCCESS)
Process: 504 ExecStartPre=/bin/sleep 10 (code=exited, status=0/SUCCESS)
Process: 831 ExecStartPre=/bin/touch /var/log/ufw.log (code=exited, status=0/SUCCESS)
Process: 834 ExecStart=/usr/bin/fail2ban-server -xf start (code=exited, status=255/EXCEPTION)
Main PID: 834 (code=exited, status=255/EXCEPTION)
Oct 27 13:08:19 nextcloudpi systemd[1]: Starting Fail2Ban Service...
Oct 27 13:08:30 nextcloudpi systemd[1]: Started Fail2Ban Service.
Oct 27 13:08:31 nextcloudpi fail2ban-server[834]: 'backend' not defined in 'ssh'. Using default one: 'auto'
Oct 27 13:08:31 nextcloudpi fail2ban-server[834]: 'backend' not defined in 'nextcloud'. Using default one: 'auto'
Oct 27 13:08:31 nextcloudpi fail2ban-server[834]: No file(s) found for glob /media/USBdrive/ncdata/nextcloud.log
Oct 27 13:08:31 nextcloudpi fail2ban-server[834]: Failed during configuration: Have not found any log file for nextcloud jail
Oct 27 13:08:31 nextcloudpi fail2ban-server[834]: Async configuration of server failed
Oct 27 13:08:31 nextcloudpi systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Oct 27 13:08:31 nextcloudpi systemd[1]: fail2ban.service: Failed with result 'exit-code'.
Things I have tried already, without success are:
-
re-create /ncdata/nextcloud.log file
-
try 750 permissions on nextcloud.log file
-
try 755 permissions on it
-
re-create log file
-
sudo apt update
andsudo apt upgrade
-
sudo ncp-update
At this point it’s above my skill level so I think I will try to do a fresh re-install of entire NCP but I think this thread could be of some use to someone else so I thought it is good for the records since it’s real.