solved error: bad year 1969 for file /var/log/daemon.log

Ask questions about Arch Linux ARM. Please search before making a new topic.

solved error: bad year 1969 for file /var/log/daemon.log

Postby jeajea » Sun Jun 30, 2013 9:23 pm

How do I fix this?

$this->bbcode_second_pass_code('', '
From: Anacron <mail7@gmail.com>
To: root@home.test
Content-Type: text/plain; charset="ANSI_X3.4-1968"
Subject: Anacron job 'cron.daily' on PLUG250
Message-Id: <20130630072207.47B7C14547@PLUG250.localdomain>
Date: Sun, 30 Jun 2013 03:22:07 -0400 (EDT)

error: bad year 1969 for file /var/log/daemon.log in state file /var/lib/logrotate.status
error: could not read state file, will not attempt to write into it
')

content of /var/lib/logrotate.status

$this->bbcode_second_pass_code('', '
login as: root
root@172.30.30.251's password:
Last login: Wed Dec 31 19:01:59 1969 from 172.30.30.211
[root@PLUG251 ~]# cd /var/lib
[root@PLUG251 lib]# cat logrotate.status
logrotate state -- version 2
"/var/log/mail.log" 2012-10-21
"/var/log/daemon.log" 1969-12-31
"/var/log/ppp.log" 2012-10-21
"/var/log/acpid.log" 2012-10-21
"/var/log/auth.log" 1969-12-31
"/var/log/errors.log" 1969-12-31
"/var/log/syslog.log" 1969-12-31
"/var/log/samba/172.30.30.210.log" 2013-3-31
"/var/log/samba/192.168.1.37.log" 2013-3-15
"/var/log/samba/192.168.1.203.log" 2013-3-24
"/var/log/samba/192.168.1.210.log" 2013-3-24
"/var/log/samba/pc9.log" 2013-3-31
"/var/log/messages.log" 1969-12-31
"/var/log/samba/172.20.20.32.log" 2013-4-4
"/var/log/samba/log.smbd" 1969-12-31
"/var/log/samba/log.nmbd" 1969-12-31
"/var/log/samba/pc6.log" 2013-4-4
"/var/log/samba/172.30.30.31.log" 1969-12-31
"/var/log/samba/nb3.log" 2013-4-7
"/var/log/samba/htpcb.log" 2013-3-24
"/var/log/samba/172.30.30.211.log" 2013-3-11
"/var/log/samba/wdtvlive.log" 2013-3-15
"/var/log/samba/172.30.30.201.log" 2013-4-5
"/var/log/wtmp" 1969-12-31
"/var/log/uucp.log" 2012-10-21
"/var/log/news.log" 2012-10-21
"/var/log/samba/192.168.17.37.log" 2013-4-7
"/var/log/lpr.log" 2012-10-21
"/var/log/samba/192.168.1.208.log" 2013-3-11
"/var/log/samba/pc4.log" 1969-12-31
"/var/log/samba/htpc5.log" 2013-3-31
"/var/log/debug.log" 2012-10-21
"/var/log/everything.log" 1969-12-31
"/var/log/samba/htpc.log" 2013-3-24
"/var/log/samba/pc1.log" 2013-4-5
"/var/log/samba/192.168.1.212.log" 2013-3-13
"/var/log/iptables.log" 2012-10-21
"/var/log/samba/nmbd.log" 1969-12-31
"/var/log/btmp" 1969-12-31
"/var/log/samba/172.30.30.29.log" 2013-3-23
"/var/log/samba/172.30.30.229.log" 2013-3-23
"/var/log/samba/172.20.20.34.log" 2013-4-5
"/var/log/boot" 2012-10-21
"/var/log/samba/grpc.log" 2013-3-13
"/var/log/crond.log" 1969-12-31
"/var/log/kernel.log" 1969-12-31
"/var/log/samba/smbd.log" 2013-3-11
"/var/log/user.log" 2012-11-10
"/var/log/samba/192.168.1.209.log" 2013-3-25
"/var/log/samba/172.30.30.206.log" 2013-4-4
[root@PLUG251 lib]#
')

Also I want mail to root to be forwarded (by postfix) to my gmail account. However, this messages appears to be using the gmail account as a relay to root.home.test

$this->bbcode_second_pass_code('', '
Delivery to the following recipient failed permanently:

root@home.test

Technical details of permanent failure:
DNS Error: Domain name not found

----- Original message -----

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=from:to:content-type:subject:message-id:date;
bh=qDwqO7nX4/cbDOINiepSAglson1Ctfk5ApAO7ssay44=;
b=OWeDVDlRqnPT1Ecpzaz5ziz7dRvjj+XFkZU9nDcL6ABbXpyYtqNtfT275Vu13vzf6V
gvlmTEMNHMsP85x503DEVQF55NzgoP9I2LPB2jwhUZWUpj4YKr2PpA0Ugh2K2f/yjCNw
34Qz2XsPoMdM+594NYq8co35qXbDDXZZqR0CZHxdo8UubNACHw76kgIAjartrhz9wWDI
TUbBUi7nDrOhTT+TgnVfqg2vDCJy6rkTd/6tCDGXZ2srz7sZ/vOhTnqDpZ7N4qFmX2ro
LgIqYPQQu7bAVRNZ9AxS76ek9DN4XIYYMaJu1qxUu/k1iMMnZdipgiKPODU3rLk1C3AP
2X2g==
X-Received: by 10.52.162.42 with SMTP id xx10mr6550592vdb.116.1372576954383;
Sun, 30 Jun 2013 00:22:34 -0700 (PDT)
Return-Path: <mail7@gmail.com>
Received: from PLUG250.localdomain (65344hfc30.tampabay.res.rr.com. [65.34.4.30])
by mx.google.com with ESMTPSA id dg10sm6027226vdc.8.2013.06.30.00.22.32
for <root@home.test>
(version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
Sun, 30 Jun 2013 00:22:33 -0700 (PDT)
Received: by PLUG250.localdomain (Postfix, from userid 0)
id 47B7C14547; Sun, 30 Jun 2013 03:22:07 -0400 (EDT)
From: Anacron <mail7@gmail.com>
To: root@home.test
')
Last edited by jeajea on Tue Jul 02, 2013 7:32 pm, edited 1 time in total.
Jim Anderson
3 Dockstars, 3 Pogoplug V2 and a Zyxel NSA325
Treasure Island, Fl
jeajea
 
Posts: 121
Joined: Wed Aug 25, 2010 4:00 pm

Re: error: bad year 1969 for file /var/log/daemon.log in sta

Postby WarheadsSE » Mon Jul 01, 2013 2:20 pm

Set the time with an NTP-ing daemon, even fakeclock or the like. Then, you might need to delay the rotation from starting until the time has been updated.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: error: bad year 1969 for file /var/log/daemon.log in sta

Postby jeajea » Tue Jul 02, 2013 7:30 pm

After my prior post I noticed that openntpd was failing to set the clock.
I think the openntpd problem started when I installed bind on this Pogoplug and pointed the nameserver to localhost.
I uninstalled openntpd and installed ntp which is setting the clock.
However, it takes NTP almost 4 minutes to set the clock after boot.

I found the solution to the bad date problem here.

http://www.linuxquestions.org/questions ... 175422572/

$this->bbcode_second_pass_code('', 'mv -f /var/lib/logrotate.status /var/lib/logrotate.status.$$
touch /var/lib/logrotate.status
chown 0:0 /var/lib/logrotate.status
chmod 0644 /var/lib/logrotate.status
# test:
/usr/sbin/logrotate -d /etc/logrotate.conf
# and force run:
/usr/sbin/logrotate -f /etc/logrotate.conf')
Jim Anderson
3 Dockstars, 3 Pogoplug V2 and a Zyxel NSA325
Treasure Island, Fl
jeajea
 
Posts: 121
Joined: Wed Aug 25, 2010 4:00 pm


Return to User Questions

Who is online

Users browsing this forum: No registered users and 19 guests