OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • International Forums »
  • German - Deutsch (Moderator: Patrick M. Hausen) »
  • ntpdate verhindert ntpd
« previous next »
  • Print
Pages: [1]

Author Topic: ntpdate verhindert ntpd  (Read 4628 times)

bear71

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
    • View Profile
ntpdate verhindert ntpd
« on: October 17, 2018, 03:14:27 pm »
Hallo zusammen,
ich benutze OPNsense 18.1 und dort soll ein ntp-Zeitserver laufen. Doch er startet nicht. Mit ein bisschen Suche habe ich heraus gefunden, dass ntpdate läuft und (so nehme ich an) den Start von ntpd verhindert.

Mein Problem: Ich weiß nicht, was den ntpdate triggert.

Ich habe nur ein
Code: [Select]
root@******:~ # sockstat -4 -l
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS     
root     ntpdate    94081 9  udp4   *:123                 *:*

bzw.
Code: [Select]
root@******:~ # sockstat -6 -l
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS     
root     ntpdate    17313 8  udp6   *:123                 *:*

Meine Fragen:
  • wie bekomme ich raus, wer den ntpdate startet?
  • wie stoppe ich den, damit ich den ntpd über die Weboberfläche starten kann?

Edit: Danke im Voraus
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17707
  • Karma: 1618
    • View Profile
Re: ntpdate verhindert ntpd
« Reply #1 on: October 17, 2018, 04:58:21 pm »
Hallöchen,

Laut Skript läuft ntpdate kurz bevor ntpd angeworfen wird. Hängt ntpdate wäre das das Problem. Wenn man alle NTP-Server austrägt startet NTP nicht mehr. Wenn ntpdate nach diesem Neustart noch da ist dann ist was faul...

Dann wäre /etc/rc.conf[.local] ggf. schuldig, in der ntpdate gewünscht wird, wenn es z.B. vorher ein FreeBSD war (opnsense-bootstrap).


Grüsse
Franco
Logged

bear71

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
    • View Profile
Re: ntpdate verhindert ntpd
« Reply #2 on: October 17, 2018, 05:20:43 pm »
Hallo Franco,
danke für Deine Antwort.

Ich habe die Firewall gerade neu gestartet. Das Problem bleibt das gleiche. Der Output der Firewall ist:
Code: [Select]
Oct 17 17:16:43 ntpd[71646]: unable to bind to wildcard address :: - another process may be running - EXITING
Oct 17 17:16:43 ntpd[71646]: restrict: 'monitor' cannot be disabled while 'limited' is enabled
Oct 17 17:16:43 ntpd[71646]: proto: precision = 0.123 usec (-23)
Oct 17 17:16:42 ntpd[71555]: Command line: /usr/local/sbin/ntpd -g -c /var/etc/ntpd.conf -p /var/run/ntpd.pid
Oct 17 17:16:42 ntpd[71555]: ntpd 4.2.8p11@1.3728-o Sun Jul 22 23:55:42 UTC 2018 (1): Starting

Meine /etc/rc.conf ist quasi leer:
Code: [Select]
# -- BEGIN BSD Installer automatically generated configuration  -- #
# -- Written on Mon Mar 5 14:45:22 UTC 2018-- #
keymap='de'
# -- END of BSD Installer automatically generated configuration -- #
eine rc.conf.local habe ich nicht. Die Installation erfolgte direkt als OPNSense-Firewall, nicht über FreeBSD
Logged

bear71

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
    • View Profile
Re: ntpdate verhindert ntpd
« Reply #3 on: October 17, 2018, 05:32:12 pm »
Kleiner Nachtrag: Wenn ich sockstat aufrufe, ist ntpdate manchmal aktiv, manchmal nur bei IPv4 oder IPv6, manchmal (kurz) gar nicht. Es scheint also so, als ob das immer wieder neu aufgerufen würde. Der Ordner /etc/ntp ist leer.
Logged

JeGr

  • Hero Member
  • *****
  • Posts: 1945
  • Karma: 227
  • old man standing
    • View Profile
Re: ntpdate verhindert ntpd
« Reply #4 on: October 26, 2018, 12:13:44 pm »
> wie stoppe ich den, damit ich den ntpd über die Weboberfläche starten kann?

ntpdate "läuft" nicht als Dienst. ntpdate ist quasi das "run one-time" CLI Tool im NTP Paket. Damit kann skriptonisch oder händisch eben einmal per NTP abgeglichen werden damit die Zeit angepasst wird um zu verhindern, dass - wenn ntpd startet - dieser ein zu großes Zeitdifferential hat und nichts tut (wenn die Uhr bspw. mehr als 2h falsch geht). Ist also ganz normal dass der "manchmal kurz" läuft. Es ist aber kein Dienst den du beenden kannst.
Logged
"It doesn't work!" is no valid error description! - Don't forget to [applaud] those offering time & brainpower to help you!
Better have some *sense as no(n)sense! ;)

If you're interested in german-speaking business support, feel free to reach out via PM.

bear71

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
    • View Profile
Re: ntpdate verhindert ntpd
« Reply #5 on: October 26, 2018, 03:39:33 pm »
Hallo JeGr - und danke für Deine Antwort!

Quote
ntpdate "läuft" nicht als Dienst. ntpdate ist quasi das "run one-time" CLI Tool im NTP Paket. Damit kann skriptonisch oder händisch eben einmal per NTP abgeglichen werden damit die Zeit angepasst wird um zu verhindern, dass - wenn ntpd startet - dieser ein zu großes Zeitdifferential hat und nichts tut (wenn die Uhr bspw. mehr als 2h falsch geht). Ist also ganz normal dass der "manchmal kurz" läuft. Es ist aber kein Dienst den du beenden kannst.

Ich kenne es grundsätzlich von Linux auch so, dass ntpd der Daemon ist und ntpdate ein Programm, das einmalig läuft, wenn aufgerufen. Schön, dass es hier auch so ist. Nur: Ich sehe dieses Programm häufig mit sockstat - und das nunmehr auch in OPNSense 18.7 (habe ein Update gemacht). Und die Abweichung der System-Zeit ist, wenn überhaupt, nur im Sekundenbereich.

Die Frage ist also für mich: Wie bekomme ich heraus, was das Programm ständig aufruft respektive dafür sorgt, dass der ntpd ständig gestoppt wird?
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • International Forums »
  • German - Deutsch (Moderator: Patrick M. Hausen) »
  • ntpdate verhindert ntpd
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2