Ubuntu Server Time Resetting
Ubuntu Server Time Resetting
We have a server that was having trouble resetting the date on the server to todays date and time, in the year 2020. It appeared that the problem happened randomly and in some cases it would happen and then go away. Here are some of the steps I went through to debug this.
My server has a daily 1:01 AM cronjob to the the date from another local server (to keep all of our servers in sync)
This command syncs the date with that server.
/usr/sbin/ntpdate -v my.localsever.com
Anytime I noticed the date off at 2020, when i would run this command and it would properly reset to the correct time, so it seems it has to be coming from somewhere other than the my.localserver.com
So I decide to try to pinpoint when this happened. Do to this I started a cron log, which dumps the date, every 30 seconds into a file, so I could look at that file to find out when the dates change
/bin/date >> /tmp/bin.date.log
Now, next time it happens I will have a history of the minute during which the issue happens and perhaps I can tie it to some process I have running.