# NTP  :  no server suitable for synchronization found

## Blackburns_gentoo

Hi Leute,

Ich hab versucht ein Time server im Netzwerk auf zu setzen nach dem  Hownto

http://de.gentoo-wiki.com/NTP

Der server funktioniert soweit eigentlich:

```

 ~ # /etc/init.d/ntp-client start

 * Setting clock via the NTP client 'ntpdate' ...                                                                                                     [ ok ]
```

```
 ~ # /etc/init.d/ntpd start

 * Starting ntpd ...                                                                                                                                  [ ok ]

```

die 3 Config files sehen so aus : 

/etc/ntp.conf

```
~ # cat /etc/ntp.conf

# NOTES:

#  - you should only have to update the server line below

#  - if you start getting lines like 'restrict' and 'fudge'

#    and you didnt add them, AND you run dhcpcd on your

#    network interfaces, be sure to add '-Y -N' to the

#    dhcpcd_ethX variables in /etc/conf.d/net

# Name of the servers ntpd should sync with

# Please respect the access policy as stated by the responsible person.

#server         ntp.example.tld         iburst

server pool.ntp.org

##

# A list of available servers can be found here:

# http://www.pool.ntp.org/

# http://www.pool.ntp.org/#use

# A good way to get servers for your machine is:

# netselect -s 3 pool.ntp.org

##

# you should not need to modify the following paths

driftfile       /var/lib/ntp/ntp.drift

#server ntplocal.example.com prefer

#server timeserver.example.org

# Warning: Using default NTP settings will leave your NTP

# server accessible to all hosts on the Internet.

# If you want to deny all machines (including your own)

# from accessing the NTP server, uncomment:

#restrict default ignore

server 0.pool.ntp.org

server 1.pool.ntp.org

server 2.pool.ntp.org

server pool.ntp.org

# To deny other machines from changing the

# configuration but allow localhost:

restrict default nomodify nopeer

restrict 127.0.0.1

# To allow machines within your network to synchronize

# their clocks with your server, but ensure they are

# not allowed to configure the server or used as peers

# to synchronize against, uncomment this line.

#

restrict 192.168.0.0 mask 255.255.255.0 nomodify nopeer notrap
```

/etc/conf.d/ntpd

```
~ # cat /etc/conf.d/ntpd

# /etc/conf.d/ntpd

# Options to pass to the ntpd process

# Most people should leave this line alone ...

# however, if you know what you're doing, feel free to tweak

NTPD_OPTS="-u ntp:ntp"

```

/etc/conf.d/ntp-client

```
~ # cat /etc/conf.d/ntp-client

# /etc/conf.d/ntp-client

# Command to run to set the clock initially

# Most people should just leave this line alone ...

# however, if you know what you're doing, and you

# want to use ntpd to set the clock, change this to 'ntpd'

NTPCLIENT_CMD="ntpdate"

# Options to pass to the above command

# This default setting should work fine but you should

# change the default 'pool.ntp.org' to something closer

# to your machine.  See http://www.pool.ntp.org/ or

# try running `netselect -s 3 pool.ntp.org`.

NTPCLIENT_OPTS=" -b -u pool.ntp.org"

# How long to wait (in seconds) before giving up.

# Useful for when you boot and DNS/internet isn't

# really available but you have your net interface

# come up with say a static IP.

NTPCLIENT_TIMEOUT=30

```

soweit zum server.

nun die Clients,  ein Notebook und ein Media-Pc  im  selben Netzwerk, (Das Notebook über Wireless)

beide sind eigentlich wie nach Howto einfach konfiguriert:

2 config Files

/etc/ntp.conf

