Всем здравствуйте!
Тема наверное не одн десяток раз уже рассматривалась, но у меня вот какая специфическая проблема.
Нужно синхронизировать время компьютера Linux (Mandriva-2007) с компьютером под Windows-XP SP3, закавыка в том что Windows-XP получает точное время со спутника помимо протокола NTP (сервис W32Time запущен), и когда Linux пытается провести синхронизацию времени то в ответ получает stratum=16 и синхронизация не проходит.
Вопрос - как можно провести синхронизацию не обращая внимания на stratum=16.
C уважением, жду ответа. Заранее спасибо.
Синхронизация времени
Насколько я понял, вы не смогли настроить сервер времени под Windows XP SP3? Тогда, вероятно, вам надо в техподдержку Microsoft обращаться.
Сервер времени Windows-XP работает нормально, я же объясняю - время на машине с Windows-XP обновляется не стандартным образом, поэтому сервер времени об этом ничего не знает и естественно сообщает всем к нему обратившимся , что он-де лет двести не синхронизировался нискем и по это причине отказывает им в этой самой синхронизации. Однако, если к этой машине с Windows-XP подключить другую Windows машину, то по досовской команде 'net time' синхронизация проходит успешно. Вот я и спрашиваю, есть ли в Linux-е подобная команда, которая не интересуется какой период не синхронизировался сервер времени к которому она обратилась?
Извиняюсь за столь пространное объяснение.
vip-888, samba?
Вот я и спрашиваю, есть ли в Linux-е подобная команда, которая не интересуется какой период не синхронизировался сервер времени к которому она обратилась?
examples:
ntpdate -b clock.example.org
Большое спасибо. К сожалению проверить смогу только в понедельник.
Не проходит синхронизация.
вывод покажите то что пишет? а так же ntpdc -c peers и ntpq -p, после того как написали ntpdate -b ваш_сервер_времени покажите вывод date и date -u
+--------------------------------------------------------------------------------------
[root@linux /]# ntpdate -b 10.0.0.50
Looking for host 10.0.0.50 and service ntp
host found : 10.0.0.50
11 May 11:46:11 ntpdate[12659]: the NTP socket is in use, exiting
[root@linux /]# date
Втр Май 11 11:54:43 YEKST 2010
[root@linux /]# date -u
Втр Май 11 05:54:50 UTC 2010
[root@linux /]#
+----------------------------------------------------------------------------------------
ntpdc -c peers и ntpq -p забыли?
11 May 11:46:11 ntpdate[12659]: the NTP socket is in use, exiting ??? это вам о чем нибудь говорит?
ntpdc -c peers
remote local st poll reach delay offset disp
=======================================================================
*LOCAL(0) 127.0.0.1 10 64 377 0.00000 0.000000 0.00093
и ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*LOCAL(0) LOCAL(0) 10 l 40 64 377 0.000 0.000 0.001
11 May 11:46:11 ntpdate[12659]: the NTP socket is in use, exiting ??? это вам о чем нибудь говорит?
Честно говоря весьма туманно. Я не совсем понял чем занимаются эти две команды, маны все на английском, а с языками мы не владеем, так в пределах boot... reboot...
у вас поднят демон ntpd который синхронизирует время, в то же время вы запускаете ntpdate, определитесь что вы хотите делать, или использовать ntpdate ли ntpd(как вариант лучше настроить ntpd) и все
Мне без разницы. Главное чтобы время было синхронизировано именно с этим компьютером.
А могу я как нибудь например сейчас убить ntpd чтоб хотя-бы попробовать ntpdate?
/etc/init.d/ntpd stop должно сработать :)
Не сработало :(
А при старте ntpd пытается синхронизироваться с каким-то pool.ntp.org. Нашёл два конфига от ntp /etc/ntp.conf и /etc/ntp/ntp.conf, который править?
покажите оба конфига, а вообще /etc/ntp.conf
manual:
Configuring NTP client
You need to edit the /etc/ntp.conf file you need to point the following settings to NTP server ip address
Server configuration settings
server 192.168.1.1
Restrict the type of access you allow these servers. In this example the servers are not allowed to modify the run-time configuration or query your Linux NTP server.
restrict default notrust nomodify nopeer
Localhost configuration
restrict 192.168.1.1
In this case the mask statement has been expanded to include all 255 possible IP addresses on the local network.
We also want to make sure that localhost (the universal IP address used to refer to a Linux server itself) has full access without any restricting keywords
restrict 127.0.0.1
Now you need to save and exit the file
run ntpdate command against your server
ntpdate 192.168.1.1
Этот лежал в /etc/ntp
+----------------------------------------------------------------------------------------------
#
# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available. The
# default stratum is usually 3, but in this case we elect to use stratum
# 0. Since the server line does not have the prefer keyword, this driver
# is never used for synchronization, unless no other other
# synchronization source is available. In case the local host is
# controlled by some external source, such as an external oscillator or
# another protocol, the prefer keyword would cause the local host to
# disregard all other synchronization sources, unless the kernel
# modifications are in use and declare an unsynchronized condition.
#
server 127.0.0.1 # local clock
fudge 127.0.0.1 stratum 10
server pool.ntp.org #pool.ntp.org
#server pool.ntp.org
#server pool.ntp.org
#server pool.ntp.org
#
# Drift file. Put this in a directory which the daemon can write to.
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
#
driftfile /etc/ntp/drift
multicastclient # listen on default 224.0.1.1
broadcastdelay 0.008
#
# Keys file. If you want to diddle your server at run time, make a
# keys file (mode 600 for sure) and define the key number to be
# used for making requests.
# PLEASE DO NOT USE THE DEFAULT VALUES HERE. Pick your own, or remote
# systems might be able to reset your clock at will.
#
#keys /etc/ntp/keys
#trustedkey 65535
#requestkey 65535
#controlkey 65535
#restrict default ignore
+------------------------------------------------------------------------------------------------
А этот просто в /etc
+------------------------------------------------------------------------------------------------
#
# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available. The
# default stratum is usually 3, but in this case we elect to use stratum
# 0. Since the server line does not have the prefer keyword, this driver
# is never used for synchronization, unless no other other
# synchronization source is available. In case the local host is
# controlled by some external source, such as an external oscillator or
# another protocol, the prefer keyword would cause the local host to
# disregard all other synchronization sources, unless the kernel
# modifications are in use and declare an unsynchronized condition.
#
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
server pool.ntp.org
#server pool.ntp.org
#server pool.ntp.org
#server pool.ntp.org
#
# Drift file. Put this in a directory which the daemon can write to.
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
#
driftfile /etc/ntp/drift
multicastclient # listen on default 224.0.1.1
broadcastdelay 0.008
#
# Keys file. If you want to diddle your server at run time, make a
# keys file (mode 600 for sure) and define the key number to be
# used for making requests.
# PLEASE DO NOT USE THE DEFAULT VALUES HERE. Pick your own, or remote
# systems might be able to reset your clock at will.
#
#keys /etc/ntp/keys
#trustedkey 65535
#requestkey 65535
#controlkey 65535
#restrict default ignore
+--------------------------------------------------------------------------------------------------
> А этот просто в /etc
server pool.ntp.org > server 10.0.0.50
#restrict default ignore > restrict 10.0.0.50
запустить ntpdate или ntpd
Спасибо, обязательно попробую, но уже завтра.
Поменял как написано
+-------------------------------------------------------------------------------------------------------
[root@linux ~]# /etc/init.d/ntpd restart
Останавливается ntpd: [ OK ]
Синхронизируется время для ntpd: Looking for host pool.ntp.org and service ntp
Error : Temporary failure in name resolution
[ СБОЙ ]
Запускается ntpd: [ OK ]
[root@linux ~]#
+--------------------------------------------------------------------------------------------------------
Всё равно лезет в какой то pool.ntp.org
Может второй конфиг совсем удалить?
Может второй конфиг совсем удалить?
попробуй его подправить