Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1] 2

Author Topic: NTP  (Read 2715 times)

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6069
  • Retd sw dev; A&A; 4 × 7km ADSL2; IPv6; Firebrick
NTP
« on: January 05, 2018, 11:20:22 PM »

I have never ever managed to get my pi to keep time at all. NTP just fails when I start up, ni matter what I try. I know that there are no communication problems with the path to the servers as I can get NTP to sync up to them by hand using manual commands and trace routes to them, are all good. I even added in the ntp servers at my own ISP, Andrews and Arnold, so they would be really close. Also i'm not using the pi's wireless st all, that's turned off, so can't blame that.

I was getting to the stage where I was thinking abuout starting to hunt around for a hardware clock, but then I thought that someone somewhere must have solved this. It was at this point, with all the stupid and thoughtless fiddling around that I was doing that I managed to make the pi non-booting, well not headless, so now I'm dead.

Does anyone have a reliable NTP time boot config + runes + setup recipe whatever that I could just steal?
Logged

Westie

  • Reg Member
  • ***
  • Posts: 819
Re: NTP
« Reply #1 on: January 19, 2018, 11:41:55 AM »

Don't know if this helps or not:

I'm running Raspbian stretch, with the config set up to wait for network at boot. I've so far not had a problem with keeping time...but it's only been a week or two.
Logged

tiffy

  • Reg Member
  • ***
  • Posts: 298
Re: NTP
« Reply #2 on: January 19, 2018, 01:51:22 PM »

Don't know if this may be relevant to your issue:

http://forum.kitz.co.uk/index.php/topic,20525.msg358273.html#msg358273

I have had clock issues in the past with my RPi's and this procedure has always cured, give it a try.
Logged
Plusnet 40/10 - DSLStats/RPi - ZyXEL VMG1312-B10A - Huawei Cab - MDWS (sadly gone 12/03/18)

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6069
  • Retd sw dev; A&A; 4 × 7km ADSL2; IPv6; Firebrick
Re: NTP
« Reply #3 on: January 19, 2018, 02:25:11 PM »

I'll definitely do that. Much appreciated. I tried so many different kinds of hacks assuming that my problem was due to the local time being far too far out, I can't remember whether I tried _exactly_ that particular technique.
Logged

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6069
  • Retd sw dev; A&A; 4 × 7km ADSL2; IPv6; Firebrick
Re: NTP
« Reply #4 on: January 26, 2018, 02:55:41 AM »

I'm soon to get the pi back up and running so i would appreciate any advice as to a known good recipe for getting ntp up and running.

I may have mentioned earlier -I managed to find the magic incantation to force the time to get set correctly even if the clock is miles off. After that it didn't maintain time properly for more than an hour or so.

But using the afore said magic incantation during the boot process didn't work, so wondering if it failed because of dependencies or network readiness state, I even set it to automatically execute again 1 min and 2 minutes after boot, out of sheer desperation, and that didn't work either.

I have ipv6 working on the pi, tested. Somehow got it up by fiddling about, that is the only thing I can think of. The ntp servers are available on iov6 and iov4 networks both. I included the aa.net.uk one as it is the nearest and also the usual pool ones for the uk. Did much fiddling around with those and all to no avail. I wonder if there is some odd bug where it doesn't like ipv6 being present. The docs show that the ntp associated components do speak ipv6 albeit with some awkward design quirks. I haven't tried things in an ipv6-only or ipv4-only network.
Logged

Westie

  • Reg Member
  • ***
  • Posts: 819
Re: NTP
« Reply #5 on: January 26, 2018, 03:34:24 PM »

I am a complete newbie regarding linux / routers / hands-on-beyond-a-gui, so whilst I can say what works for me, I am aware that this might be a grandmother/eggs situation. Feel free to ignore whatever isn't relevant.

In my setup I have a router/modem picking up the internet, connected by Ethernet to a Pepwave Surf SOHO router which handles the household LAN(s) on separate sub-networks.

A Pi Zero W is on a household wireless LAN, which monitors the modem/router with DSLstats and uploads to MDWS. The Pi runs Raspbian Stretch, which apparently doesn't have ntp installed, although it is in the repository (have I said that right?)

When I first set the Pi up I installed (I think) the ntp daemon by using
Code: [Select]
sudo apt-get update
sudo apt-get -y install ntp

Using the Pi's GUI I have also set the preferences to the correct locale, and to wait for the network before completing the boot sequence. It seems to have no trouble in picking up a ntp server, or in keeping accurate time (within the minute, anyway).

