Ankündigung

Einklappen

Serverwartung 21.2.



Am 21.2. im Laufe des späten Abends wird eine Serverwartung durchgeführt. Das Forum ist dadurch für gut zwei Stunden nicht erreichbar.
Es wird eine Wartungsseite geschaltet.

Mehr anzeigen
Weniger anzeigen

Zeitproblem (kein Update durch NTPD + falsche Zeitzone) mit openHABianPi

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

    Zeitproblem (kein Update durch NTPD + falsche Zeitzone) mit openHABianPi

    Hallo zusammen,

    leider komme ich bei der Einrichtung von openHAB nicht weiter. Als Basis verwende ich der einfachheitshalber openHABianPi (Debian 8 (jessie) / Linux 4.9.35-v7+).

    Problem. Zum einen führt der ntp daemon nur beim Systemstart eine Zeit-Synchronisation durch, regelmäßige Zeitkorrekturen erfolgen nicht, zum anderen stimmt die Zeitzone im System nicht, gleichwohl diese laut Einstellungen korrekt auf Europe/Berlin eingestellt ist.

    Siehe hierzu:
    Code:
    [18:38:01] openhabian@openHABianPi:~$ sudo timedatectl
          Local time: Do 2017-07-13 18:39:51 UTC
      Universal time: Do 2017-07-13 18:39:51 UTC
            RTC time: n/a
           Time zone: Europe/Berlin ([COLOR=#FF0000]UTC, +0000[/COLOR])
         NTP enabled: yes
    NTP synchronized: no
     RTC in local TZ: no
          DST active: n/a
    Code:
    [18:36:24] openhabian@openHABianPi:~$ systemctl status ntp.service
    ● ntp.service - LSB: Start NTP daemon
       Loaded: loaded (/etc/init.d/ntp)
       Active: active (running) since Mo 2018-01-01 00:25:19 UTC; 5 months 19 days left
      Process: 2267 ExecStop=/etc/init.d/ntp stop (code=exited, status=0/SUCCESS)
      Process: 2288 ExecStart=/etc/init.d/ntp start (code=exited, status=0/SUCCESS)
       CGroup: /system.slice/ntp.service
               └─2296 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -c /var/lib/ntp/ntp.conf.dhcp -u 106:111
    Code:
    [18:50:13] openhabian@openHABianPi:/etc$ sudo dpkg-reconfigure tzdata
    
    Current default time zone: 'Europe/Berlin'
    Local time is now:      Thu Jul 13 18:50:25 UTC 2017.
    Universal Time is now:  Thu Jul 13 18:50:25 UTC 2017.
    Wo könnte man denn noch ansetzen?

    Gruß
    Sebastian

    #2
    Ich gehe mal stark davon aus, dass Du debian 9 (stretch) einsetzt - debian 8 hat den 3.16er Kernel.

    Weiterhin fehlt eine wichtige Information, nämlich: was steht in /etc/ntp.conf?

    Zu guter Letzt verrät die Ausgabe ja schon, wo das Problem liegt, die default timezone ist zwar gesetzt, das System läuft aber trotzdem mit utc.

    Schau doch mal bitte, was ls -l /etc/localtime ausspuckt. Da sollte eigentlich etwas wie
    Code:
    lrwxrwxrwx 1 root root 33 Jul 13 21:11 /etc/localtime -> /usr/share/zoneinfo/Europe/Berlin
    erscheinen, wird das aber vermutlich nicht tun.

    Kommentar


      #3
      /etc/localtime hab ich jetzt wieder mit einem Link von Europe/Berlin angelegt. Hatte es testweise mit einer Kopie von /usr/share/zoneinfo/Europe/Berlin probiert.

      Alles gerade noch einmal getestet, keine Änderung.

      Code:
      [19:38:16] openhabian@openHABianPi:~$ cat /etc/ntp.conf
      # /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
      
      driftfile /var/lib/ntp/ntp.drift
      
      
      # Enable this if you want statistics to be logged.
      #statsdir /var/log/ntpstats/
      
      statistics loopstats peerstats clockstats
      filegen loopstats file loopstats type day enable
      filegen peerstats file peerstats type day enable
      filegen clockstats file clockstats type day enable
      
      
      # You do need to talk to an NTP server or two (or three).
      #server ntp.your-provider.example
      
      # pool.ntp.org maps to about 1000 low-stratum NTP servers.  Your server will
      # pick a different set every time it starts up.  Please consider joining the
      # pool: <http://www.pool.ntp.org/join.html>
      server 0.debian.pool.ntp.org iburst
      server 1.debian.pool.ntp.org iburst
      server 2.debian.pool.ntp.org iburst
      server 3.debian.pool.ntp.org iburst
      
      
      # Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
      # details.  The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
      # might also be helpful.
      #
      # Note that "restrict" applies to both servers and clients, so a configuration
      # that might be intended to block requests from certain clients could also end
      # up blocking replies from your own upstream servers.
      
      # By default, exchange time with everybody, but don't allow configuration.
      restrict -4 default kod notrap nomodify nopeer noquery
      restrict -6 default kod notrap nomodify nopeer noquery
      
      # Local users may interrogate the ntp server more closely.
      restrict 127.0.0.1
      restrict ::1
      
      # Clients from this (example!) subnet have unlimited access, but only if
      # cryptographically authenticated.
      #restrict 192.168.123.0 mask 255.255.255.0 notrust
      
      
      # If you want to provide time to your local subnet, change the next line.
      # (Again, the address is an example only.)
      #broadcast 192.168.123.255
      
      # If you want to listen to time broadcasts on your local subnet, de-comment the
      # next lines.  Please do this only if you trust everybody on the network!
      #disable auth
      #broadcastclient
      Code:
      [19:40:06] openhabian@openHABianPi:~$ ls -l /etc/localtime
      lrwxrwxrwx 1 root root 33 Jul 13 19:40 /etc/localtime -> /usr/share/zoneinfo/Europe/Berlin

      Kommentar


        #4
        Also merkwürdiger Weise haben wir das Problem nicht gelöst bekommen. Vereinzelt findet man im Internet User mit selben Problem, ohne Lösung. Bin nun, auch aufgrund anderer Problemen / Konfigurationen, von openhabian auf raspbian umgestiegen, hier läuft alles. Keine Ahnung was bei openhabian zerschossen war...

        Kommentar

        Lädt...
        X