• 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 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