• ベストアンサー

NTPサーバと同期しないんです。

皆様こんばんは。Linux初心者です。宜しくお願い致します。 NTPサーバと同期が取れなくて困っています。 OS:CentOS 3.8 /etc/ntp.confの設定箇所は下記のみです。 #server 127.127.1.0 ←コメントアウト # local clock #fudge 127.127.1.0 stratum 10 ←コメントアウト server xxx.xxx.xxx.xxx ←プロバイダNTPサーバのIPアドレス ntpq -pで、設定したNTPサーバは表示されるのですが、1時間 経っても同期しません。ntpdateは行いました。ファイアウォール 設定は無しです。 どうかご教授お願い致します。

質問者が選んだベストアンサー

  • ベストアンサー
  • nazo-nazo
  • ベストアンサー率39% (17/43)
回答No.3

>ntpdateは行いました。ファイアウォール >設定は無しです。 ntpupdateで同期がしっかり取れているのであれば、NTPの設定がおかしいかと思います。 念のため、もう一度、ntpプロセスを一時停止させ、わざと時間をずらしntpupdateコマンドなどを実施してみてはいかがでしょうか?

noname#64639
質問者

補足

お返事ありがとうございます。一度アドバイス頂いた通りに やってみます。

全文を見る
すると、全ての回答が全文表示されます。

その他の回答 (2)

  • entree
  • ベストアンサー率55% (405/735)
回答No.2

ADSL 等の環境で使用している場合は NTP が使えるようになっているかどうか、BB ルーターの設定を見直すなどしてみてください。NTP は TCP を使用するのではなく UDP を使用するので、ポートがブロックされている可能性が無いとは言えません。 あと、サーバは time-nw.nist.gov がお勧めですが、その前にポリシーを確認してみてください。(参考 URL -> Public Time Server Lists)

参考URL:
http://www.ntp.org/
noname#64639
質問者

補足

お返事ありがとうございます。回線はBフレの光プレミアムで、 ルータの設定はTCP・UDP共に123番ポートは空けてあります。 設定はこれで宜しいんですよね?以前Vine Linuxを入れていた時は 問題なくできていたのですが・・・。

全文を見る
すると、全ての回答が全文表示されます。
  • mtfoggy
  • ベストアンサー率14% (37/255)
回答No.1

とりあえず、ログファイルを確認してみては?

noname#64639
質問者

補足

早速のアドバイスありがとうございます。ログを見ました。とりあえず 正常に起動はしていて、その後の読み方が分かりません・・・ Oct 19 19:06:39 localhost ntpd: ntpd startup succeeded Oct 19 19:06:39 localhost ntpd[1248]: precision = 12 usec Oct 19 19:06:39 localhost ntpd[1248]: kernel time discipline status 0040 Oct 19 19:06:39 localhost ntpd[1248]: frequency initialized 0.000 from /var/lib/ntp/drift どういう事でしょうか・・・。

全文を見る
すると、全ての回答が全文表示されます。

