• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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