Software⏱️ 3 min read📅 2026-06-19

How to Fix: Logrotate error: No file found

Logrotate error: No file found issue resolved by identifying and adding missing log files to the logrotate configuration.

Quick Answer: Add the missing log files to the /etc/logrotate.d directory, ensuring they are monitored by the httpd logrotate script.

The error message 'No file found' for Logrotate on one of your servers is frustrating and may impact the server's performance. The error occurs because the Logrotate script is unable to find a log file that it should be rotating.

This issue can occur due to incorrect configuration or missing log files in the specified directories.

🔍 Why This Happens

  • The primary reason for this error is that the Logrotate script is not configured to monitor the /usr/local/Zend/apache2/logs/error_log file. Although it's mentioned in the httpd-ssl.conf and httpd-vhosts.conf files, these are not being monitored by the default Logrotate configuration.
  • Another possible cause could be that there are other log files or directories that are not being monitored by the Logrotate script, causing a conflict with the specified file.

✅ Best Solutions to Fix It

Configuring Logrotate to monitor the /usr/local/Zend/apache2/logs/error_log file

  1. Step 1: Add the following line to the /etc/logrotate.d/httpd.conf file (if it doesn't exist): `/usr/local/Zend/apache2/logs/error_log { daily }`. This will instruct Logrotate to monitor and rotate the error_log file daily.
  2. Step 2: Update the existing configuration in the /var/log/apache2/*.log /var/log/apache2/*/*.log file to include the following line: `include /etc/logrotate.d/httpd.conf`. This will ensure that the httpd.conf file is included in the rotation process.
  3. Step 3: Restart the Logrotate service by running the command `/usr/sbin/logrotate -f /etc/logrotate.conf`.

Rotating the phones.log file

  1. Step 1: Add the following line to the /etc/logrotate.d/phones.conf file (if it doesn't exist): `/www/phones/logs/error_log { monthly }`. This will instruct Logrotate to monitor and rotate the phones.log file monthly.
  2. Step 2: Update the existing configuration in the /var/log/apache2/*.log /var/log/apache2/*/*.log file to include the following line: `include /etc/logrotate.d/phones.conf`. This will ensure that the phones.conf file is included in the rotation process.
  3. Step 3: Restart the Logrotate service by running the command `/usr/sbin/logrotate -f /etc/logrotate.conf`.

✨ Wrapping Up

To resolve this issue, you need to configure Logrotate to monitor the /usr/local/Zend/apache2/logs/error_log file and rotate it daily. Additionally, you may need to rotate the phones.log file by creating a new configuration for it. By following these steps, you should be able to resolve the 'No file found' error for Logrotate on your server.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions