Difference between revisions of "Talk:Network Time Protocol daemon"

From ArchWiki
Jump to: navigation, search
(Syncing at boot: re)
(not sure about "Cannot assign requested address")
(115 intermediate revisions by 19 users not shown)
Line 1: Line 1:
This article has been created after splitting "Network Time Protocol" into this and OpenNTPD as discussed [https://bbs.archlinux.org/viewtopic.php?id=112698 here] -- [[User:Kynikos|Kynikos]] 16:03, 11 February 2011 (EST)
= Cannot assign requested address =
Is this section related to the problem ntpd isn't starting/crashing on systems with kernel option "ipv6.disable=1" enabled? If yes, you can solve it by adding "-4" to your ntpd.config like "restrict -4" If not, we might add another section?! [[User:T.ask|t.ask]] ([[User talk:T.ask|talk]]) 20:13, 13 December 2017 (UTC)
===<s>Update i18n links</s>===
Note that the i18n links still point to "Network Time Protocol" instead of "Network Time Protocol daemon": this should be changed if also the other wikis split the original article like this. -- [[User:Kynikos|Kynikos]] 16:58, 11 February 2011 (EST)
:[https://wiki.archlinux.org/index.php?title=Network_Time_Protocol_daemon&action=historysubmit&diff=154974&oldid=152801 Fixed], also for the other langauges. -- [[User:Kynikos|Kynikos]] 05:49, 3 September 2011 (EDT)
===<s>ntpd -qg</s>===
Why is {{ic|-g}} required in {{ic|ntpd -qg}} in Using without daemon? It allows to adjust time by more than 15 min without a warning, which seems like a very specialized need. If there isn't something I don't know, I'd like to remove {{ic|-g}} from there. - [[User:Corvinus|Corvinus]] 10:28, 3 December 2011 (EST)
:Sorry for the delay of this answer. From man ntpd: ''Normally, ntpd exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s  by  default.  This option'' (-g) ''allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that, ntpd will exit with a message to the system log.''
:Not only the -g option causes no harm, but since you're running ntpd only at boot time, you can't predict whether the clock is off by more than 15 minutes or not, and if it is, without the -g option it won't be adjusted.
:Googling it just a bit gives you some references, e.g. [http://lists.ntp.org/pipermail/questions/2011-October/030766.html].
:I'm restoring the -g option, but please feel free to continue the discussion if you can find some counter-arguments :)
:-- [[User:Kynikos|Kynikos]] 16:17, 15 December 2011 (EST)
::I disagree, -g would cause harm, because if clock is off by more than 15 min it means one of the following:
::*you run ntpd too rarely (must be several years perhaps),
::*your clock chip is hosed (no need setting it up),
::*some timezone/etc settings are incorrect and ntpd tries to do the wrong thing.
::In either case, it's better to leave the clock as is and alert user (that's why this panic threshold is present in first place).
:: -- [[User:Corvinus|Corvinus]] 11:02, 16 December 2011 (EST)
:::But Kynikos stated that it only does the adjustment once, which makes argument #2 mostly a non-issue (unless he meant once per boot...). And #1 should be mostly a non-issue, especially because the wiki highly discourages users from not running ntpd in daemon mode. -- [[User:Jstjohn|Jstjohn]] 13:18, 16 December 2011 (EST)
::::If they're non-issues, you don't need -g. If they are issues, you don't need -g either, since in this rare case it's better to be notified instead. -- [[User:Corvinus|Corvinus]] 14:47, 16 December 2011 (EST)
:::::For "*your clock chip is hosed (no need setting it up)", by "non-issue" I meant that having -g wouldn't really hurt anything because if the clock chip is bad (or the CMOS battery is dead), the problem should manifest itself on the next boot of the system (assuming Kynikos was correct).
:::::And I said that #1 should be a non-issue because if someone is only running ntpd very sporadically (i.e. not in daemon mode), then the sys admin probably doesn't know what he's doing. :3 (and that the wiki already discourages doing it like this in the first place) -- [[User:Jstjohn|Jstjohn]] 14:59, 16 December 2011 (EST)
::::::Eheh I've just reported what the man page says, and "this can happen only once" is referred only to the -g option, which could also be used without -q, thus leaving the daemon running. Of course at the next boot the major adjustment may happen again, so Corvinus has some points indeed. However I think the -qg usage should be mentioned since it seems quite common, see for example [http://en.gentoo-wiki.com/wiki/NTP#Setting_time_now]. Let's just follow the Arch way and give the readers the freedom of choice: the relevant parts of this discussion should be wikified and put in the [[Network_Time_Protocol_daemon#Using_without_daemon]] section. For now I've added an Accuracy template.
::::::-- [[User:Kynikos|Kynikos]] 10:24, 17 December 2011 (EST)
:::::::Done so. Remove template if correct.
:::::::If only every section in this wiki was composed with this amount of thought... :]
::::::: -- [[User:Corvinus|Corvinus]] 15:43, 17 December 2011 (EST)
::::::::Good job, I've reorganized the section a bit further and removed the Accuracy template. -- [[User:Kynikos|Kynikos]] 09:27, 18 December 2011 (EST)
==Syncing at boot==
I'm wondering if it's ok to mention {{ic|{ ntpd -qg; hwclock -w; } }} in [[Network Time Protocol daemon#Synchronize once at boot time]] as the main method and using the hwclock daemon only as an alternative, although the latter is an official daemon provided by initscripts.
And in any case, the two methods don't seem equivalent, in fact the hwclock daemon just runs {{ic|hwclock --adjust}} at shutdown.
This discussion is also related to [[Talk:Time#hwclock daemon]].
-- [[User:Kynikos|Kynikos]] 11:03, 20 January 2012 (EST)
:I think it should be first written without hwclock (as it should be for default config), and then noted that you should check if hwclock is launched, not the other way around like it is now. -- [[User:Corvinus|Corvinus]] 00:42, 21 January 2012 (EST)
::I've tried to reword the section a bit in that direction. -- [[User:Kynikos|Kynikos]] 08:32, 21 January 2012 (EST)
:::Corvinus, I've decided to partly revert one of your recent edits: [https://wiki.archlinux.org/index.php?title=Network_Time_Protocol_daemon&curid=10908&diff=179719&oldid=179586]. Read the explanation I've added in the edit summary and if you don't agree we can of course discuss that here :) -- [[User:Kynikos|Kynikos]] 12:46, 22 January 2012 (EST)
::::Alright, you're correct. But what I wanted is to have a clear link at the top of article about how to set time just now. It's sad if that's not possible with current layout. -- [[User:Corvinus|Corvinus]] 02:57, 23 January 2012 (EST)
:::::I see, you have a point too indeed... However the name of the main section, "Using without daemon", may be enough to arouse the curiosity of those looking for a way to synchronize just once. Also the fact that the section is placed before the one about using the daemon should help. However there's surely room for improvement, and ideas are welcome! -- [[User:Kynikos|Kynikos]] 07:48, 23 January 2012 (EST)

Latest revision as of 20:13, 13 December 2017

Cannot assign requested address

Is this section related to the problem ntpd isn't starting/crashing on systems with kernel option "ipv6.disable=1" enabled? If yes, you can solve it by adding "-4" to your ntpd.config like "restrict -4" If not, we might add another section?! t.ask (talk) 20:13, 13 December 2017 (UTC)