Time Sync with NTPD - issue

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
nomax
Posts: 2
Joined: Sun May 21, 2017 8:21 am

Time Sync with NTPD - issue

Post by nomax »

all,

I have set up DietPi on my RPI2 and while I am trying to connect/log in I am receiving the following messages:

Code: Select all


NTPD: System time has not been synced/updated correctly.           │ 
     │                                                                    │ 
     │ To prevent further issues with software installations,             │ 
     │ DietPi-Software will now exit.                                     │ 
     │                                                                    │ 
     │ If problems persist, check the NTPD log:                           │ 
     │    /var/log/ntpd.log                                               │ 
     │                                                                    │ 
     │ To override this error, run the following command:                 │ 
     │    echo 0 > /etc/dietpi/.ntpd_exit_status  

Apparently the time can not be synced correctly. Even after reinstalling NTPD it does not change and I receive this message every time when I log in.

Any workaround available to this?

Thanks!!
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Time Sync with NTPD - issue

Post by Fourdee »

Hi,

Firstly, make sure you are running DietPi v150, as we fixed a known problem where NTPD wouldnt start in some cases.

Failing that, switch to SystemD-Timesync:
dietpi-config > advanced > time sync mode > 4 Daemon + Drift
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: Time Sync with NTPD - issue

Post by johnvick »

Is this needed on devices that have RTC?

John
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: Time Sync with NTPD - issue

Post by k-plan »

@ johnvick
Time Sync
Time Sync
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Time Sync with NTPD - issue

Post by Fourdee »

johnvick wrote:Is this needed on devices that have RTC?

John
Hi John,

Yes initially, to set the time. Also ensures the RTC does not drift out of time incorrectly over a period.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
MadHATR
Posts: 4
Joined: Sun Dec 03, 2017 9:48 pm

Re: Time Sync with NTPD - issue

Post by MadHATR »

How do I set the time on my Raspberry Pi with dietpi - NTPD does not work, it currently thinks the date is 02/04/2018.

reboot, retry, reinstall - nothing !

I've tried all the options in dietpi-config, I've tried the ntp server my mac uses (apple euro) I've tried the server my years old router uses 143.210.16.201 - nothing works.

How do i just get the bloody box to understand today's date and time.

I've tried "date --set="23 June 1988 10:00:00" format and that got ignored.

Please help - I have spent every night this week messing with this thing, but enough is enough - reply and you could save the life of my Pi - cos this weekend it will be no more !
baz123
Posts: 166
Joined: Thu Jan 12, 2017 9:23 pm

Re: Time Sync with NTPD - issue

Post by baz123 »

I have had this post on setting time on a Pi sitting in my blog drafts for a while (not done anything recently). https://tech.borpin.co.uk/2018/05/18/ke ... e-on-a-pi/

I think you can simply use

Code: Select all

sntp -s time.google.com
to set the time. The issue is, if the time is too far out, NTP will not set it unless you force it to. Once set, it writes it to file then uses that as the starting point next time so it is only on initial install you get a significant problem. On boot on V6 instances, I regularly see an NTP could not be set type error when using the daemon + drift setting.
MadHATR
Posts: 4
Joined: Sun Dec 03, 2017 9:48 pm

Re: Time Sync with NTPD - issue

Post by MadHATR »

Thanks,

I disabled the time sync in the end, found a different linux date command and set it that way.
Post Reply