Re: Mandriva: Can't connect to ANY NTP server - Why?

From: Enrique Perez-Terron (enrio_at_online.no)
Date: 11/27/05


Date: Sun, 27 Nov 2005 09:52:37 +0100

On Sun, 27 Nov 2005 07:03:54 +0100, Michael Badt <mibadt@gmail.com> wrote:

> Thanks all !
>
> I'm too bothered by the host 1.0.0.0.
> Using the explicit IP address, as Lenard suggested, worked ! - see following
> copy:
> /usr/sbin/ntpdate -u 128.10.252.7
> Looking for host 128.10.252.7 and service ntp
> host found : darkcity.cerias.purdue.edu
> 27 Nov 08:00:23 ntpdate[7414]: step time server 128.10.252.7 offset
> -32.779561 s ec
>
> Any idea?

I'm very mystified by this address 1.0.0.0.

I just stopped my nptd, renamed my /etc/ntp* files out of the way,
and tried a non-existing host-name:

   # ntpdate -u kraki.com
   Error : Temporary failure in name resolution
   27 Nov 09:18:51 ntpdate[28678]: can't find host kraki.com

   27 Nov 09:18:51 ntpdate[28678]: no servers can be used, exiting

I don't havey any idea, except to debug the name resolution using
all available means.

What do you get as output when you do "ping us.pool.ntp.org" ?

A question is, is name resolution failing only for ntpdate? Is there
a problem with your copy of ntpdate? Most likely ntpdate links to libc
and uses functions there to do name resolution. But what if the name
resolution works for ntpdate, but the ntpdate is having another problem
that makes it behave strangely? If we can establish that other programs
too have problems with name resolution, we can take our focus away from
ntpd/ntpdate, and focus on the name resolution. And vice versa, if name
resolution works for most/all other programs, concentrate on ntpdate
itself.

Check if name resolution fails for other programs as well. "ping" is just
one such program. you can try others, like "telnet", "wget", etc. Try with
known good host names, and with a name known to not exist, like xx.xx, or
"kraki.com" (in case it matters that .com is a valid tld, while .xx to my
best knowledge is not).

It does not matter that much at this stage if there is a firewall blocking
ping or telnet, the question is if we get a response that shows the right
ip address on the screen, like you will get from ping or telnet. For example,
I doubt www.google.com has a non-blocked telnet port active, but

   $ telnet www.google.com
   Trying 64.233.161.99...

the name resolution works.

If name resolution gives strange results for all programs, what is in
your /etc/nsswitch.conf? Look for a line like

   # grep host /etc/nsswitch.conf
   #hosts: db files nisplus nis dns
   hosts: files dns

What is the contents of the file /etc/resolv.conf ?

If the "hosts" line in nsswitch.conf says "files", what is in /etc/hosts ?

Do you have a name switch cache process (nscd) ?

etc.

-Enrique



Relevant Pages

  • Re: Domain controller not found
    ... This takes name resolution out of the picture. ... You should also verify that F&P sharing is enabled and that a personal ... Just query the host that has the shares from a host ... >> username and password for the domain admin account. ...
    (microsoft.public.win2000.active_directory)
  • RE: DNS
    ... Troubleshooting TCP/IP - Verifying NetBIOS Name Resolution ... Host Name Resolution ... Microsoft Global Technical Support Center ... I can ping it and even connect to ...
    (microsoft.public.windowsxp.general)
  • Re: 127.0.1.1 in /etc/hosts, why?
    ... Is which a bug? ... If domain name resolution is really slowed, ... host name was split off to 127.0.1.1, ... applications happy and running smoothly you simple need to add the host ...
    (Ubuntu)
  • Re: NBTSTAT using different IP than PING
    ... is being used and in the other netbios name resolution is being used. ... Ethereal to capture the packet sequence while trying to ping or nbtstat -a the target ... Address than NBTSTAT -a COMPUTERNAME? ... it says "Host Not Found" although ping works correctly. ...
    (microsoft.public.win2000.networking)
  • Re: W2K PC much slower after joining domain and applying SP4
    ... But if my SBS03 domain is natively using host name resolution, ... Implementing NetBIOS name resolution as your ... >> obtained via DHCP from the server. ...
    (microsoft.public.windows.server.sbs)