Help with (open)ntpd - Time not set after reboot

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

Help with (open)ntpd - Time not set after reboot

Postby grayman4hire » Fri May 17, 2013 8:31 pm

Hello,

I just noticed that the time on my Pogoplug isn't set after a reboot.

manually running "ntpd -s" works.

Any ideas? Thanks

gray


$this->bbcode_second_pass_code('', '
[root@vader ~]# date
Wed Dec 31 16:04:31 PST 1969
[root@vader ~]# date
Wed Dec 31 17:27:18 PST 1969
[root@vader ~]# systemctl status openntpd
openntpd.service - OpenNTP Daemon
Loaded: loaded (/usr/lib/systemd/system/openntpd.service; enabled)
Active: active (running) since Wed 1969-12-31 16:00:37 PST; 1h 26min ago
Process: 112 ExecStart=/usr/sbin/ntpd -s (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/openntpd.service
ââ119 /usr/sbin/ntpd -s
ââ251 /usr/sbin/ntpd -s

Dec 31 16:00:37 vader systemd[1]: Started OpenNTP Daemon.
[root@vader ~]# ntpd -s
[root@vader ~]# date
Fri May 17 13:29:46 PDT 2013
')
grayman4hire
 
Posts: 350
Joined: Sat Sep 29, 2012 12:03 am
Location: SF, CA

Re: Help with (open)ntpd - Time not set after reboot

Postby Geoff » Fri May 17, 2013 8:48 pm

You'll have that problem if ntpd tries to reach a time server before the network is up and DNS is accessible. If you have any other Linux boxes with static IP addresses on your LAN, you can set them up to serve time and add them to the list that ntpd tries.
Geoff
 
Posts: 231
Joined: Wed Mar 09, 2011 5:14 pm

Re: Help with (open)ntpd - Time not set after reboot

Postby grayman4hire » Fri May 17, 2013 11:11 pm

Thanks for the response Geoff. I figure it was something like that. However, doesn't the systemd service file wait for the network to start first?
$this->bbcode_second_pass_code('', '[root@vader ~]# cat /usr/lib/systemd/system/openntpd.service
[Unit]
Description=OpenNTP Daemon
After=network.target

[Service]
Type=forking
ExecStart=/usr/sbin/ntpd -s

[Install]
WantedBy=multi-user.target')

Any recommendation on delaying the start of the service?
grayman4hire
 
Posts: 350
Joined: Sat Sep 29, 2012 12:03 am
Location: SF, CA

Re: Help with (open)ntpd - Time not set after reboot

Postby pepedog » Sat May 18, 2013 12:05 am

I would switch to netctl, and ntpd. Install ifplugd too
Copy the required example from /etc/netctl/examples/ to /etc/netctl/
Enable with
systemctl enable netctl-ifplugd@eth0
Put in iburst as per here https://wiki.archlinux.org/index.php/Ntpd
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK


Re: Help with (open)ntpd - Time not set after reboot

Postby etan » Sat May 18, 2013 3:29 pm

wiki says about /etc/ntp.conf
i have /etc/ntpd.conf from default installation.
did you mean openntpd ?

I once wanted to try reconfigure openntpd like Geoff described but to serve time to dd-wrt router but its ntp client does not work openntpd.
Anybody knows ntp servers that dd-wrt "likes" ?
etan
 
Posts: 13
Joined: Sun Feb 17, 2013 5:45 pm

Re: Help with (open)ntpd - Time not set after reboot

Postby grayman4hire » Sat May 18, 2013 5:01 pm

Switched to NTP (versus openntpd) and time is syncing now. Thanks.

@etan, why even bother to run a local ntp server? What's wrong with the default Internet ntp servers?
grayman4hire
 
Posts: 350
Joined: Sat Sep 29, 2012 12:03 am
Location: SF, CA

Re: Help with (open)ntpd - Time not set after reboot

Postby etan » Sat May 18, 2013 5:36 pm

why not ?
in case of dd-wrt there seems a lot of vulnerabilities, on their forums there are sometimes people complaining about spontaneous reboots. Could be ntp one of them ?
etan
 
Posts: 13
Joined: Sun Feb 17, 2013 5:45 pm

Re: Help with (open)ntpd - Time not set after reboot

Postby grayman4hire » Sat May 18, 2013 6:49 pm

$this->bbcode_second_pass_quote('', 'w')hy not ?
Because there is no reason to, assuming your pogoplug/dd-wrt router has internet access.

I highly doubt public ntp servers has anything to do with people's dd-wrt routers randomly rebooting
grayman4hire
 
Posts: 350
Joined: Sat Sep 29, 2012 12:03 am
Location: SF, CA

Re: Help with (open)ntpd - Time not set after reboot

Postby etan » Sat May 18, 2013 7:11 pm

and so there is no reason not to.
obviously problem is not intended for you so please let more skilled people to answer.
etan
 
Posts: 13
Joined: Sun Feb 17, 2013 5:45 pm

Next

Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 9 guests