# ntpd: no server suitable for synchronization found *argh

## sammy2ooo

hi there,

i am trying to setup ntpd on my gateway to keep my lan in sync. this is my servers /etc/ntp.conf

 *Quote:*   

> oscar ~ # grep -v '#' /etc/ntp.conf 
> 
> server ntp1.ptb.de
> 
> server ntp2.ptb.de
> ...

 

"ntpdate ntp1.ptb.de" finish successfully on my server AND on my client

but if I issue an "ntpdate oscar" on my client i get:

 *Quote:*   

> 
> 
> uranos ~ # ntpdate -v oscar
> 
> 24 Nov 17:05:47 ntpdate[1416]: ntpdate 4.2.0a@1.1190-r Mon Oct 31 12:23:27 CET 2005 (1)
> ...

 

a firewall is running but, port 123 udp is open and for sure accessable from within the lan. 

 *Quote:*   

> uranos ~ # ntpq oscar
> 
> ntpq> rl
> 
> assID=0 status=c644 sync_alarm, sync_ntp, 4 events, event_peer/strat_chg,
> ...

 

i am out of ideas...

----------

## sammy2ooo

ntpd debug output while trying to "ntpdate oscar" from my client

 *Quote:*   

> oscar log # /etc/init.d/ntpd restart
> 
>  * Caching service dependencies ...                                                           [ ok ]
> 
>  * Stopping ntpd ...                                                                          [ ok ]
> ...

 

----------

## PaulBredbury

From what I can tell, you are trying to use ntp (see howto) to set ntp on the same machine, which will fail anyway. I get:

```
ntpdate localhost

25 Nov 03:09:41 ntpdate[31157]: the NTP socket is in use, exiting

ntpdate -q localhost

server 127.0.0.1, stratum 3, offset 0.000000, delay 0.02565

25 Nov 03:14:02 ntpdate[31193]: adjust time server 127.0.0.1 offset 0.000000 sec
```

The connection probably fails because "oscar" resolves to 127.0.0.1 rather than 192...

----------

## sammy2ooo

thx for your reply and sorry for the few informations, i was a bit in hurry yesterday...

my gateways name is oscar (192.168.1.1) on which i would like to have the ntpd running. I have an ISDN internet connection so i would like to sync the gateways ip by running 

"/etc/init.d/ntpd restart" from /etc/ppp/ip-up.local

some infos from my gateway

 *Quote:*   

> 
> 
> oscar ~ # id
> 
> uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
> ...

 

...and some infos from a client

 *Quote:*   

> uranos ~ # id
> 
> uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
> 
> uranos ~ # /etc/init.d/ntpd status
> ...

 

as you can see my client successfully sync's using a public ntpd but the ones running on oscar

I have red in some newsgroups that different timezones could cause this error, but the timezone on oscar matches the one on my client....

----------

## sammy2ooo

anyone?

maybee this information will be helpful,too

 *Quote:*   

> 
> 
> proteus ~ # ntpdate -d -q oscar
> 
> 26 Nov 18:32:05 ntpdate[15655]: ntpdate 4.2.0-r Tue Mar 22 03:18:18 UTC 2005 (1)
> ...

 

----------

## PaulBredbury

Maybe try different ntp servers. Check you've done everything in the howto.

----------

## sammy2ooo

adding restrict clock.tix.ch did the trick...

 *Quote:*   

> 
> 
> server clock.tix.ch iburst
> 
> driftfile       /var/lib/ntp/ntp.drift
> ...

 

now i can sync all my clients within the lan with my server, but now i have another problem. I have only a dialup internet connection, so ntpd runs out of sync after a period, and my clients complain about that

 *Quote:*   

> 
> 
> hostA ~ # ntpdate -d oscar
> 
> 30 Nov 13:19:21 ntpdate[10817]: ntpdate 4.2.0-r Tue Mar 22 03:18:18 UTC 2005 (1)
> ...

 

192.168.1.1: Server dropped: Server has gone too long without sync. How could i sync my ntpd everytime i get online? I know about the ip-up.local script, but i don't know how i could use ntpdq to sync my daemon...

----------

## PaulBredbury

NTP binds to the IP address, which is no good for dynamic IPs. So, instead of starting ntp at bootup, you can have:

In /etc/ppp/ip-up.local

```
[ -x /etc/init.d/ntp-client ] && /etc/init.d/ntp-client start

[ -x /etc/init.d/ntpd ] && /etc/init.d/ntpd start
```

In /etc/ppp/ip-down.local

```
[ -x /etc/init.d/ntpd ] && /etc/init.d/ntpd stop
```

So, ntp-client will only run once, but ntpd will run while the connection is up.

----------

## sammy2ooo

i did it like this....seems to work...

 *Quote:*   

> oscar ppp # cat ip-up.local 
> 
> /etc/init.d/ntpd stop
> 
> sleep 2s
> ...

 

----------

## PaulBredbury

ntpdate (i.e. /etc/init.d/ntp-client) can run while ntpd is running. The purpose of stopping ntpd when the ppp connection goes down, is because it is necessary for dynamic IP addresses (and it stops ntpd from moaning in the logs that it can't connect to any time servers while the ppp connection is down).

----------

