Logrotate error

Permissions look fine, you can manually fix the one log file (x.log.4.gz) if you need to - it’s an artifact of how nginx is running with roots/trellis. You can avoid it altogether in future installs by adding a script to be run manually or by ansible after the deploy.

One common reason for the error you’re seeing is that Upstart sucks. Quick check-- are both the Upstart and systemV initialization configs present (/etc/init/nginx and /etc/init.d/nginx)? You’re running on Ubuntu 14.04 (Trusty) right?

If they’re both there, stop ngninx, delete the Upstart one and restart. Should work fine. This was resolved I thought in later 1.8 versions and then for reasons I am not familiar with, it seems to have returned in nginx 1.9 mainlines.

Let me know if that does/doesn’t do the trick for your server.

See, the service manpage for more info.

The existence of an upstart job of the same name as a script in /etc/init.d
will cause the upstart job to take precedence over the init.d script.

4 Likes