• 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 shrinker.py: no such file or directory

Oldiesmann

Basic Pleskian
Server operating system version
Ubuntu 20.04 LTS
Plesk version and microupdate number
18.0.42 Update #1
I've been getting emails related to a cron job which is apparently supposed to call a Python script to shrink the ModSecurity SDBM database (at least I assume that's what it's for since I found a similar utility on GitHub). Originally I was getting an error saying that the path to the python binary it was trying to call didn't exist (/opt/alt/python38/bin/python3), so I created a symlink to take care of that, but now it's saying that the script it's trying to call doesn't exist either.

Code:
/usr/bin/flock -n /var/run/shrinker.lock /opt/alt/python38/bin/python3 /opt/alt/modsec-sdbm-util/bin/shrinker.py > /dev/null
/opt/alt/python38/bin/python3: can't open file '/opt/alt/modsec-sdbm-util/bin/shrinker.py': [Errno 2] No such file or directory

A search of the server using the locate command reveals that not only is there no "shrinker.py" script anywhere, there's also no "/opt/alt/modsec-sdbm-util" directory either. This cron job is defined in the file /etc/cron.d/shrinker-cron, and I've moved the file outside of that directory for now, but is there a way to actually obtain this shrinker.py script anywhere?
 
Hello Igor, thank you. It helped me to remove the existing cronjobs from Imunify, and the error messages about those cronjobs by e-mail since I deleted Imunify from Plesk.

The only message I keep receiving is:

/usr/bin/flock -n /var/run/shrinker.lock /opt/alt/python38/bin/python3 /opt/alt/modsec-sdbm-util/bin/shrinker.py > /dev/null /opt/alt/python38/bin/python3: can't open file '/opt/alt/modsec-sdbm-util/bin/shrinker.py': [Errno 2] No such file or directory

How can I resolve this?
I've already searched in Scheduled Tasks in Plesk. I receive the error message every day at 4:17, so it must be a daily cron job, but could not find it.
 
Hello Igor, thank you. It helped me to remove the existing cronjobs from Imunify, and the error messages about those cronjobs by e-mail since I deleted Imunify from Plesk.

The only message I keep receiving is:

/usr/bin/flock -n /var/run/shrinker.lock /opt/alt/python38/bin/python3 /opt/alt/modsec-sdbm-util/bin/shrinker.py > /dev/null /opt/alt/python38/bin/python3: can't open file '/opt/alt/modsec-sdbm-util/bin/shrinker.py': [Errno 2] No such file or directory

How can I resolve this?
I've already searched in Scheduled Tasks in Plesk. I receive the error message every day at 4:17, so it must be a daily cron job, but could not find it.

I'am having the same problem as JeroenTL, any fix?
 
I tried the # apt-get purge imunify360* command too, the first time it took some time and said it was not installed and not removed with some errors, and run it for the second time, and it showed Done and not installed, and not removed.
I will wait to see if I will be getting the emails anymore.
 
I tried the # apt-get purge imunify360* command too, the first time it took some time and said it was not installed and not removed with some errors, and run it for the second time, and it showed Done and not installed, and not removed.
I will wait to see if I will be getting the emails anymore.
Did this work? Is this the solution?

I see a lot of references to this solution but nobody saying it solved the problem with modsec-sdbm-util
 
Back
Top