Am I being too simplistic?
Logged

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6069
  • Retd sw dev; A&A; 4 × 7km ADSL2; IPv6; Firebrick
Re: NTP
« Reply #6 on: January 26, 2018, 05:35:53 PM »

Westie does your pi speak ipv6 to the internet?
Logged

Westie

  • Reg Member
  • ***
  • Posts: 819
Re: NTP
« Reply #7 on: January 26, 2018, 09:05:12 PM »

No, mine doesn't :( although I know it's capable of it :)

My current ISP doesn't do IPv6, so I haven't felt the urge to get to grips with it. Maybe when I migrate next week?....
Logged

skyeci

  • Kitizen
  • ****
  • Posts: 1147
    • skyECI line stats
Re: NTP
« Reply #8 on: January 27, 2018, 06:55:09 AM »

I found my pi3 would lose time when used over wireless which in turn would mess up mdws uploads. Using the ethernet port did not cause any issues.
mine also worked fine with ipv6 via my isp
Logged
Sky Fibre Pro - billion 8800nl V1 (bridge mode) + Opnsense(i5 Qotom) with IPV6 , AC-88U WAP- ECI cab,

click for my ECI line stats


click for  line stats by Pi3/Huawei 

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6069
  • Retd sw dev; A&A; 4 × 7km ADSL2; IPv6; Firebrick
Re: NTP
« Reply #9 on: January 27, 2018, 06:12:35 PM »

The command
   
Code: [Select]
ntpdate -b -u ntp1.aa.net.ukworks, but the time doesn't stay correct for many minutes even.

I'm getting help from my heroic neighbour who is doing a fresh installation. Will see how long it takes it to go wrong, if I retest after each step.
« Last Edit: January 27, 2018, 06:14:50 PM by Weaver »
Logged

Deathstar

  • Reg Member
  • ***
  • Posts: 122
Re: NTP
« Reply #10 on: January 27, 2018, 06:14:53 PM »

Mine keeps time fine, running the latest Raspbian on a Pi3.


Sent from my SM-G930F using Tapatalk

Logged

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6069
  • Retd sw dev; A&A; 4 × 7km ADSL2; IPv6; Firebrick
Re: NTP
« Reply #11 on: January 27, 2018, 06:20:57 PM »

AA does of course have an ntp server on the ipv6 internet btw, so it isn't a problem with ipv6 per se. But it could be due to the disparity between commands or something.

I was watching a lecture recently where the speaker was talking about problems not with ipv6 but with dual-stack, because in one example case firewall rules were not in sync between iov4 and iov6-related things as a staff member had forgotten to keep the two lots of runes in step. The speaker said that was why their org was desperate to go ipv6-only asap - to get rid of the cost of having to do everything twice and test twice, that and the huge cost of buying ipv4 space now as they were talking about spending US$950k on buying an IPv4 /16 (don't know if they meant a contiguous actual one or just that many loose addresses). On UKNOF videos website, speaker from Microsoft’s internal corporate IT dept.
« Last Edit: January 28, 2018, 12:10:19 AM by Weaver »
Logged

Westie

  • Reg Member
  • ***
  • Posts: 819
Re: NTP
« Reply #12 on: January 27, 2018, 09:19:16 PM »

the time doesn't stay correct for many minutes

I do not have ntpdate installed on my Pi, but I do have ntp, and it keeps time OK.

Maybe you could try that.
Logged

Westie

  • Reg Member
  • ***
  • Posts: 819
Re: NTP
« Reply #13 on: January 27, 2018, 09:46:54 PM »

This is from my Pi
Code: [Select]
Pi@Pi-Router:~ $ timedatectl
      Local time: Sat 2018-01-27 21:45:17 UTC
  Universal time: Sat 2018-01-27 21:45:17 UTC
        RTC time: n/a
       Time zone: Etc/UTC (UTC, +0000)
 Network time on: yes
NTP synchronized: yes
 RTC in local TZ: no
pi@Pi-Router:~ $

It took me over a minute to copy & paste (I'm slow); hence the slight discrepancy between reported time and posting time.
« Last Edit: January 27, 2018, 09:50:03 PM by Westie »
Logged

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6069
  • Retd sw dev; A&A; 4 × 7km ADSL2; IPv6; Firebrick
Re: NTP
« Reply #14 on: January 28, 2018, 12:10:55 AM »

I tried both
Logged
Pages: [1] 2
 

anything