Error in logrotate

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

vi  /etc/logrotate.d/lsyncd
------------------------------------
/var/log/lsyncd/lsyncd.log   {
    missingok
    notifempty
    size 5M
    daily
    compress
    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
AXISHKAsked:
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?
0
AXISHKAuthor Commented:
This is the entire content.

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

Tks
0
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
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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 ?
Tks
0
arnoldCommented:
You have two directives to rotate the same logfile
ls -l /etc/logrotate.d
You have a file \\
0
AXISHKAuthor Commented:
Sorry, what do you mean ? Can you explain more ??

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

Tks
0
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 \
>
0
arnoldCommented:
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.
0

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
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.