On server startup, ntpd handles pool directive incompletely

Asked by Nakayoshi

On server startup, ntpd handles pool directive incorrectly, possibly due to deferring DNS lookup.

I have the following lines in /etc/ntp.conf:
pool ntp.nict.jp.
restrict 133.243.238.128 mask 255.255.255.128 nomodify notrap noquery

After server startup:
nakagawa@vps:~$ ntpq -p
     remote refid st t when poll reach delay offset jitter
==============================================================================
 ntp-b2.nict.go. .NICT. 1 u 48 64 3 2.442 403.331 0.243
nakagawa@vps:~$ sudo service ntp restart
[sudo] password for nakagawa:
 * Stopping NTP server ntpd
 * Starting NTP server ntpd
nakagawa@vps:~$ ntpq -p
     remote refid st t when poll reach delay offset jitter
==============================================================================
 ntp-a2.nict.go. .NICT. 1 u 2 64 1 1.578 0.104 0.000
 ntp-b2.nict.go. .NICT. 1 u 1 64 1 1.852 0.016 0.000
 ntp-a3.nict.go. .NICT. 1 u - 64 1 1.103 0.039 0.000
 ntp-b3.nict.go. .INIT. 16 u - 64 0 0.000 0.000 0.000

The latter is what I expected.

Syslog has lines like these:
Jul 9 12:30:39 vps ntpd[984]: Deferring DNS for ntp.nict.jp. 10
Jul 9 12:30:43 vps ntpd[1388]: Deferring DNS for ntp.nict.jp. 10
Jul 9 12:30:59 vps ntpd[1551]: Deferring DNS for ntp.nict.jp. 10

and finally:
Jul 9 12:31:01 vps ntpd_intres[1554]: DNS ntp.nict.jp. -> 133.243.238.163

Is this a bug?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu ntp Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Add the command you type in /etc/rc.local but above the 'exit 0' line. Does this help?

Revision history for this message
Nakayoshi (nakag) said :
#2

Thanks Andrew, the workaround worked. But still, I think it should be fixed if this is a bug.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

I suggest you report a bug

Can you help with this problem?

Provide an answer of your own, or ask Nakayoshi for more information if necessary.

To post a message you must log in.