関連するQ&A

  • NTPサーバ時刻同期の設定を教えて下さい

    FreeBSD6.1 にて NTPサーバを作成しています。 server1(FreeBSD6.1) 192.168.100.1 router1 192.168.100.2(server1側) 192.168.200.2(client側) client1(windows2000) 192.168.200.1 ntp.confは server 133.100.9.2 server 127.127.1.0 fudge 127.127.1.0 stratum 10 driftfile /var/db/ntp.drift restrict default ignore restrict 133.100.9.2 nomodify noquery notrap restrict 127.0.0.0 mask 255.0.0.0  restrict 192.168.100.0 mask 255.255.255.0 notrust nomodify noquery restrict 192.168.200.0 mask 255.255.255.0 notrust nomodify noquery rc.confには xntpd_enable="YES" xntpd_program="/usr/sbin/ntpd" xntpd_flags="-p /var/run/ntpd.pid -c /etc/ntp/ntp.conf" ntpdate_enable="YES" ntpdate_program="/usr/sbin/ntpdate" ntpdate_flags="clock.nc.fukuoka-u.ac.jp" 現在server1 を clock.nc.fukuok で時刻同期は ntpq -p にて確認し、 remote refid St *clock.nc.fukuok .GPS. 1 LOCAL(0) LOCAL(0) 10 *印がついているので外部NTPサーバとは同期がとれているように思えます。 ipfilterは使用していません。 client1(windows2000)より net time /setsntp:192.168.200.1 をしてコマンド正常終了を確認。server1とclient1の時刻誤差は12時間以内です。ping 192.168.200.1はOKです。 最初に一回だけ同期を合せようと net time \\192.168.200.1 /set /yes を行うと システムエラー53が発生。 ネットワークパスが見つかりません。と表示されました。 あとは、 client1で w32tm -once を行うと、 sending to server 48byte で止まります。 桜時計などで外部とのNTPサーバとは同期が取れます。 FreeBSDとwindowsを同期させるにはなにかFreeBSD側にソフトをインストールする必要があるのでしょうか?それとも設定がおかしいのでしょうか? すみませんが教えて下さい。

  • NTPで同期が始まらない

    こんにちは。 度々すみません、NTPの設定をしましたがどうも同期が始まりません。 「ntpdate 130.69.251.23」と手動同期は成功します。 しかしntpデーモンを起動し1時間以上放置しても同期されません。 ※外部タイムサーバー参照としてます ntp.confは下記のとおりです。 --------------------------------------------------- server 133.100.9.2 # clock.nc.fukuoka-u.ac.jp server 130.69.251.23 driftfile /var/lib/ntp/drift --------------------------------------------------- でntpq -pの結果は下記となります。 remote refid st t when poll reach delay offset jitter ============================================================================== 133.100.9.2 .INIT. 16 u - 64 0 0.000 0.000 4000.00 130.69.251.23 .GPS. 1 u 27 64 377 8.015 -99970. 17262.6 同期ができれば「remote」列に「*」が表示されると思っています。 何か設定が足りないでしょうか?。 尚、「/vat/log/message」をtailしてますが特にエラーは無さそうです。 よろしくお願いします。

  • NTPサーバについて教えてください

    RedHat Enterprise Linux ES4のサーバを社内LAN上でNTPサーバとして構築し、外部のNTPサーバと時刻同期ができるところまでは確認できましたが、社内LAN上の他のサーバ(Windows及びLinux)やPC(XP Pro)から時刻同期を行おうとしても、「時刻データが利用できなかったため、コンピュータは同期を取り直しませんでした」というメッセージが出て時刻同期ができません。 ntp.confの内容は、 ------------------------- server xxx.xxx.xxx.xxx 外部NTPサーバ restrict default ignore restrict 127.0.0.1 restrict 192.168.0.0 mask 255.255.0.0 nomodify notrap notrust # server 127.127.1.0 # fudge 127.127.1.0 stratum 10 driftfile /etc/ntp.drift #multicastclient # listen on default 224.0.1.1 #broadcastdelay 0.008 authenticate no --------------------- のような感じです。 社内LANのIPアドレスは、192.168.10体系と192.168.11体系です。 このNTPサーバに対して、他のサーバやPCからはpingはOKで、間にfirewallが入っていたりルータが入っていたりすることはありません。 ntp.confの設定がまずいのか、RedHatのFirewallのせいか、それとも他の設定が何かあるのか、皆目見当がつきません。 どうしたらよいのか、どこか確認すべき項目はないか、などアドバイス頂ければ助かります。 よろしくお願い致します。

  • NTPサーバについて

    Solaris10のSPARK版でNTPサーバを作りたいのですが 今、/etc/inet/ntp.serverをコピーし/etc/inetntp.confを作りファイルの中を書き換えました。 restrict default nomodify notrap noquery server 133.40.41.175 server 130.69.251.23 server 127.127.1.0 fudge 127.127.1.0 stratum 10 #broadcast 224.0.1.1 ttl 4 #enable auth monitor driftfile /var/ntp/ntp.drift #statsdir /var/ntp/ntpstats/ #filegen peerstats file peerstats type day enable #filegen loopstats file loopstats type day enable #filegen clockstats file clockstats type day enable #keys /etc/inet/ntp.keys #trustedkey 0%) #requestkey 0%) #controlkey 0%) restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap logfile /var/log/ntp 同期が取れているか確認のコマンドを打つと # ntpq -p localhost: timed out, nothing received ***Request timed out となってしまいます。 何が原因なのでしょうか? 何方かご教示下さい。 宜しくお願い致します。

  • Windows NTPをLinuxクライアントに公開したいのですが。。。

    こんにちは。 Windowsサーバ(2003)を立てているのですが、 Linuxの検証を行うために、NTPを提供したいと考えています。 URL[http://support.microsoft.com/kb/875424/ja]を参考にしながら設定を行ったところ、 Linuxから ntpdateは正常に動作するのですが、 ntpq -p を行ったところ、いつまで経っても同期してくれません remote refid st t when poll reach delay offset jitter ============================================================================== 192.168.1.1 xx.xx.xx.xx 2 u 30 64 377 0.214 1016.96 13.272 xx.xx.xx.xxは外部のNTPサーバです。 これで、先頭に *も+もつかない状態です。 どなたかご助言いただけませんでしょうか。 /etc/ntp.conf #--------------- restrict default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery restrict 127.0.0.1 restrict -6 ::1 server 192.168.1.1 prefer # server 127.127.1.0 # local clock fudge 127.127.1.0 stratum 10 driftfile /var/lib/ntp/drift keys /etc/ntp/keys #--------------

  • NTPに関する質問です。長文ですが素人ですので、是非ご教示頂ければと思

    NTPに関する質問です。長文ですが素人ですので、是非ご教示頂ければと思います。 ・以下の環境でNTPでの時刻同期を計りたいのですが、うまく行きません。  NTPサーバ → OSはFedora Core 1  NTPクライアント → Solaris 10  1.NTPサーバでのntpデーモンは起動済み。  2.NTPクライアントでのntpデーモンは起動済み。  3.NTPサーバ、クライアント両方ともNTPポート開放設定済み。   # more /etc/services   ntp 123/tcp   ntp 123/udp # Network Time Protocol  4.NTPサーバの/etc/ntp.confは以下の内容。※コメント文は省略します。   # grep -v "#" ntp.conf   restrict default ignore   restrict 127.0.0.1   fudge 127.127.1.0 stratum 10   driftfile /var/lib/ntp/drift   broadcastdelay 0.008   authenticate yes   keys /etc/ntp/keys  5.NTPクライアントの/etc/inet/ntp.confは以下の内容。   # more /etc/inet/ntp.conf   server <NTPサーバのIPアドレス> prefer   # fudge 127.127.XType.0 stratum 0   # broadcast 224.0.1.1 ttl 4   enable auth monitor   driftfile /var/ntp/ntp.drift   #statsdir /var/ntp/ntpstats/   #filegen peerstats file peerstats type day enable   #filegen loopstats file loopstats type day enable   #filegen clockstats file clockstats type day enable   #keys /etc/inet/ntp.keys   #trustedkey 0   #requestkey 0   #controlkey 0  6.NTPクライアントの/etc/inet/ntp.serverは以下の内容。   # more /etc/inet/ntp.conf   server 127.127.XType.0   fudge 127.127.XType.0 stratum 0   broadcast 224.0.1.1 ttl 4   enable auth monitor   driftfile   statsdir /var/ntp/ntpstats/   filegen peerstats file peerstats type day enable   filegen loopstats file loopstats type day enable   filegen clockstats file clockstats type day enable   #keys /etc/inet/ntp.keys   trustedkey 0   requestkey 0   controlkey 0  7.NTPクライアントよりntpdateを実行すると、以下のエラーが出る。   # ntpdate <NTPサーバのIPアドレス>   22 Apr 11:26:29 ntpdate[705]: no server suitable for synchronization found  8.NTPクライアントよりsvcadmを実行しても、同様のエラーが出る。   # svcadm disable ntp   # ntpq -p   ntpq: read: Connection refused   # svcadm enable ntp   ※以下、/var/adm/messagesの内容   Apr 22 11:42:37 <NTPクライアントのホスト名> ntpdate[734]: [ID 831711 daemon.error] no server suitable for synchronization found  このエラーの原因が分かりません。どこに原因があるのか、是非教えてください。  よろしくお願い致します。

  • CentOSのNTP時刻同期エラー

    表題の通りCentOSのNTPサーバーエラーについて質問します。 状況 CentOSでNTPを使用していたのですが、気がついた時には NTPサーバーがエラーで止まっていました。  内容を確認してみると、/etc/ntp.confで設定している同期するサーバーと ntpq -p で確認するサーバーが違っている事に気が付きました。 このntpqコマンドで確認できるサーバーは、昔使っていた古いアドレスの物で 現在は使われていない為に今回のエラーになっていると考え、 設定されている場所を探したのですが、見つからなかった為、 yum erase ntp* で一旦全て削除して、 yum install ntp* で再インストールを 行いましたが、状態が変わりませんでした。 現在のntp.confの内容============================================== # Permit time synchronization with our time source, but do not # permit the source to query or modify the service on this system. #restrict default kod nomodify notrap nopeer noquery #restrict -6 default kod nomodify notrap nopeer noquery # Permit all access over the loopback interface. This could# be tightened as well, but to do so would effect some o f# the administrative functions.#restrict 127.0.0.1 #restrict -6 ::1 #ipv6 # Hosts on local network are less restricted. # Use public servers from the pool.ntp.org project. # Please consider joining the pool (http://www.pool.ntp.org/join.html). #server 0.centos.pool.ntp.org #server 1.centos.pool.ntp.org #server 2.centos.pool.ntp.org server 133.100.9.2 #clock.nc.fukuoka-u.ac.jp server 210.173.160.27 #ntp1.jst.mfeed.ad.jp server 202.224.32.4 #ntp.asahi-net.or.jp #broadcast 192.168.1.255 key 42 # broadcast server #broadcastclient # broadcast client #broadcast 224.0.1.1 key 42 # multicast server #multicastclient 224.0.1.1 # multicast client #manycastserver 239.255.254.254 # manycast server #manycastclient 239.255.254.254 key 42 # manycast client # Undisciplined Local Clock. This is a fake driver intended for backup # and when no outside source of synchronized time is available. #server 127.127.1.0 # local clock #fudge 127.127.1.0 stratum 10 # 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 /var/lib/ntp/drift # Key file containing the keys and key identifiers used when operating # with symmetric key cryptography. keys /etc/ntp/keys # Specify the key identifiers which are trusted. #trustedkey 4 8 42 # Specify the key identifier to use with the ntpdc utility. #requestkey 8 # Specify the key identifier to use with the ntpq utility. #controlkey 8 ======================================================== ntpq -p で確認した内容==================================== remote refid st t when poll reach delay offset jitter ============================================================================== clock.nc.fukuok .GPS. 1 u 45 64 1 25.585 22436.7 0.002 ntp1.jst.mfeed. 210.173.176.251 2 u 44 64 1 5.803 22465.5 0.002 orion.asahi-net 133.243.238.244 2 u 43 64 1 5.787 22495.2 0.002 ============================================================================== この時、/var/log/messageには何もログは表示されていません。 また、ntpdate -u -b clock.nc.fukuoka-u.ac.jp で強制的に時刻同期させると 以下のように時刻の同期ができます。 29 Sep 22:17:15 ntpdate[29572]: step time server 133.100.9.2 offset 27.863054 sec 以上の内容から、ntpq -p で表示されている古いサーバー情報がどこかに 残っている為に、今回のエラーになっていると思えるのですが、 自分では、どこに残っているのかがわからない為、 皆様のお知恵をお借りできれば幸いです。 宜しくお願い致します。

  • Cent OS上のntpサーバ同期不可について

    【環境】 ・CentOS release 5.8 (Final) ・ntp4.2.2p1-15.el5.centos.1 【事象】 ntpq -p投入後、以下エラー表示されます。 --------------------------- localhost.localdomain: timed out, nothing received ***Request timed out ---------------------------- 【設定済項目】 ◆ntp.conf restrict default ignore restrict 127.0.0.1 restrict 210.173.160.27 nomodify notrap #ntp1.jst.mfeed.ad.jp restrict 210.173.160.57 nomodify notrap #ntp2.jst.mfeed.ad.jp restrict 210.173.160.87 nomodify notrap #ntp3.jst.mfeed.ad.jp server ntp1.jst.mfeed.ad.jp server ntp2.jst.mfeed.ad.jp server ntp3.jst.mfeed.ad.jp server 127.127.1.0 # local clock fudge 127.127.1.0 stratum 10 driftfile /var/lib/ntp/drift keys /etc/ntp/keys ◆hosts.allow ALL: 210.173.160.27 ALL: 210.173.160.57 ALL: 210.173.160.87 ◆iptables Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT udp -- anywhere anywhere udp dpt:ntp Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination ◆/var/log/messages 特にエラー表示なし ◆service ntpd status ntpd (pid 22208) を実行中... ◆netstat udp 0 0 :::123 :::* ----------------------------------------------- ntpdの再起動をしても同現象です。 困っています。 宜しくお願い致します。

  • NTPによる時刻同期

    よろしくお願いします。NTPで同期ができなくて困っています。 当方、Windows2000サーバのWindowsTimeを使って内部NTPサーバを立てていますが、 この2000サーバに対してWindowsクライアントから同期をとると成功しますが、 Linuxクライアントからは失敗してしまいます。 ですが、このLinuxクライアントから外部の公開NTPサーバに対しては成功します。 W2K⇔Linuxの場合、特別な設定が必要なのでしょうか? ※失敗例 [root@hogehoge ~]# ntpdate -d 172.16.10.200 25 Sep 16:07:07 ntpdate[31987]: ntpdate 4.2.0a@1.1190-r Sun Aug 13 01:49:13 CDT 2006 (1) Looking for host 172.16.10.200 and service ntp host found : transmit(172.16.10.200) receive(172.16.10.200) transmit(172.16.10.200) receive(172.16.10.200) transmit(172.16.10.200) receive(172.16.10.200) transmit(172.16.10.200) receive(172.16.10.200) transmit(172.16.10.200) 172.16.10.200: Server dropped: Server has gone too long without sync server 172.16.10.200, port 123 stratum 2, precision -7, leap 00, trust 000 refid [172.16.10.200], delay 0.03358, dispersion 0.00031 transmitted 4, in filter 4 reference time: 00000000.00000000 Thu, Feb 7 2036 15:28:16.000 originate timestamp: caa3321b.c4189374 Tue, Sep 25 2007 16:07:07.766 transmit timestamp: caa3321b.a609edbf Tue, Sep 25 2007 16:07:07.648 filter delay: 0.03470 0.03358 0.03363 0.03363 0.00000 0.00000 0.00000 0.00000 filter offset: 0.118582 0.117779 0.117554 0.117305 0.000000 0.000000 0.000000 0.000000 delay 0.03358, dispersion 0.00031 offset 0.117779 25 Sep 16:07:07 ntpdate[31987]: no server suitable for synchronization found ※他のサーバでは成功しているし、Portも開放しているつもりです [root@hogehoge ~]# netstat -a -n | grep :123 udp 0 0 172.16.10.10:123 0.0.0.0:* udp 0 0 192.168.0.1:123 0.0.0.0:* udp 0 0 127.0.0.1:123 0.0.0.0:* udp 0 0 0.0.0.0:123 0.0.0.0:* udp 0 0 :::123 :::* ※ntp.conf [root@hogehoge etc]# cat ntp.conf # server 134.***.***.*** server 172.16.10.200 restrict default notrap nomodify noquery notrust noserve restrict 127.0.0.1 # restrict 172.16.0.0 mask 255.255.0.0 nopeer notrap nomodify restrict 172.16.10.200 mask 255.255.255.255 nopeer notrap nomodify restrict 134.160.82.20 mask 255.255.255.255 nopeer notrap nomodify server 127.127.1.0 fudge 127.127.1.0 stratum 11 driftfile /var/lib/ntp/drift disable auth ※このように、172.16.10.200はremoteの出力がありません。  なぜでしょうか・・・ [root@hogehoge etc]# ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== *ring.***.*** 134.***.***.*** 2 u 4 64 37 29.347 9.640 16.800 0.0.0.0 2 u 3 64 0 0.000 0.000 4000.00 LOCAL(0) LOCAL(0) 11 l 1 64 37 0.000 0.000 0.001 以上、よろしくお願いします

  • Solaris10でのNTPの設定

    いつも参考にさせてもらっております。 Solaris10でNTPの設定を行っております。 そこで、質問なのですが、ntp.confファイルにおいて、 server 111.111.111.111 prefer(stratum 5) server 222.222.222.222 (stratum 4) と記述しています。しかし、動かしてみると +111.111.111.111 *222.222.222.222 となってします。 stratumが異なるサーバと同期をとる際、低いほうを優先することはできないのでしょうか?

用紙受けが壊れた
このQ&Aのポイント
  • 用紙受けが破損したので、部品購入可能でしょうか?
  • お使いの環境はWindows10で、接続は無線LANです。
回答を見る