Error in logrotate

I have encounterd the following message in logrotate. Any idea ??

vi  /etc/logrotate.d/lsyncd
/var/log/lsyncd/lsyncd.log   {
    size 5M
    create 0600 root root

logrotate -f /etc/logrotate.conf
error: lsyncd:1 duplicate log entry for /var/log/lsyncd/lsyncd.log
error: found error in /var/log/lsyncd/lsyncd.log  , skipping
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Seth SimmonsSr. Systems AdministratorCommented:
can you post the entire file?
maybe you have an include statement where a duplicate is found?
AXISHKAuthor Commented:
This is the entire content.

I can't download the file from the server, due to security reason.

F IgorDeveloperCommented:
See if another entry in /etc/logrotate.d directory is ponting to the same log (/var/log/lsyncd/lsyncd.log)
Maybe a duplicate logrotate.d entry (eg: a backup file)

You could run a grep command like
grep lsyncd.log /etc/logrotate.d/*

Open in new window

And see if there are some additional file entries
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

AXISHKAuthor Commented:
grep lsyncd.log /etc/logrotate.d/*

/etc/logrotate.d/\:/var/log/lsyncd/lsyncd.log  /var/log/lsyncd/lsyncd-status.log {
/etc/logrotate.d/lsyncd:/var/log/lsyncd/lsyncd.log  {

What does it tell ?
You have two directives to rotate the same logfile
ls -l /etc/logrotate.d
You have a file \\
AXISHKAuthor Commented:
Sorry, what do you mean ? Can you explain more ??

Are you talking about the return string "/etc/logrotate.d/\" ??

AXISHKAuthor Commented:
List out the directory /etc/logrotate.d, any idea ? Tks

# ls -al | more
total 152
drwxr-xr-x  2 root root  4096 Jul 22 16:22 .
drwxr-xr-x 87 root root 12288 Jul 22 09:55 ..
-rw-------  1 root root   157 Jul 22 09:44 \
-rw-------  1 root root   122 Jul 22 10:31 lsyncd
-rw-r--r--  1 root root    32 Mar  1  2012 up2date
-rw-r--r--  1 root root   188 Sep 25  2012 vsftpd.log
-rw-r--r--  1 root root   100 Dec 15  2009 wpa_supplicant
-rw-r--r--  1 root root   100 May 22  2012 yum
# cat \
You have two Gil with duplicate references

-rw-------  1 root root   157 Jul 22 09:44 \

That is the source of your error
cat \\
see if the contents are listed
!! >> lsyncd
The delete the \\ file.
Edit the lsyncd file to make sure which entries you need removing duplicate references.

That should resolve your error.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.