-1

I want to sync my RPI 3 to a local time server.

I've installed ntp using apt-get.

I edited the file /etc/ntp.conf and added the following line server [ip-address].

I restarted ntp using sudo service ntp restart and even rebooted the pi.

The time and date will not set correctly. It is off a couple of days, hours and minutes. It's like you start the RPI for the first time and the time has not been set once.

The local time server is alive.

I am using the RPI in a corporate environment.

Edit: ntpq -p now gives me the following output:

 10.10.10.2 ( 1.2.3.4   2 u   56   64    3    0.492  1424814   9.260
 srv24.globale-g .INIT.          16 u    -   64    0    0.000    0.000   0.000
 sigma.shadowchi .INIT.          16 u    -   64    0    0.000    0.000   0.000
 p5099c3bf.dip0. .INIT.          16 u    -   64    0    0.000    0.000   0.000
 stratum2-1.ntp. .INIT.          16 u    -   64    0    0.000    0.000   0.000

With 10.10.10.2 being the local time server. I removed the "iburst" parameter in /etc/ntp.conf.

Edit 2: The sync does kind of work now, after starting ntp using sudo service ntp start and sudo update-rc.d ntp defaults. The time syncs from time to time, but I don't know why and when.

1

2 Answers 2

0

what is the output when you ntpq -pn on the client (PI)?

For info: I had local timeserver (linux machine) and the client would synchronize when I removed the "iburst" paramater in the ntp.conf file

2
  • ntpq -qn gives me no output at all, removing burst parameters did not help. My time does not sync with any server at all. Neither the internet nor the local time server. I updated the question, because I get a new output on ntpq -p. Commented Dec 22, 2017 at 7:12
  • Sorry, I had the wrong option. I read "-q" instead of "-p". The updated question has the right output. Commented Dec 22, 2017 at 7:19
0

You haven't got enough info in the question.

Possible Answer 1: I assume your pi is not 10.10.10.2. But it has a different address that can connect to 10.10.10.2 via the local network.

And then I assume that 10.10.10.2 is running ntpd, or sntp, or some other time service running.

So, check the config on 10.10.10.2 and make sure that you haven't got ACLs or other restrictions that limit connectivity from your device.

Possible Answer 2: your pi is at 10.10.10.2 and you've got a GPS or other clock source attached. And you want it to refer to itself to get time. In which case, please attach the configuration of the clock source so we can help you debug it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.