I have a box running ubuntu 10.04 x86 & it's isolated by necessity from a lot of the network. It is blocked from DNS.

I'd like it to keep accurate time, so I've configured NTP with several servers, all IP addresses. It's got the IP address, so it won't need to do DNS lookups, riiiight?

Here's the error I get when I try to update time:

date before sync:

Fri May 20 08:03:32 PDT 2016
* Stopping NTP server ntpd
Name server cannot be used, exiting20 May 08:03:32 ntpdate[26887]: name server cannot be used, reason: Temporary failure in name resolution

* Starting NTP server ntpd
COMMAND FAILED: /usr/sbin/ntpdate -u prefer #S2Platform-Server1 prefer #S2Platform-Server2 prefer #S2Platform-Server3
date after sync:
Fri May 20 08:03:32 PDT 2016
Sync failed

My question: is this ever going to work or does NTP just flat-out require DNS? I've done a lot of googling but I can't find any info about this.

Thank you

I've also asked this question on the forums.


I've tested ntpdate which is the command that is failing using query mode. It works fine. The failure appears to be related to the values like #S2Platform-Server1 which do require DNS resolution. It appears you may have commented out servers in /etc/ntp.conf or /etc/default/ntpdate incorrectly. The comment needs to be at the beginning of the line.

The name resolution issue is likely due to the invalid names rather than lack of DNS. You can disable DNS resolution in /etc/nsswitch.conf, and it won't be attempted by resolver calls.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.