I use a Raspberry Pi 3 and need to update the time via ntp after reboot the system.
It should be updated via wifi with dhcp. Generally it works, but the synchronisation needs approx. a half an hour and I don’t understand why.
When I want to start the ntp service manually with
>>sudo /etc/init.d/ntp restart
It says „ok“, but the system does nothing - the wrong time is still on the RTC.
Do you have an idea, what could be the problem?
Another information is, that the Pi runs in the read only mode...but if its not working without write access it wouldn’t be updated after an half hour, isn’t it?
To complete my problem here is the ntp.conf:
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help 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.de.pool.ntp.org iburst Server 1.de.pool.ntp.org iburst Server 2.de.pool.ntp.org iburst Server 3.de.pool.ntp.org iburst Server 127.127.1.0 #local clock Fudge 127.127.1.0 stratum 10 ...
To expand my explanation about my project. I want to use the Pi as a NTP server. The first problem was that the RTC „runs away“ after a reboot or when the Pi is turning off - especially for a longer time. That’s why I had the idea, that the Pi should be a NTP client at the first time to set the RTC and after that the Pi needs to be a NTP server for the device, which is connected via ethernert with the Pi. So I connected the Pi via Wifi to get the current time. As I told already generally it works, but it takes too much time.
Then I wanted to make the synchronisation manually with this command I posted before. My idea was to do this as a cronjob, but there is the next problem: 1. the Pi ignored the command; 2. the cronjob is ignored, too, or deleted after a reboot.
But I want to go step by step and the first problem I want to solve is to decrease the sync time.
I hope you have a better overview now about my situation....
Do you need more details?
NEW INFORMATION: 01.02.2018
Okay, so I have now the solution I want, BUT there is a behavior, which I don’t understand. The configurations were correct. However, I use the onboard WiFi to synchronize the system time via a NTP server, which I configured in the ntp.conf. I use the ethernet (wired LAN) to be the NTP server for the wired device to the RPi. Here the IP settings:
WLAN (DHCP): 192.168.1.x Ethernet (static): 192.168.10.10
I put both interfaces in different networks, because otherwise just one connection would be work - But why actually? And this is the main problem, why the synchronization had taken so long time. When I comment out the line with the local clock
Then the synchronization over the network works immediately... Why it is happens?