Ankündigung

Einklappen
Keine Ankündigung bisher.

NTP läuft nicht

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    NTP läuft nicht

    habe nun einige ZSU im Einsatz und stelle fest daß diese immer weiter abweichen von meiner Funkuhr...

    habe nun mal per ntpstat geschaut mit folgendem Ergebnis:

    Code:
    unsynchronised
      time server re-starting
       polling server every 8 s
    da scheint was nicht zu laufen, nur bevor ich da nun ohne Fachwissen weiter rumexperimentiere: Wo/Wie kann ich den NTP Dienst wieder zum laufen bekommen um wieder eine korrekte Systemzeit zu bekommen?
    Gruß
    Andi

    #2
    Edomi kann ins Internet?

    Kommentar


      #3
      ja... ping von webseiten geht und auch download von Webseiten...
      Gruß
      Andi

      Kommentar


        #4
        hat mir keiner irgendeinen Hinweis wo ich suchen könnte / was hier ursächlich sein könnte?
        Gruß
        Andi

        Kommentar


          #5
          also ich hab nun mit ntpq -pn auch nochmal geschaut:

          Code:
               remote           refid      st t when poll reach   delay   offset  jitter
          ==============================================================================
           85.255.214.66   .INIT.          16 u    - 1024    0    0.000    0.000   0.000
           80.241.208.120  .INIT.          16 u    - 1024    0    0.000    0.000   0.000
           46.235.112.25   .INIT.          16 u    - 1024    0    0.000    0.000   0.000
           129.250.35.250  .INIT.          16 u    - 1024    0    0.000    0.000   0.000
          die IP's lassen sich alle anpingen, irgendwie kommt aber trotzdem keine Verbindung zustande?!
          Gruß
          Andi

          Kommentar


            #6
            Trag mal die IP von deinem Router ein. Der ist typischerweise auch ein Ntp Server.
            Bzw. Schau mal ob der gesynct ist.

            Kommentar


              #7
              Wo muss ich die IP ändern? In der /etc/ntp.conf? Diese sieht bei mir so aus:

              Code:
              # For more information about this file, see the man pages
              # ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).
              
              driftfile /var/lib/ntp/drift
              
              # 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 of
              # the administrative functions.
              restrict 127.0.0.1
              restrict -6 ::1
              
              # Hosts on local network are less restricted.
              #restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
              
              # 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 iburst
              server 1.centos.pool.ntp.org iburst
              server 2.centos.pool.ntp.org iburst
              server 3.centos.pool.ntp.org iburst
              
              #broadcast 192.168.1.255 autokey    # broadcast server
              #broadcastclient            # broadcast client
              #broadcast 224.0.1.1 autokey        # multicast server
              #multicastclient 224.0.1.1        # multicast client
              #manycastserver 239.255.254.254        # manycast server
              #manycastclient 239.255.254.254 autokey # manycast client
              
              # Enable public key cryptography.
              #crypto
              
              includefile /etc/ntp/crypto/pw
              
              # 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
              
              # Enable writing of statistics records.
              #statistics clockstats cryptostats loopstats peerstats
              Irgendwie kommt mir hier der Eintrag

              Code:
              restrict -6 ::1
              sehr komisch vor. Muss das so sein? Und nachdem ich mal die 4 Adressen (centos ntp Server 0-3) oben angepingt habe muss ich feststellen daß das ganz andere IP Adressen sind. Gibt es da irgendwo noch eine weitere ntp config?

              Und: Wie kann ich den ntpd wieder (re)starten? Hab mal folgendes probiert, da kommt aber auch nur eine Fehlermeldung:

              Code:
              /etc/rc.d/init.d$ ntpd start
              ntpd: Command line arguments not allowed
              ntpd - NTP daemon program - Ver. 4.2.6p5
              USAGE:  ntpd [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
              einen Neustart des EDOMI Rechners habe ich auch schon gemacht (da ich in der Hilfe den Hinweis fand daß bei jedem Neustart ein Datum/Zeitabgleich erfolgt), ohne Erfolg...

              Ich komm da irgendwie nicht weiter...
              Zuletzt geändert von tger977; 19.02.2017, 10:48. Grund: Hinweis auf Rechnerneustart ergänzt
              Gruß
              Andi

              Kommentar


                #8
                Bei mir sieht das wie folgt aus:

                Code:
                [root@edomi ~]# ntpq -pn
                     remote           refid      st t when poll reach   delay   offset  jitter
                ==============================================================================
                +193.170.62.252  131.188.3.222    2 u   41   64  377   10.544    1.296   0.438
                +91.206.8.70     131.130.251.107  2 u   39   64  377   10.895    0.172   0.822
                *86.59.80.170    131.130.251.107  2 u   41   64  377   10.656    1.414   0.723
                -80.121.153.136  192.168.103.104  3 u   40   64  377   10.306   -2.723   1.141

                Code:
                [root@edomi ~]# ps -ef |grep ntp
                ntp       1212     1  0 13:40 ?        00:00:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
                root      2053  1877  0 13:52 pts/1    00:00:00 grep ntp

                Code:
                [root@edomi ~]# more /etc/ntp.conf
                # For more information about this file, see the man pages
                # ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).
                
                driftfile /var/lib/ntp/drift
                
                # 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 of
                # the administrative functions.
                restrict 127.0.0.1
                restrict -6 ::1
                
                # Hosts on local network are less restricted.
                #restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
                
                # 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 iburst
                server 1.centos.pool.ntp.org iburst
                server 2.centos.pool.ntp.org iburst
                server 3.centos.pool.ntp.org iburst
                
                #broadcast 192.168.1.255 autokey        # broadcast server
                #broadcastclient                        # broadcast client
                #broadcast 224.0.1.1 autokey            # multicast server
                #multicastclient 224.0.1.1              # multicast client
                #manycastserver 239.255.254.254         # manycast server
                #manycastclient 239.255.254.254 autokey # manycast client
                
                # Enable public key cryptography.
                #crypto
                
                includefile /etc/ntp/crypto/pw
                
                # 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
                
                # Enable writing of statistics records.
                #statistics clockstats cryptostats loopstats peerstats


                Diese 4 Server kannt anpingen? Also z.B.:

                Code:
                [root@edomi ~]# ping 0.centos.pool.ntp.org
                PING 0.centos.pool.ntp.org (91.206.8.70) 56(84) bytes of data.
                64 bytes from fetchmail.mediainvent.at (91.206.8.70): icmp_seq=1 ttl=57 time=11.7 ms
                64 bytes from fetchmail.mediainvent.at (91.206.8.70): icmp_seq=2 ttl=57 time=11.4 ms

                Kommentar


                  #9
                  ja, die Server kann ich alle 4 anpingen...

                  Code:
                  [root@edomi ~]# ping 0.centos.pool.ntp.org
                  PING 0.centos.pool.ntp.org (5.9.110.236) 56(84) bytes of data.
                  64 bytes from alpha.rueckgr.at (5.9.110.236): icmp_seq=1 ttl=58 time=25.1 ms
                  64 bytes from alpha.rueckgr.at (5.9.110.236): icmp_seq=2 ttl=58 time=24.2 ms
                  64 bytes from alpha.rueckgr.at (5.9.110.236): icmp_seq=3 ttl=58 time=24.3 ms
                  64 bytes from alpha.rueckgr.at (5.9.110.236): icmp_seq=4 ttl=58 time=24.1 ms
                  64 bytes from alpha.rueckgr.at (5.9.110.236): icmp_seq=5 ttl=58 time=23.6 ms
                  64 bytes from alpha.rueckgr.at (5.9.110.236): icmp_seq=6 ttl=58 time=24.5 ms
                  64 bytes from alpha.rueckgr.at (5.9.110.236): icmp_seq=7 ttl=58 time=24.2 ms
                  64 bytes from alpha.rueckgr.at (5.9.110.236): icmp_seq=8 ttl=58 time=24.0 ms
                  64 bytes from alpha.rueckgr.at (5.9.110.236): icmp_seq=9 ttl=58 time=24.1 ms
                  ^C
                  --- 0.centos.pool.ntp.org ping statistics ---
                  9 packets transmitted, 9 received, 0% packet loss, time 8267ms
                  rtt min/avg/max/mdev = 23.688/24.295/25.180/0.383 ms
                  und ntp Prozess scheint auch zu laufen:
                  Code:
                  /[root@edomi ~]# ps -ef | grep ntp
                  ntp       1498     1  0 Feb18 ?        00:00:01 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
                  root     24992 22823  0 14:48 pts/1    00:00:00 grep ntp
                  erstaunlicherweise geht nun ntpq -pn auch nicht mehr:
                  Code:
                  [root@edomi ~]# ntpq -pn
                  
                  ntps::1: timed out, nothing received
                  ***Request timed out
                  ntpstat bringt immernoch dasselbe Ergebnis wie oben.

                  Gruß
                  Andi

                  Kommentar


                    #10
                    ntpstat sollte übrigens wie folgt aussehen:

                    Code:
                    [root@edomi ~]# ntpstat
                    synchronised to NTP server (86.59.80.170) at stratum 3
                       time correct to within 58 ms
                       polling server every 1024 s
                    Es sieht für mich so aus als dürftest du mit NTP nicht ins Internet.
                    Hast du andere Geräte welche NTP Clients installiert haben? Funktioniert es dort?
                    Du könntest auch mal zusätzlich zu den 4 Servern deine Router-IP hinzufügen (falls dein Router NTP-Server spielt).

                    Kommentar


                      #11
                      Es gibt durchaus Router, die per Default den NTP-Verkehr unterbinden - z.B. einige Telekom-Router. Dies würde ich mal als Erstes prüfen, kann nicht schaden
                      EDOMI - Intelligente Steuerung und Visualisierung KNX-basierter Elektro-Installationen (http://www.edomi.de)

                      Kommentar


                        #12
                        Der Eintrag "fritz.box" (nutze eine Fritzbox 7390) hat leider auch keine Abhilfe gebracht. Steht genauso auf INIT...

                        Mit "ntpdate -u pool.ntp.org" geht es zumindest den Zeitabgleich einmalig zu erreichen (280s war das System nun schon "weg"), d.h. es muss wohl tatsächlich irgendwo der UDP Port 123 geblockt sein. Muss man da ggf. was in der Fritzbox konfigurieren?

                        ohne Parameter -u geht es schief und es scheint der NTP Port belegt zu sein:

                        Code:
                        /etc$ ntpdate pool.ntp.org
                        19 Feb 20:15:37 ntpdate[5564]: the NTP socket is in use, exiting
                        Wie bekomme ich raus wer den socket nutzt?




                        Gruß
                        Andi

                        Kommentar


                          #13
                          Zitat von gaert Beitrag anzeigen
                          Es gibt durchaus Router, die per Default den NTP-Verkehr unterbinden - z.B. einige Telekom-Router. Dies würde ich mal als Erstes prüfen, kann nicht schaden
                          wie kann ich das bei einer Fritzbox prüfen?
                          Gruß
                          Andi

                          Kommentar


                            #14
                            Zitat von tger977 Beitrag anzeigen

                            wie kann ich das bei einer Fritzbox prüfen?
                            Die Fritz lässt NTP durch !
                            if you make something idiot-proof, they start making better idiots......
                            KNX:3 Linien,121 Teiln.,Siemens N146 und N350E,RasPi mit SV,8 FBH-Kreise mit Siemens HK-Regler,HS4, Haus ohne öffentl. Wasser-/Stromversorg.,PV-Anlage Wechselrichter:SI5048(8kW, 24 Pufferbatterien 1400Ah),PV-Module mit 7,5kWp

                            Kommentar


                              #15
                              ok, danke für die Info. Ich habe vor ca. 3 Monaten mal die Fritzbox ausgetauscht, kann es vielleicht daran liegen?
                              Gruß
                              Andi

                              Kommentar

                              Lädt...
                              X