View previous topic :: View next topic |
Author |
Message |
3PO Veteran


Joined: 26 Nov 2006 Posts: 1110 Location: Schwabenländle
|
Posted: Sat Nov 17, 2012 2:51 pm Post subject: Wie ntp-client beim Systemstart starten? |
|
|
Hallo Zusammen,
wie kann ich ntp-client beim Systemstart starten lassen?
ntp-client ist im Runlevel "default",
Code: | server ~ # rc-update |grep ntp-client
ntp-client | default
server ~ # |
jedoch bekomme ich beim Systemstart folgenden Fehler.
rc.log:
Code: | * Setting clock via the NTP client 'ntpdate' ...
Error resolving 0.gentoo.pool.ntp.org: Name or service not known (-2)
Error resolving 1.gentoo.pool.ntp.org: Name or service not known (-2)
Error resolving 2.gentoo.pool.ntp.org: Name or service not known (-2)
Error resolving 3.gentoo.pool.ntp.org: Name or service not known (-2)
* Failed to set clock
[ !! ]
* ERROR: ntp-client failed to start |
Wenn das Systen "up" ist, lässt sich ntp-client anstandslos starten.
Code: | server ~ # /etc/init.d/ntp-client start
* Setting clock via the NTP client 'ntpdate' ... |
Hat Jemand eine Idee, wie man dieses Problem lösen kann? |
|
Back to top |
|
 |
py-ro Veteran


Joined: 24 Sep 2002 Posts: 1734 Location: Velbert
|
Posted: Sat Nov 17, 2012 3:12 pm Post subject: |
|
|
Hast du an den Abhängigkeiten rum gespielt? Es sieht so aus als ob noch keine Netzwerkverbindung besteht und er deswegen die Namen nicht auflösen kann. |
|
Back to top |
|
 |
3PO Veteran


Joined: 26 Nov 2006 Posts: 1110 Location: Schwabenländle
|
Posted: Sat Nov 17, 2012 3:17 pm Post subject: |
|
|
py-ro wrote: | Hast du an den Abhängigkeiten rum gespielt? .... |
Nein habe ich nicht.
Code: | server ~ # cat /etc/init.d/ntp-client
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntp-client.rc,v 1.11 2007/03/09 17:24:28 vapier Exp $
depend() {
before cron portmap
need net
use dns logger
}
checkconfig() {
if ! type "${NTPCLIENT_CMD}" >/dev/null 2>/dev/null ; then
eerror "Please edit /etc/conf.d/ntp-client"
eerror "Unable to locate the client command ${NTPCLIENT_CMD}!"
return 1
fi
if [ -z "${NTPCLIENT_OPTS}" ] ; then
eerror "Please edit /etc/conf.d/ntp-client"
eerror "I need to know what server/options to use!"
return 1
fi
return 0
}
start() {
checkconfig || return $?
ebegin "Setting clock via the NTP client '${NTPCLIENT_CMD}'"
"${NTPCLIENT_CMD}" ${NTPCLIENT_OPTS}
eend $? "Failed to set clock"
}
server ~ #
|
|
|
Back to top |
|
 |
Hollowman Guru

Joined: 19 Apr 2007 Posts: 584
|
Posted: Sat Nov 17, 2012 4:21 pm Post subject: |
|
|
Hi
Kann es sein das du Networkmanager benutzt?
Sebastian |
|
Back to top |
|
 |
3PO Veteran


Joined: 26 Nov 2006 Posts: 1110 Location: Schwabenländle
|
Posted: Sat Nov 17, 2012 4:25 pm Post subject: |
|
|
Nein, Networkmanager wird nicht benutzt. |
|
Back to top |
|
 |
demiurg Tux's lil' helper

Joined: 26 Jul 2005 Posts: 111
|
Posted: Sat Nov 17, 2012 5:50 pm Post subject: Wie ntp-client beim Systemstart starten? |
|
|
http://en.gentoo-wiki.com/wiki/NTP weiter unter Kapitel setting time at boot
Beim aktuellen stable ntp-4.2.6_p5-r1, welches auch bei mir installiert ist, ist ntpdate als deprecated gekennzeichnet. Meine Konfiguration
Code: | # /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="sntp"
# 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="-p \
0.gentoo.pool.ntp.org"
|
und
Code: |
# /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=""
|
für eine erfolgreiches syncronisieren. _________________ Kernel 6.xx-gentoo
GCC 14.xx
default/linux/amd64/23.0/desktop/plasma/systemd (stable)
Ryzen 9950X
GA X670 AORUS ELITE AX BIOS FB3c
ATI RX6800 |
|
Back to top |
|
 |
Josef.95 Advocate

Joined: 03 Sep 2007 Posts: 4766 Location: Germany
|
Posted: Fri Nov 23, 2012 8:03 pm Post subject: |
|
|
3PO wrote: | Code: | depend() {
before cron portmap
need net
use dns logger
} |
|
Das wurde inzwischen geändert, nach Code: | depend() {
before cron portmap
after net
use dns logger
} |
Nimm am besten ein re-emerge von net-misc/ntp vor - danach sollte es passen.
Siehe dazu zb auch im Bug 439564 |
|
Back to top |
|
 |
Josef.95 Advocate

Joined: 03 Sep 2007 Posts: 4766 Location: Germany
|
Posted: Tue Nov 27, 2012 5:25 pm Post subject: |
|
|
/usr/portage/net-misc/ntp/ChangeLog wrote: | 11 Nov 2012; Mike Frysinger <vapier@gentoo.org> files/ntp-client.rc:
Change "need net" to "after net" #439564#5 by Diego Elio Pettenò. | Nur aus Interesse: Klappt es mit dem Änderungen im Initscript wirklich immer noch nicht? |
|
Back to top |
|
 |
3PO Veteran


Joined: 26 Nov 2006 Posts: 1110 Location: Schwabenländle
|
Posted: Tue Nov 27, 2012 6:05 pm Post subject: |
|
|
Josef.95 wrote: | Nur aus Interesse: Klappt es mit dem Änderungen im Initscript wirklich immer noch nicht? |
Mittlerweile funktioniet es, leider aber weiss ich nicht mehr genau, welche Änderung nun wirklich das Problem gefixt hat...  |
|
Back to top |
|
 |
toralf Developer


Joined: 01 Feb 2004 Posts: 3943 Location: Hamburg
|
Posted: Sat Dec 01, 2012 9:45 pm Post subject: |
|
|
"need net" habe ich auch (noch) - und bei mir läufts.
Aber die Fehlermeldung weist eindeutig auf fehlende Namesnauflösung hin, evtl. auch ein timing-problem, wo das Netzwerkscript schon ein ok zurückmeldet, aber der Verbindungsaufbau doch noch nicht für alle Interface abgeschlossen ist ? |
|
Back to top |
|
 |
|