Logrotate falining in lab

root@mongodb:/var/log/mongodb$ logrotate -f /etc/logrotate.d/mongod.conf
error: /etc/logrotate.d/mongod.conf:1 lines must begin with a keyword or a filename (possibly in double quotes)
error: found error in /var/log/mongodb/mongod.log , skipping
error: /etc/logrotate.d/mongod.conf:13 lines must begin with a keyword or a filename (possibly in double quotes)
root@mongodb:/var/log/mongodb$ more /etc/logrotate.d/mongod.conf
/var/log/mongodb/mongod.log {
rotate 10
daily
size 10M
missingok
create 0600 mongodb mongodb
delaycompress
compress
sharedscripts
postrotate
/bin/kill -SIGUSR1 $(cat /var/lib/mongodb/mongod.lock)
endscript
}
root@mongodb:/var/log/mongodb$

facing the same issue

1 Like

I am not sure of the root cause and solution but I tried next day it worked

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.