• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved fail2ban-vacuum

Bunta

New Pleskian
Server operating system version
Ubuntu 22.04.01
Plesk version and microupdate number
Plesk Obsidian Web Admin Edition 18.0.49 Update Nr. 2
Hello.

I set up a new vServer at Strato with Plesk. Now the first weekend came and the job "/etc/cron.weekly/fail2ban-vacuum" was executed for the first time.
There was an error that I can reproduce if I try to run the script manually.
/etc/cron.weekly/fail2ban-vacuum:13: logger: not found

I've already looked on the internet and also searched here in the forum, but I couldn't find an answer.

I looked at the script and thought maybe some path is not found because of the "not found".

There are actually only 2 paths.
1. "/var/lib/fail2ban/fail2ban.sqlite3" there is
2. outfile=`mktemp /tmp/fail2ban-vacuum.XXXXXX`, it doesn't exist.
Can it be that the file "fail2ban-vacuum.XXXXXX" cannot be created and then cannot be found in the further course? If so why? I freshly installed everything.

Thank you for your help.
 
hmm.... can you check to make sure you have logrotate installed on your server?
 
Bash:
#!/bin/sh
### Copyright 1999-2022. Plesk International GmbH. All rights reserved.

[ -f "/var/lib/fail2ban/fail2ban.sqlite3" ] || exit 0

outfile=`mktemp /tmp/fail2ban-vacuum.XXXXXX`

trap 'rm -f $outfile;' TERM INT EXIT
sqlite3 /var/lib/fail2ban/fail2ban.sqlite3 "VACUUM;" >$outfile 2>&1

rc=$?
if [ $rc -eq 0 ]; then
        logger -t fail2ban-vacuum "Vacuum of fail2ban database successfully completed"
else
        logger -t fail2ban-vacuum -f "$outfile"
fi
exit $rc

Thats the fail2ban-vacuum script.

What does the "13" and the "not found" mean in the error message?
 
Line 13: the command "logger" is not found.

Logger can be installed with this command:
# apt-get install bsdutils
 
Thats it!
I installed bsdutils and now the comand run without error.
Why Strato offers a VM image with Ubuntu 22.04 + Plesk pre-installed but with missing components... who knows.

Thank you both very much!
 
Good to know that it's part of badutils, knew it was under some package, just didn't knew which one lol. Good to know that it's working now.
 
Back
Top