Witam mam problem z prawidłowym ustawieniem NTP, a konkretnie gdy sprawdzam status:
# systemctl status ntpd
● ntpd.service - Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset>
Active: active (running) since Wed 2018-09-26 22:57:54 CEST; 11min ago
Process: 477 ExecStart=/usr/bin/ntpd -g -u ntp:ntp (code=exited, status=0/SUC>
Main PID: 481 (ntpd)
Tasks: 2 (limit: 4915)
Memory: 2.9M
CGroup: /system.slice/ntpd.service
└─481 /usr/bin/ntpd -g -u ntp:ntp
wrz 26 22:57:54 pc ntpd[481]: bind(20) AF_INET6 fe80::7d4b:d094:ffd3:ffb0%3#123>
wrz 26 22:57:54 pc ntpd[481]: unable to create socket on enp0s26u1u2 (4) for fe>
I głownie mnie chodzi o te 2 ostatnie linijki.
Co należy zrobić aby to prawidłowo działało?
Chciałbym również dodać że gdy wklepie komendę:
sudo timedatectl set-ntp true
To mam tak:
$ timedatectl
Local time: czw 2018-09-27 12:09:32 CEST
Universal time: czw 2018-09-27 10:09:32 UTC
RTC time: czw 2018-09-27 10:09:32
Time zone: Europe/Warsaw (CEST, +0200)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
Ale po reboot-e NTP service, znowu jest nieaktywne:
$ timedatectl
Local time: czw 2018-09-27 12:07:57 CEST
Universal time: czw 2018-09-27 10:07:57 UTC
RTC time: czw 2018-09-27 10:07:58
Time zone: Europe/Warsaw (CEST, +0200)
System clock synchronized: yes
NTP service: inactive
RTC in local TZ: no
A co masz w pliku
/etc/ntp.conf ?
Masz Manjaro, a zatem co zrobiłeś z tego...
https://wiki.archlinux.org/index.php/Network_Time_Protocol_daemon?
Jeśli usługa jest prawidłowo podniesiona, to tak jak sugeruje @TataPingu - prawdopodobnie nie skonfigurowałeś ntp.conf.
Cytat: TataPingu w Wrzesień 27, 2018, 01:21:00 PM
A co masz w pliku
/etc/ntp.conf ?
Już pokazuje:
# Please consider joining the pool:
#
# http://www.pool.ntp.org/join.html
#
# For additional information see:
# - https://wiki.archlinux.org/index.php/Network_Time_Protocol_daemon
# - http://support.ntp.org/bin/view/Support/GettingStarted
# - the ntp.conf man page
# Associate to Arch's NTP pool
server 0.arch.pool.ntp.org
server 1.arch.pool.ntp.org
server 2.arch.pool.ntp.org
server 3.arch.pool.ntp.org
# By default, the server allows:
# - all queries from the local host
# - only time queries from remote hosts, protected by rate limiting and kod
restrict default kod limited nomodify nopeer noquery notrap
restrict 127.0.0.1
restrict ::1
# Location of drift file
driftfile /var/lib/ntp/ntp.drift
Ja mam takie ustawienia:
[lucjan@archlinux ~]$ cat /etc/ntp.conf
# For additional information see:
# - the ntp.conf man page
# - http://support.ntp.org/bin/view/Support/GettingStarted
# - https://wiki.archlinux.org/index.php/Network_Time_Protocol_daemon
# Associate to public NTP pool servers; see http://www.pool.ntp.org/
server ntp.task.gda.pl iburst
server tempus1.gum.gov.pl iburst
server tempus2.gum.gov.pl iburst
#server 0.arch.pool.ntp.org
#server 1.arch.pool.ntp.org
#server 2.arch.pool.ntp.org
#server 3.arch.pool.ntp.org
# By default, the server allows:
# - all queries from the local host
# - only time queries from remote hosts, protected by rate limiting and kod
restrict default kod limited nomodify nopeer noquery notrap
restrict 127.0.0.1
restrict ::1
# Location of drift file
driftfile /var/lib/ntp/ntp.drift
Wszystko działa jak powinno:
[lucjan@archlinux ~]$ systemctl status ntpd
● ntpd.service - Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2018-09-27 10:37:33 CEST; 4h 17min ago
Process: 560 ExecStart=/usr/bin/ntpd -g -u ntp:ntp (code=exited, status=0/SUCCESS)
Main PID: 566 (ntpd)
Tasks: 2 (limit: 4915)
Memory: 3.3M
CGroup: /system.slice/ntpd.service
└─566 /usr/bin/ntpd -g -u ntp:ntp
wrz 27 11:52:29 archlinux ntpd[566]: Listen normally on 4 wlp6s0 192.168.0.105:123
wrz 27 11:52:29 archlinux ntpd[566]: Listen normally on 5 wlp6s0 [fe80::bcc9:dec5:2e5a:62e8%3]:123
Wielkie dzięki sir_lucek za config, po kilku reboot-ach usługa NTP działa idealnie. Ponieważ za miesiąc znowu ma być zmiana czasu, i zależało mi aby NTP działało prawidłowo.
EDIT:
A czy potrzebna jest też uruchomiona usługa ntpdate?
A jednak NTP nadal mi pokazywał błędy, pomogła ta strona:
https://bbs.archlinux.org/viewtopic.php?id=110718A więc wpierw musiałem edytować plik ntpd.service
# systemctl edit ntpd.service
I wkleić to:
[Service]
ExecStart=
ExecStart=/usr/bin/ntpd -4 -g -u ntp:ntp
Na koniec przeładowałem deamon-a
# systemctl daemon-reload
No i teraz mam tak:
# systemctl status ntpd
● ntpd.service - Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset>
Drop-In: /etc/systemd/system/ntpd.service.d
└─override.conf
Active: active (running) since Sun 2018-09-30 17:23:00 CEST; 16min ago
Main PID: 544 (ntpd)
Tasks: 2 (limit: 4915)
Memory: 2.7M
CGroup: /system.slice/ntpd.service
└─544 /usr/bin/ntpd -4 -g -u ntp:ntp
I dopiero teraz działa idealnie.