```
~ # cat /etc/ntp.conf

# NOTES:

#  - you should only have to update the server line below

#  - if you start getting lines like 'restrict' and 'fudge'

#    and you didnt add them, AND you run dhcpcd on your

#    network interfaces, be sure to add '-Y -N' to the

#    dhcpcd_ethX variables in /etc/conf.d/net

# Name of the servers ntpd should sync with

# Please respect the access policy as stated by the responsible person.

#server         ntp.example.tld         iburst

server pool.ntp.org

##

# A list of available servers can be found here:

# http://www.pool.ntp.org/

# http://www.pool.ntp.org/#use

# A good way to get servers for your machine is:

# netselect -s 3 pool.ntp.org

##

# you should not need to modify the following paths

driftfile       /var/lib/ntp/ntp.drift

#server ntplocal.example.com prefer

#server timeserver.example.org

# Warning: Using default NTP settings will leave your NTP

# server accessible to all hosts on the Internet.

# If you want to deny all machines (including your own)

# from accessing the NTP server, uncomment:

#restrict default ignore

# To deny other machines from changing the

# configuration but allow localhost:

restrict default nomodify nopeer

restrict 127.0.0.1

# To allow machines within your network to synchronize

# their clocks with your server, but ensure they are

# not allowed to configure the server or used as peers

# to synchronize against, uncomment this line.

restrict 192.168.0.0 mask 255.255.255.0 nomodify nopeer notrap
```

/etc/conf.d/ntp-client

```
~ # cat /etc/conf.d/ntp-client

# /etc/conf.d/ntp-client

# Command to run to set the clock initially

# Most people should just leave this line alone ...

# however, if you know what you're doing, and you

# want to use ntpd to set the clock, change this to 'ntpd'

NTPCLIENT_CMD="ntpdate"

# Options to pass to the above command

# This default setting should work fine but you should

# change the default 'pool.ntp.org' to something closer

# to your machine.  See http://www.pool.ntp.org/ or

# try running `netselect -s 3 pool.ntp.org`.

#NTPCLIENT_OPTS=" -b -u pool.ntp.org"

NTPCLIENT_OPTS=" -b -u 192.168.0.2"

# How long to wait (in seconds) before giving up.

# Useful for when you boot and DNS/internet isn't

# really available but you have your net interface

# come up with say a static IP.

NTPCLIENT_TIMEOUT=30
```

Nun wen ich nun die clients starte komt ein fehler :

```
~ # /etc/init.d/ntp-client start

 * Setting clock via the NTP client 'ntpdate' ...

21 Oct 16:41:37 ntpdate[22328]: no server suitable for synchronization found

 * Failed to set clock
```

der fehler wirt schon im howto beschrieben:

 *Quote:*   

> Hinweis (dieses Problem hat mich Stunden gekostet): Starte ich den NTP-Server und gleich danach den NTP-Client auf einem anderen Rechner, kann sich der Client nicht sofort die Zeit holen. Die Meldung 
> 
> ```
> no server suitable for synchronization found
> ```
> ...

 

hm, mitlerweile hab ich ihm mehr als genug zeit gelassen  aber es funktioniert auch so nicht.

was genau kan da noch faltsch sein ?

ich hoffe das ihr mir helfen könnt, wär echt nett  :Smile: 

Grüsse

Black

----------

## think4urs11

 *Blackburns_gentoo wrote:*   

> hm, mitlerweile hab ich ihm mehr als genug zeit gelassen  aber es funktioniert auch so nicht.
> 
> was genau kan da noch faltsch sein ?

 

was sagt denn ein ntpq -np auf dem Server? Solange da nicht in einer Zeile direkt vor der IP des Servers ein '*' steht ist dein Server noch nicht syncron und läßt sich dadurch auch noch nicht als Server nutzen.

----------

## Blackburns_gentoo

```
ntpq: read: Connection refused
```

O.o

Hilfe ?!?

au was hab ich hier faltsch gemachtg ??

Grüsse 

Black

----------

## TheSmallOne

Bist du sicher, dass der Server auch läuft?

Ansonsten: Hast du vielleicht irgendwelche IPTABLES-Regeln aktiv?

----------

## Blackburns_gentoo

Ich hab keine Friewall aktiv auf dem Server.

:/

Grüsse

Black

----------

