problem in ntpd in resoving pool.ntp.org
Hi,
can any one help me, i get a strange error when i try to metion ntp
pool servers in ntp.config file and start ntpd, it throws a error
saying host name can't be resolved, but it is working fine when i use
in ntpdate.
NTP configuration file
server pool.ntp.org
server 127.127.1.0 iburst minpoll 4 #use local clock
fudge 127.127.1.0 stratum 10 #reduce stratum for local clock
restrict default nomodify notrap nopeer
restrict 127.0.0.1
restrict 192.168.0.0 mask 255.255.0.0
driftfile /etc/ntp/drift
logfile /var/log/ntp.log
when i execute ntpd and see the /var/log/ntp.log file i got the
following
lines "pool.ntp.org" no host name and host name cannot be resolved
but when i try to give by /usr/sbin/ntpdate -d pool.ntp.org it is
resolved and
i can see eight ntp servers replying back and setting time.
why ntpd can't resolve while ntpdate works properly while contacting
pool.ntp.org
can any one help me
thanks in advance
murugan
Re: problem in ntpd in resoving pool.ntp.org
>>> In article <1173091057.974708.9730@n33g2000cwc.googlegroups.com>, "muruga" <muruga86@gmail.com> writes:
muruga> Hi, can any one help me, i get a strange error when i try to metion
muruga> ntp pool servers in ntp.config file and start ntpd, it throws a
muruga> error saying host name can't be resolved, but it is working fine
muruga> when i use in ntpdate.
Your 'restrict' lines are the problem.
Please see [url]http://ntp.isc.org/Support/AccessRestrictions[/url]
H
Re: problem in ntpd in resoving pool.ntp.org
On 2007-03-05, muruga <muruga86@gmail.com> wrote:
[color=blue]
> NTP configuration file
>
> server pool.ntp.org[/color]
This has nothing to do with your apparent DNS problem, but ... you
should use a minimum of 4 time sources (not including the LocalCLK). The
only time I'd rely on one time source would be if I controlled it.
[color=blue]
> server 127.127.1.0 iburst minpoll 4 #use local clock[/color]
This has nothing to do with your apparent DNS problem, but ... 'iburst'
does nothing for ref-clocks.
[color=blue]
> fudge 127.127.1.0 stratum 10 #reduce stratum for local clock
> restrict default nomodify notrap nopeer
> restrict 127.0.0.1
> restrict 192.168.0.0 mask 255.255.0.0
> driftfile /etc/ntp/drift
> logfile /var/log/ntp.log
>
> when i execute ntpd and see the /var/log/ntp.log file i got the
> following lines "pool.ntp.org" no host name and host name cannot be
> resolved[/color]
Are you sure that your resolver / DNS is working correctly?
Did you install ntpd from a binary package or did you compile it your
self?
[color=blue]
> but when i try to give by /usr/sbin/ntpdate -d pool.ntp.org it is
> resolved and i can see eight ntp servers replying back and setting
> time.[/color]
This, on the other hand, suggests that your DNS is working.
[color=blue]
> why ntpd can't resolve while ntpdate works properly while contacting
> pool.ntp.org can any one help me[/color]
I don't see anything in your configuration file that would interfere
with DNS.
--
Steve Kostecke <kostecke@ntp.isc.org>
NTP Public Services Project - [url]http://ntp.isc.org/[/url]
Re: problem in ntpd in resoving pool.ntp.org
On Mar 6, 8:40 am, Steve Kostecke <koste...@ntp.isc.org> wrote:[color=blue]
> On 2007-03-05, muruga <murug...@gmail.com> wrote:
>[color=green]
> > NTP configuration file[/color]
>[color=green]
> > server pool.ntp.org[/color]
>
> This has nothing to do with your apparent DNS problem, but ... you
> should use a minimum of 4 time sources (not including the LocalCLK). The
> only time I'd rely on one time source would be if I controlled it.
>[color=green]
> > server 127.127.1.0 iburst minpoll 4 #use local clock[/color]
>
> This has nothing to do with your apparent DNS problem, but ... 'iburst'
> does nothing for ref-clocks.
>[color=green]
> > fudge 127.127.1.0 stratum 10 #reduce stratum for local clock
> > restrict default nomodify notrap nopeer
> > restrict 127.0.0.1
> > restrict 192.168.0.0 mask 255.255.0.0
> > driftfile /etc/ntp/drift
> > logfile /var/log/ntp.log[/color]
>[color=green]
> > when i execute ntpd and see the /var/log/ntp.log file i got the
> > following lines "pool.ntp.org" no host name and host name cannot be
> > resolved[/color]
>
> Are you sure that your resolver / DNS is working correctly?
>
> Did you install ntpd from a binary package or did you compile it your
> self?
>[color=green]
> > but when i try to give by /usr/sbin/ntpdate -d pool.ntp.org it is
> > resolved and i can see eight ntp servers replying back and setting
> > time.[/color]
>
> This, on the other hand, suggests that your DNS is working.
>[color=green]
> > why ntpd can't resolve while ntpdate works properly while contacting
> > pool.ntp.org can any one help me[/color]
>
> I don't see anything in your configuration file that would interfere
> with DNS.
>
> --
> Steve Kostecke <koste...@ntp.isc.org>
> NTP Public Services Project -http://ntp.isc.org/[/color]
Hi steve,
i compiled the ntpd code (4.2.4) myself for an arm target using xcross
compiler, and not the exe obtained with package. is there any
compilation related stuff like enable flags which i need to do to
resolve domain names correctly.
Re: problem in ntpd in resoving pool.ntp.org
>>> In article <1173672979.547531.17830@n33g2000cwc.googlegroups.com>, "muruga" <muruga86@gmail.com> writes:
muruga> Hi steve, i compiled the ntpd code (4.2.4) myself for an arm target
muruga> using xcross compiler, and not the exe obtained with package. is
muruga> there any compilation related stuff like enable flags which i need
muruga> to do to resolve domain names correctly.
No. If you 'dig pool.ntp.org' (or whatever server(s) you are specifying) do
you see the name resolving? What about 'traceroute pool.ntp.org' (or
whatever...)?
H
Re: problem in ntpd in resoving pool.ntp.org
muruga wrote:[color=blue]
> Hi steve,
> i compiled the ntpd code (4.2.4) myself for an arm target using xcross
> compiler, and not the exe obtained with package. is there any
> compilation related stuff like enable flags which i need to do to
> resolve domain names correctly.
>[/color]
Cross-compiles can be iffy sometimes. However, please make sure you can
fork processes on the target box. ntpd needs to do this sometimes to
allow it to do DNS lookups. Make sure you don't have any restrict
statements preventing 127.0.0.1 from updating ntpd.
Danny
_______________________________________________
questions mailing list
[email]questions@lists.ntp.isc.org[/email]
[url]https://lists.ntp.isc.org/mailman/listinfo/questions[/url]