Home > Error Bad > Error Bad Line In State File /var/lib/logrotate.status

Error Bad Line In State File /var/lib/logrotate.status

Logs that rotate periodically (daily, weekly, monthly, yearly) should probably be rotated at that time, if the status file is deemed corrupt. up vote 6 down vote log does not need rotating This can be because you log files are empty. The usual cause of your symptom is a machine on your network with a space in its name, and this confuses the log file rotation program. Klein's curve (algebraic geometry) Is there a place in academia for someone who compulsively solves every problem on their own? http://axishost.net/error-bad/error-bad-top-line-in-state-file-var-lib-logrotate-status.php

Pat McGowan (pat-mcgowan) on 2015-01-23 Changed in canonical-devices-system-image: importance: Undecided → High milestone: none → ww05-2015 status: New → Confirmed Pat McGowan (pat-mcgowan) wrote on 2015-01-23: #5 sync ./debian/user-conf/logrotate.conf from lp:ubuntu/upstart more hot questions question feed about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation Science Run logrotate # logrotate /etc/logrotate.conf error: bad top line in state file /var/lib/logrotate.status 5. Additional info: N/A Comment 1 Tomas Smetana 2008-05-21 02:12:49 EDT The status file is not supposed to be edited by the user and any corruption in it is considered to be https://geekpeek.net/error-bad-top-line-in-state-file/

Physically locating the server What are the drawbacks of the US making tactical first use of nuclear weapons against terrorist sites? Although I couldn't find any record of that in the logrotate changelog. Problem is, I can't figure out why it is erroring out.

It's already in RHEL6/Fedora. Any ideas on what it should be? When I run logrotate manually on my config file only like that: logrotate -df /etc/logrotate.d/my_service_name it didn't show any errors, it just said: log does not need rotating I still don't Format For Printing -XML -Clone This Bug -Top of page First Last Prev Next This bug is not in your last search results.

And that conflicted with the ngnix logrotate config, which has a rule for all nginx entries: # grep nginx /etc/logrotate.d/* /etc/logrotate.d/nginx:/var/log/nginx/*.log { So the solution for my case is pretty simple: Inside /etc/cron.daily/logrotate/ there is: #!/bin/sh test -x /usr/sbin/logrotate || exit 0 –Malachi May 24 '12 at 19:59 add a comment| Did you find this question interesting? I get this error with v.3.8.7 but under v.3.7.8 with the same conflicting configuration it writes out the same error but rotates fine. Foldable, Monoid and Monad Why IsAssignableFrom return false when comparing a nullable against an interface?

Please help us to make SME Server a better product. It has to be checked and fixed manually. This did it for me. Having a problem logging in?

Or you have a problem with log's creation time: ls -al --time=ctime /var/www/user/site.com/logs/ share|improve this answer answered May 10 '12 at 21:36 Gregory MOUSSAT 9531225 You can comment out http://www.linuxquestions.org/questions/linux-general-1/help-with-crontab-log-error-23614/ Run logrotate again # logrotate /etc/logrotate.conf # (no errors this time) 8. which caused a regression in RHEL-7: bug #1321980 Note You need to log in before you can comment on or make changes to this bug. So access.log became access.log.1 and apache writes into it.

Edit bug mail Other bug subscribers Subscribe someone else Bug attachments temp-logrotate-report (edit) Add attachment • Take the tour • Read the guide © 2004-2016 CanonicalLtd. • Terms of use http://axishost.net/error-bad/error-bad-return-status-for-module-build-on-kernel-ati.php Report a bug This report contains Public information Edit Everyone can see this information. Why don't you connect unused hot and neutral wires to "complete the circuit"? It's as if CRON isn't calling log rotate? –Malachi May 24 '12 at 19:45 I'm relatively new to Linux administration...

Common indicators: logrotate operations have not been performed on log files, using Debian 5.0 (OpenVZ or Xen) template, command logrotate /etc/logrotate.conf returns "error: error reading top line of /var/lib/logrotate/status" Enter the JZL240I-U View Public Profile View LQ Blog View Review Entries View HCL Entries View LQ Wiki Contributions Find More Posts by JZL240I-U 12-21-2004, 01:05 AM #6 dawood LQ Newbie Have a look at what line 21 is in the file, eg. this page Sarthak Roy What is the reason for this error?

Corrupt the contents of logrotate.status # dd if=/dev/random bs=1k count=1 of=/var/lib/logrotate.status 0+1 records in 0+1 records out 128 bytes (128 B) copied, 0.000158 seconds, 810 kB/s 4. The file logrotate.status should be removed or renamed. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.

Menu Skip navigation Menu Home Linux Smartphones & Gadgets Blog You are here:HomeLinuxError: bad top line in state file - logrotate.status ShareFacebook, Twitter, Google Plus, Pinterest, Email PrintPosted in:LinuxError: bad top

The program should probably issue an error message anyway, so that a cautious admin could go and check everything. However, it's not possible to do anything with corrupted state file automatically. I recently moved all my logs to /usr/log and Im certain this is the reason. My log file was huge and old, my configuration was 100% ok and valid, removing the status file didn't help.

The problem with this one specifically is that it doesn't even have an ethernet connection available. James Hunt (jamesodhunt) wrote on 2014-11-07: #4 Looks like the corruption issue is caused by bug 1387214. You could also put a call to ntpdate in your logrotate cron script, or in your startup scripts. Get More Info Unix & Linux Stack Exchange works best with JavaScript enabled October 10, 2016, 02:17:43 PM Welcome, Guest Please login or register. 1 Hour 1 Day 1 Week 1 Month Forever Login

share|improve this answer answered Jan 12 '15 at 11:28 Innokenty 1412 you seem to be right about the most recent versions. For more information on therefore solution and/or where to find the updated files, please follow the link below. We are done!If you are still having problems and your logrotate.status file was not recreated you might try forcing the logrotate by adding the "-f" parameter when running the command:[[email protected] ~]# logrotate Mark as duplicate Convert to a question Link a related branch Link to CVE You are not directly subscribed to this bug's notifications.

I updated the answer with an example... –Tom H May 11 '12 at 20:36 Thanks for such a clear explanation - I totally understand about the date side of In these cases the file ends in # nul bytes which causes a subsequent logrotate run (even a forced run) # to refuse to process it meaning no files get rotated. Comment 4 RHEL Product and Program Management 2011-09-22 20:23:24 EDT This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Does anyone know what happens to logrotate when something like this occurs?

Search this Thread 06-17-2002, 09:26 AM #1 magyartoth Member Registered: Feb 2002 Location: Pittsburgh, PA, USA Posts: 73 Rep: Help with crontab log error The cron daemon keeps emailing