I bought a Raspberry Pi 3 approximately two months ago, and since then time has never updated. Details:
- The operating system is a fresh installation of Raspbian Jessie (4.1.19-v7+).
- The Internet connection is via native Wi-Fi and no other problem with communication.
- No firewall problems as time update works like a charm on a Windows machine on the same LAN.
- Time zone is properly set.
I first started with nptdate
. When I tried forcing update,
sudo /etc/init.d/ntp stop
sudo ntpd -q -g
sudo /etc/init.d/ntp start
the terminal froze at the second command. The last message in /var/log/syslog
was:
Listening on routing socket on fd #22 for interface updates
/etc/ntp.conf
contents:
driftfile /var/lib/ntp/ntp.drift
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
server 0.debian.pool.ntp.org iburst
server 1.debian.pool.ntp.org iburst
server 2.debian.pool.ntp.org iburst
server 3.debian.pool.ntp.org iburst
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
restrict 127.0.0.1
restrict ::1
It seems to me that the ntp
package has a problem. How do I set up time update, as my Raspberry is turned on only during the day and time lag accumulates during the night?
ntpd
changed at some point in the past few years to make it harder for the user to force a change. Considering how simplistic its purpose, it is one of the absolute worst designed, most obtuse apps of all time. Someone should just write a basic, client only implementation for standalone end-user systems. It could not take more than a day, including reading the RFCs. I feel for you. I hate that thing (except it generally works for me so I'm not bothered...). Good luck. – goldilocks May 18 '16 at 10:56sudo grep ntp /var/log/syslog
or, after booting,journalctl | grep ntp
. – goldilocks May 18 '16 at 11:00sudo grep ntp /var/log/syslog
returns bunch ofbad peer from pool x.debian.pool.ntp.org
errors. After restartingjournald | grep ntp
returnsbash: journald: command not found
andsudo grep ntp /var/log/syslog
returns bunch ofcan't find host x.debian.pool.ntp.org: name or service not known
errors andno servers can be used, exiting
– Pygmalion May 18 '16 at 11:20journalctl
(comment edited). Anyway on Raspbian syslog should contain the same stuff. Edit those errors into the question and clarify over what timespan "not ever" applies to (as in "not ever today since I noticed the problem", "not ever in 4 months since I've had the pi", etc). – goldilocks May 18 '16 at 11:22journalctl
returnsNo journal files were found.
I also updated the question and syslog result after the restart in the comment. – Pygmalion May 18 '16 at 11:25