Ankündigung

Einklappen
Keine Ankündigung bisher.

NTP läuft nicht

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

    #31
    ok. gibt es bei Edomi die Möglichkeit die Systemzeit auch vom Bus zu bekommen, ähnlich wie beim HomeServer?
    Somit würde ich Zeit über meine Wetterstation aktuell halten und wäre nicht auf ntp angewiesen.

    Kommentar


      #32
      Nein. Sicher könnte man mit irgendwelchen LBSen dafür sorgen, aber ich rate dringend davon ab, denn EDOMI ist nicht darauf vorbereitet, dass sich Datum/Uhrzeit im laufenden Betrieb ändern. Dies würde zu einigen Problemen mit diversen Timer-Funktionen führen... NTP korrigiert vereinfacht gesagt nur sehr sachte (Drift) und damit rechnet EDOMI
      EDOMI - Intelligente Steuerung und Visualisierung KNX-basierter Elektro-Installationen (http://www.edomi.de)

      Kommentar


        #33
        OK, dann muss ich mal schauen wie stark die Abweichung über einen längeren Zeitraum ist und ggf. ein skript oder so schreiben für den abgleich inkl. der Hardware Uhr im Bios.

        Kommentar


          #34
          Hallo, was mich nur verwundert ist das ntpd keinen abgleich macht und das obwohl der server läuft. Noch nicht einmal von meine Fritzbox holt er sich den abgleich und da ist der NTP-Server aktiviert.
          Code:
          [root@edomi ~]# service ntpd stop
          ntpd beenden:                                              [  OK  ]
          [root@edomi ~]# service ntpd start
          ntpd starten:                                              [  OK  ]
          [root@edomi ~]# ntpq -p
           [root@edomi ~]# ntpq -p
               remote           refid      st t when poll reach   delay   offset  jitter
          ==============================================================================
           s1.vlns.de      .INIT.          16 u    -   64    0    0.000    0.000   0.000
           sircabirus.von- .INIT.          16 u    -   64    0    0.000    0.000   0.000
           pyxis.my-rz.de  .INIT.          16 u    -   64    0    0.000    0.000   0.000
           clients9.arcani .INIT.          16 u    -   64    0    0.000    0.000   0.000
           fritz.box       .INIT.          16 u    -   64    0    0.000    0.000   0.000
          [root@edomi ~]#
          auch wenn ich zuvor einen manuellen Abgleich anstoße bleibt das Ergebnis gleich.

          Kommentar


            #35
            Zitat von ChrisChros Beitrag anzeigen
            auch wenn ich zuvor einen manuellen Abgleich anstoße bleibt das Ergebnis gleich.
            Ich hatte diese Woche ein Vorkommnis auf einem Linux-Server, wo der NTP Service zwar lief und mit ntpq ebenfalls die Peers anzeigte, aber der Service war nicht ansprechbar. Ich konnte das Problem nicht lösen und im Log konnte ich keinen Hinweis entdecken, aber später wurde mir mitgeteilt, dass sich bei einem zentralen Konfig-Update ein Fehler in die Konfigurationsdatei eingeschlichen hatte, der später behoben wurde. Seither ist der Service wieder normal ansprechbar. Leider weiss ich nicht, was genau der Fehler war, mir war jedenfalls visuell nichts aufgefallen.
            Vielleicht hilft es dir auch, wenn du die Konfigdatei nochmals frisch aufbaust.

            EIB/KNX, VISU mit knxd + linknx + knxweb, Steuerbefehle via SMS und Email mit postfix + procmail

            Kommentar


              #36
              ok, könntest du mir mal deine config hochladen damit ich was zu vergleichen habe?
              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
              server 0.de.pool.ntp.org iburst
              server 1.de.pool.ntp.org iburst
              server 2.de.pool.ntp.org iburst
              server 3.de.pool.ntp.org iburst
              server 192.168.1.1 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
              Zuletzt geändert von ChrisChros; 25.02.2018, 11:10.

              Kommentar


                #37
                Bei mir sieht es so aus ...

                Code:
                [root@edomi ~]# cat /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
                server 10.0.10.1
                
                #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
                
                includefile /etc/ntp/crypto/pw
                
                # Key file containing the keys and key identifiers used when operating
                # with symmetric key cryptography. 
                keys /etc/ntp/keys
                Danke und LG, Dariusz
                GIRA | ENERTEX | MDT | MEANWELL | 24VDC LED | iBEMI | EDOMI | ETS5 | DS214+ | KNX/RS232-GW-ROTEL

                Kommentar


                  #38
                  Bei mir ist's so (dürften die Default-Einstellungen sein):

                  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
                  EDOMI - Intelligente Steuerung und Visualisierung KNX-basierter Elektro-Installationen (http://www.edomi.de)

                  Kommentar


                    #39
                    ok sieht ja irgendwie gleich aus bei allen.
                    Was gibt bei der Befehl
                    Code:
                     
                     ntpq -p
                    aus?

                    Kommentar


                      #40
                      Das hier:

                      Code:
                      [root@edomi ~]# ntpq -p
                      
                           remote           refid      st t when poll reach   delay   offset  jitter
                      
                      ==============================================================================
                      
                      *213.251.52.234  195.66.241.3     2 u  309 1024  377   38.393    2.513   0.656
                      
                      -mirror.datacent 192.53.103.104   2 u  250 1024  377  107.566   -7.279   1.213
                      
                      +bjaaland.ci.uv. 140.7.62.122     2 u  507 1024  377   41.852   -0.399   0.555
                      
                      +scott.red.uv.es 140.7.62.122     2 u  388 1024  377   65.466   -2.457   0.583
                      EDOMI - Intelligente Steuerung und Visualisierung KNX-basierter Elektro-Installationen (http://www.edomi.de)

                      Kommentar


                        #41
                        Code:
                        [root@edomi ~]# ntpq -p
                        
                             remote           refid      st t when poll reach   delay   offset  jitter
                        
                        ==============================================================================
                        
                        *10.0.10.1       129.27.2.6       2 u  154 1024  377    0.280    0.430   0.478
                        Danke und LG, Dariusz
                        GIRA | ENERTEX | MDT | MEANWELL | 24VDC LED | iBEMI | EDOMI | ETS5 | DS214+ | KNX/RS232-GW-ROTEL

                        Kommentar


                          #42
                          ok dann versteh ich es nun wirklich nicht warum ich nur Nullen angezeigt bekomme.
                          Wie kann ich denn nptd deinstallieren?

                          So ich habe jetzt mal ntpdate händisch gestartet und das scheint zu funktionieren.
                          Code:
                          [root@edomi ~]# ntpdate -d 0.de.pool.ntp.org
                          25 Feb 12:43:49 ntpdate[2013]: ntpdate 4.2.6p5@1.2349-o Mon Oct 26 15:32:20 UTC 2015 (1)
                          Looking for host 0.de.pool.ntp.org and service ntp
                          host found : radius2.noris.net
                          transmit(62.128.1.19)
                          receive(62.128.1.19)
                          transmit(62.128.1.19)
                          receive(62.128.1.19)
                          transmit(62.128.1.19)
                          receive(62.128.1.19)
                          transmit(62.128.1.19)
                          receive(62.128.1.19)
                          transmit(129.70.132.35)
                          receive(129.70.132.35)
                          transmit(129.70.132.35)
                          receive(129.70.132.35)
                          transmit(129.70.132.35)
                          receive(129.70.132.35)
                          transmit(129.70.132.35)
                          receive(129.70.132.35)
                          transmit(88.198.12.78)
                          receive(88.198.12.78)
                          transmit(88.198.12.78)
                          receive(88.198.12.78)
                          
                          25 Feb 12:43:50 ntpdate[2013]: 88.198.12.78 rate limit response from server.
                          transmit(176.9.1.211)
                          receive(176.9.1.211)
                          transmit(176.9.1.211)
                          receive(176.9.1.211)
                          
                          25 Feb 12:43:50 ntpdate[2013]: 176.9.1.211 rate limit response from server.
                          server 62.128.1.19, port 123
                          stratum 2, precision -23, leap 00, trust 000
                          refid [62.128.1.19], delay 0.03352, dispersion 0.00008
                          transmitted 4, in filter 4
                          reference time:    de3d1cba.c38c2a8f  Sun, Feb 25 2018 12:30:02.763
                          originate timestamp: de3d1ff5.c2994df7  Sun, Feb 25 2018 12:43:49.760
                          transmit timestamp:  de3d1ff5.f0f51e1c  Sun, Feb 25 2018 12:43:49.941
                          filter delay:  0.03462  0.03398  0.03352  0.03432
                                   0.00000  0.00000  0.00000  0.00000
                          filter offset: -0.18513 -0.18553 -0.18544 -0.18548
                                   0.000000 0.000000 0.000000 0.000000
                          delay 0.03352, dispersion 0.00008
                          offset -0.185449
                          
                          server 129.70.132.35, port 123
                          stratum 2, precision -23, leap 00, trust 000
                          refid [129.70.132.35], delay 0.04439, dispersion 0.00031
                          transmitted 4, in filter 4
                          reference time:    de3d1fca.0865724e  Sun, Feb 25 2018 12:43:06.032
                          originate timestamp: de3d1ff6.00134a53  Sun, Feb 25 2018 12:43:50.000
                          transmit timestamp:  de3d1ff6.2ce1e49d  Sun, Feb 25 2018 12:43:50.175
                          filter delay:  0.04607  0.04517  0.04504  0.04439
                                   0.00000  0.00000  0.00000  0.00000
                          filter offset: -0.18388 -0.18427 -0.18407 -0.18446
                                   0.000000 0.000000 0.000000 0.000000
                          delay 0.04439, dispersion 0.00031
                          offset -0.184469
                          
                          server 88.198.12.78, port 123
                          stratum 2, precision -23, leap 00, trust 000
                          refid [88.198.12.78], delay 0.03543, dispersion 56.00000
                          transmitted 2, in filter 1
                          reference time:    de3d1d41.8425a7de  Sun, Feb 25 2018 12:32:17.516
                          originate timestamp: de3d1ff6.226d46e3  Sun, Feb 25 2018 12:43:50.134
                          transmit timestamp:  de3d1ff6.533ea7f0  Sun, Feb 25 2018 12:43:50.325
                          filter delay:  0.03543  0.00000  0.00000  0.00000
                                   0.00000  0.00000  0.00000  0.00000
                          filter offset: -0.18571 0.000000 0.000000 0.000000
                                   0.000000 0.000000 0.000000 0.000000
                          delay 0.03543, dispersion 56.00000
                          offset -0.185715
                          
                          server 176.9.1.211, port 123
                          stratum 3, precision -24, leap 00, trust 000
                          refid [176.9.1.211], delay 0.03584, dispersion 56.00000
                          transmitted 2, in filter 1
                          reference time:    de3d1da1.1c6c156e  Sun, Feb 25 2018 12:33:53.111
                          originate timestamp: de3d1ff6.55b04b50  Sun, Feb 25 2018 12:43:50.334
                          transmit timestamp:  de3d1ff6.86a12206  Sun, Feb 25 2018 12:43:50.525
                          filter delay:  0.03584  0.00000  0.00000  0.00000
                                   0.00000  0.00000  0.00000  0.00000
                          filter offset: -0.18598 0.000000 0.000000 0.000000
                                   0.000000 0.000000 0.000000 0.000000
                          delay 0.03584, dispersion 56.00000
                          offset -0.185989
                          
                          25 Feb 12:43:50 ntpdate[2013]: adjust time server 62.128.1.19 offset -0.185449 sec
                          [root@edomi ~]#
                          Auch wenn ich als Server die IP der Fritzbox eingebe klappt der abgleich.
                          Damit ist auch klar das ich kein Firewall Problem habe denn der UDP port 123 ist erreichbar.
                          Aber woran kann es noch liegen?
                          Zuletzt geändert von ChrisChros; 25.02.2018, 12:52.

                          Kommentar


                            #43
                            Also wie hier schon gesagt, wenn deine Uhr zu schnell wegdriftet wird dir ntpd die Uhr nicht stellen. -> HW Problem

                            Das ntpdate nicht funktioniert, liegt daran das ntpd läuft und den Port benutzt. ntpd stoppen dann klappts auch mit ntpdate.
                            ntpdate stellt aber nur bei der Ausführung die Uhr. ntpd korrigiert die Uhr über die Soft-PLL des Kernels (schneller,langsamer) bis sie möglichst wenig drift hat. D.h. deine Uhr ist streng monoton. Wenn du mit ntpdate die Uhrzeit korrigierst kann es passieren das deine Uhrzeit auch mal rückwärts läuft, was dir manche Programme übel nehmen.

                            Wenn du's genau wissen möchtest, in die ntp.conf 'logfile /var/log/ntpd.log' o.ä. eintragen und den ntpd neu starten. Dann findest du im konfigurierten logfile vielleicht einen Hinweis auf die Ursache.

                            Kommentar


                              #44
                              Ich habe irgendwo gelesen das ntpd bis max. 1000 sek abgleichen kann und davon bin ich noch lange weg. Aktuell bin ich so bei 10 sek Abweichung in 7 Tagen.

                              Aber selbst wenn ich zuerst den service ntpd stoppe und dann ntpdate ausführe bekomme ich die Meldung "no servers can be used, exiting".

                              Aber das mit dem logfile ist ein guter Hinweis, werde ich Mal einrichten.

                              Gruß Christian
                              Zuletzt geändert von ChrisChros; 03.03.2018, 08:00.

                              Kommentar


                                #45
                                Ja ntpd wird deine Uhr nur dann stellen wenn sie weniger als 1000 Sekunden von der ntp zeit weg ist. Ntpd versucht aber deine Uhr anzupassen (Frequenz) das passiert über die Soft PLL des Kernels. Wenn das nicht klappt, weil dein Systemtakt nicht passt, wird ntpd gar nichts tun.

                                Die Meldung "no servers can be used" heißt normalerweise das die Server die erreicht werden können nicht 'gut' genug sind oder nicht erreichbar

                                Kommentar

                                Lädt...
                                X