Issues with apt-get, NTPD timesync with DietPi

Having issues with your DietPi installation, or, found a bug? Post it here.
ptrinh1979
Posts: 5
Joined: Tue Feb 20, 2018 5:48 am

Issues with apt-get, NTPD timesync with DietPi

Post by ptrinh1979 »

I was trying to install iptables on DietPi. First attempt was via dietpi-config - software install. What I got was NTPD was not syncing, no matter how long I waited or how many times I tried. Then I decided to use apt-get, without success. It can't resolve deb.debian.org. This is when I type apt-get update.

This happened after I ran dietpi-config and changed regional settings to reflect my local timezone, region, and keyboard layout to basically USA, en_us, central time, and corresponding keyboard layout.

I am not that proficient with linux, so any help for a newbie is gratefully accepted... :-)
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: Issues with apt-get, NTPD timesync with DietPi

Post by k-plan »

Hi,
ptrinh1979 wrote:This happened after I ran dietpi-config and changed regional settings to reflect my local timezone, region, and keyboard layout to basically USA, en_us, central time, and corresponding keyboard layout.
Your DietPi is running v6.1?
Which device? RPi?

Sound for me with given information like this: Setting locale failed

If so, it will only happen under rare circumstance, direct after fresh setup.
Apologies, this is an issue our end.

In short:
- It was a difficult and longsome fix (thanks go to @Fourdee and @MichaIng).
- Is fixed with Update v6.2
- Quick and easy solution will be to start with a fresh DietPi v6 image , which will be auto-updated to v6.2 during inital setup.
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.
ptrinh1979
Posts: 5
Joined: Tue Feb 20, 2018 5:48 am

Re: Issues with apt-get, NTPD timesync with DietPi

Post by ptrinh1979 »

Oops, I forgot to include that info. I keep forgetting such details:

DietPi 6.1 on VirtualBox, used the corresponding VM appliance on the homepage.

I will try a fresh install, let it autoupdate to 6.2 and see what happens.
ptrinh1979
Posts: 5
Joined: Tue Feb 20, 2018 5:48 am

Re: Issues with apt-get, NTPD timesync with DietPi

Post by ptrinh1979 »

Okay, a follow up.

I re-did the VM image with a fresh appliance import of DietPi 6.0. I even downloaded the fresh copy from the dietpi website.
Went through the guided installation, and it updated to DietPi 6.2, I changed the locale to fit my region - English, US, Central Time, US 105 key layout, English plain. Then I changed my IP address to STATIC and configured gateway, DNS servers. Then I installed PiHole via dietpi-config, went through its setup procedures, configured everything, left IPv6 disabled.

Rebooted, and NTPD stopped working. I did a internet connection test, and it failed. I switched it back to DHCP, and rebooted. No matter how many times I save the config and reboot, it would stay on STATIC ip.

At the moment, the DietPi virtual machine is dead in the water.

DietPi 6.2
VirtualBox VM via image from DietPi website
baz123
Posts: 166
Joined: Thu Jan 12, 2017 9:23 pm

Re: Issues with apt-get, NTPD timesync with DietPi

Post by baz123 »

I've seen this as well even when the time was synced.

The difference for me is that I am running as daemon & drift synchronising.
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: Issues with apt-get, NTPD timesync with DietPi

Post by Gord_W »

I go in and edit the /etc/network/interfaces file to set up the ethernet and wifi interface parameters that I need as I need both working. Google the path and you will get lots of examples on what it should look like.

That may not be the cool way of doing it though. :o

Gord_W
baz123
Posts: 166
Joined: Thu Jan 12, 2017 9:23 pm

Re: Issues with apt-get, NTPD timesync with DietPi

Post by baz123 »

Network is not the issue. NTP sync is.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Issues with apt-get, NTPD timesync with DietPi

Post by Fourdee »

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.
ptrinh1979
Posts: 5
Joined: Tue Feb 20, 2018 5:48 am

Post by ptrinh1979 »

Hmm

I am going to do three things, as I need to have a working PiHole:

1) I am going to bring my backup back online with DietPi v159 - PiHole was working well on it. Keep that running until I can get DietPi 6.x working.

2) Troubleshoot further. As my DietPi 6.2 is dead in the water anyway, it would not hurt to edit the aforementioned files manually - what text editor is available in DietPi by default? I can't install anything at present, and I only installed PiHole, no other software from dietpi-config.

3) How would I go about troubleshooting NTPD, and resolving it?

Thanks for all the help, everyone! It is appreciated.
ptrinh1979
Posts: 5
Joined: Tue Feb 20, 2018 5:48 am

Re: Issues with apt-get, NTPD timesync with DietPi

Post by ptrinh1979 »

Just saw FourDee's post regarding GitHub Issue # 1445.

When I first encountered the problem, I got the described TimeSync issue (Retry / Override).

Redid this.

Now I just do not get any network connectivity, so NTPD is definitely failing. Can't ping my virtual machine, virtual machine fails internet test within dietpi-config.

Only read partway down the issue.

Will continue reading and catch up...
Post Reply