• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Cron error

Ankebut

Regular Pleskian
Hello,

i receive daily email with cron error and don't known what is here the problem :(

Cron <root@second> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )


/etc/cron.daily/logrotate:
tail: cannot open ']' for reading: No such file or directory
logrotate_script: 3: [: missing ]
 
Hello,

i receive daily email with cron error and don't known what is here the problem :(

I can confirm this happening on Latest plesk.
I get daily messages with this subject:

Cron <root@domain> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

/etc/cron.daily/logrotate:
tail: cannot open ']' for reading: No such file or directory
logrotate_script: 3: [: missing ]

Any fix coming this way?
 
Here is content of /etc/cron.daily/logrotate script:

# cat /etc/cron.daily/logrotate
Code:
#!/bin/sh

/usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
    /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit 0

Try to run the command:

# /usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conf

from this script and find possible errors in the output which will help with troubleshooting.
 
This is what I have:

Bash:
#!/bin/sh

# Clean non existent log file entries from status file
cd /var/lib/logrotate
test -e status || touch status
head -1 status > status.clean
sed 's/"//g' status | while read logfile date
do
    [ -e "$logfile" ] && echo "\"$logfile\" $date"
done >> status.clean
mv status.clean status

test -x /usr/sbin/logrotate || exit 0
/usr/sbin/logrotate /etc/logrotate.conf

Is there a reason that the codes is so different?

Thank you
 
I suggest you contact Plesk Support Team. They will check and fix this issue directly on your server.
 
Unfortunately the Plesk license was purchased through a Hetzner dedicated server plan. Plesk support bounces me to Hetzner, and Hetzner says that they do not provide support for this...
 
Unfortunately the Plesk license was purchased through a Hetzner dedicated server plan. Plesk support bounces me to Hetzner, and Hetzner says that they do not provide support for this...
 
Hi, I have the same error on Plesk Obsidian 18.0.29 on debian 9.13. How can I fix it?
My /etc/cron.daily/logrotate looks like this, on Onyx on debian 9.13:
Code:
#!/bin/sh

test -x /usr/sbin/logrotate || exit 0
/usr/sbin/logrotate /etc/logrotate.conf

The script @cirrus posted fails when there is no entry in /var/lib/logrotate/status or that file contains a malformed line because `while read...` is a bit icky.
So running the command
/usr/sbin/logrotate /etc/logrotate.conf
manually once should fix it.
 
Back
Top