LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Getting IPv6 Errors in NTP (https://www.linuxquestions.org/questions/linux-server-73/getting-ipv6-errors-in-ntp-4175525840/)

carlosinfl 11-18-2014 11:01 PM

Getting IPv6 Errors in NTP
 
I loaded a server this evening to learn something new (systemd) and I got ntpd installed on the box and when I checked the status, I noticed some 'red' errors:

Code:

    cachedrive ~ $ sudo systemctl status ntpd.service
    ● ntpd.service - Network Time Service
      Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled)
      Active: active (running) since Tue 2014-11-18 23:30:25 EST; 14min ago
      Process: 318 ExecStart=/usr/bin/ntpd -g -u ntp:ntp (code=exited, status=0/SUCCESS)
    Main PID: 320 (ntpd)
      CGroup: /system.slice/ntpd.service
              └─320 /usr/bin/ntpd -g -u ntp:ntp

    Nov 18 23:30:25 ntpd[320]: Listen normally on 2 lo 127.0.0.1:123
    Nov 18 23:30:25 ntpd[320]: Listen normally on 3 enp0s25 192.168.0.115:123
    Nov 18 23:30:25 ntpd[320]: Listen normally on 4 lo [::1]:123
    Nov 18 23:30:25 ntpd[320]: bind(21) AF_INET6 fe80::f24d:a2ff:fe35:8504%2%2#123 flags 0x11 failed: Cannot assign requested address
    Nov 18 23:30:25 ntpd[320]: unable to create socket on enp0s25 (5) for fe80::f24d:a2ff:fe35:8504%2#123
    Nov 18 23:30:25 ntpd[320]: failed to init interface for address fe80::f24d:a2ff:fe35:8504%2
    Nov 18 23:30:25 ntpd[320]: Listening on routing socket on fd #21 for interface updates
    Nov 18 23:28:38 ntpd[320]: Listen normally on 6 enp0s25 [::f24d:a2ff:fe35:8504]:123
    Nov 18 23:28:38 ntpd[320]: Listen normally on 7 enp0s25 [fe80::f24d:a2ff:fe35:8504%2]:123
    Nov 18 23:28:38 ntpd[320]: new interface(s) found: waking up resolver

Can someone help me w/ fixing this error so it's not logged. I don't want or need IPv6 at this time so if I can disable that and resolve the error...

corp769 11-19-2014 04:10 PM

Per the ntpd man page, you can pass the -4 argument in your ntp config to force IPv4. Since you are using systemd (aren't we all nowadays?), you can set this by creating /etc/systemd/system/ntpd.service.d/customexec.conf and modifying ExecStart. (See https://wiki.archlinux.org/index.php...ded_unit_files for a reference)
Code:

[Service]
ExecStart=
ExecStart=/usr/bin/ntpd -4 -g -u ntp:ntp


carlosinfl 11-20-2014 07:51 AM

Trying to properly disable IPv6 from the OS.


All times are GMT -5. The time now is 03:36 PM.