Centos 7 log rotation errors

Log rotation seems to be working, but I get this message to root - not sure if its a problem or not.

/etc/cron.daily/logrotate:

Passing arguments to httpd using apachectl is no longer supported. You can only start/stop/restart httpd using this script. If you want to pass extra arguments to httpd, edit the /etc/sysconfig/httpd config file. Passing arguments to httpd using apachectl is no longer supported. You can only start/stop/restart httpd using this script. If you want to pass extra arguments to httpd, edit the /etc/sysconfig/httpd config file. Passing arguments to httpd using apachectl is no longer supported. You can only start/stop/restart httpd using this script. If you want to pass extra arguments to httpd, edit the /etc/sysconfig/httpd config file. Passing arguments to httpd using apachectl is no longer supported. You can only start/stop/restart httpd using this script. If you want to pass extra arguments to httpd, edit the /etc/sysconfig/httpd config file. Passing arguments to httpd using apachectl is no longer supported. You can only start/stop/restart httpd using this script. If you want to pass extra arguments to httpd, edit the /etc/sysconfig/httpd config file. Passing arguments to httpd using apachectl is no longer supported. You can only start/stop/restart httpd using this script. If you want to pass extra arguments to httpd, edit the /etc/sysconfig/httpd config file.

Status: 
Closed (fixed)

Comments

Jamie, it appears that in CentOS 7, it's no longer possible to pass in the "graceful" argument using "service httpd graceful" (which is the current Webmin behavior).

However, reviewing the httpd systemd service file (/lib/systemd/system/httpd.service), it looks like the "reload" parameter performs a graceful restart.

So a supported way to restart Apache gracefully on CentOS 7 would be to use this command:

service httpd reload

Thanks, I didn't realize that. The fix is to edit the file /etc/webmin/apache/config and change the apply_cmd line to :

apply_cmd=service httpd reload

This will be fixed properly in the next Webmin release.

Automatically closed -- issue fixed for 2 weeks with no activity.

I just ran into this issue and wanted to add my two cents.

From what I am able to discern amid all the chaos and ranting about systemd is the proper way to restart this service would be "systemctl reload httpd". A few posts mentioned that the service command is for sysvinit scripts and might not connect to systemd in future releases, or might be absent altogether"

The system command has the advantage that it works with both init scripts and systemd though, so Virtualmin doesn't have to care which one is in use.