Public bug reported:

Description:    Ubuntu 16.04.6 LTS
Release:        16.04

Package: ntp
Version: 1:4.2.8p4+dfsg-3ubuntu5.10

Restarting the ntp daemon ntpd after a change in the configuration file
/etc/ntp.conf via the shell command

% sudo service ntp restart

fails in a small fraction of cases (about 2-3%), logging the error:

unable to bind to wildcard address :: - another process may be running -
EXITING

and leaving the system without a running ntpd process.

Expected behaviour: ntpd process running with new configuration

Actual behaviour: no ntpd process running

Additional information:

Syslog shows systemd launching the "start" action before the old daemon has 
exited.
Consequently, the new ntpd process races the old one for the UDP socket to 
listen on.
Example log excerpt:

May 25 06:31:12 capetown systemd[1]: Stopping LSB: Start NTP daemon...
May 25 06:31:12 capetown ntp[28437]:  * Stopping NTP server ntpd
May 25 06:31:12 capetown ntp[28437]:    ...done.
May 25 06:31:12 capetown systemd[1]: Stopped LSB: Start NTP daemon.
May 25 06:31:12 capetown systemd[1]: Starting LSB: Start NTP daemon...
May 25 06:31:12 capetown ntp[28449]:  * Starting NTP server ntpd
May 25 06:31:12 capetown ntpd[28457]: ntpd [email protected] Tue Jan  7 15:08:23 
UTC 2020 (1): Starting
May 25 06:31:12 capetown ntpd[28457]: Command line: /usr/sbin/ntpd -p 
/var/run/ntpd.pid -g -u 113:119
May 25 06:31:12 capetown ntp[28449]:    ...done.
May 25 06:31:12 capetown systemd[1]: Started LSB: Start NTP daemon.
May 25 06:31:12 capetown ntpd[28460]: proto: precision = 0.105 usec (-23)
May 25 06:31:12 capetown ntpd[2749]: 41.76.128.222 local addr 192.168.0.42 -> 
<null>
May 25 06:31:12 capetown ntpd[28460]: MS-SNTP signd operations currently block 
ntpd degrading service to all clients.
May 25 06:31:12 capetown ntpd[28460]: restrict 0.0.0.0: KOD does nothing 
without LIMITED.
May 25 06:31:12 capetown ntpd[28460]: restrict ::: KOD does nothing without 
LIMITED.
May 25 06:31:12 capetown ntpd[28460]: unable to bind to wildcard address :: - 
another process may be running - EXITING

Running the "service ntp restart" command a second time successfully
starts the ntpd daemon again.

** Affects: ntp (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ntp in Ubuntu.
https://bugs.launchpad.net/bugs/1882071

Title:
  service ntp restart fails with error: unable to bind to wildcard
  address

Status in ntp package in Ubuntu:
  New

Bug description:
  Description:    Ubuntu 16.04.6 LTS
  Release:        16.04

  Package: ntp
  Version: 1:4.2.8p4+dfsg-3ubuntu5.10

  Restarting the ntp daemon ntpd after a change in the configuration
  file /etc/ntp.conf via the shell command

  % sudo service ntp restart

  fails in a small fraction of cases (about 2-3%), logging the error:

  unable to bind to wildcard address :: - another process may be running
  - EXITING

  and leaving the system without a running ntpd process.

  Expected behaviour: ntpd process running with new configuration

  Actual behaviour: no ntpd process running

  Additional information:

  Syslog shows systemd launching the "start" action before the old daemon has 
exited.
  Consequently, the new ntpd process races the old one for the UDP socket to 
listen on.
  Example log excerpt:

  May 25 06:31:12 capetown systemd[1]: Stopping LSB: Start NTP daemon...
  May 25 06:31:12 capetown ntp[28437]:  * Stopping NTP server ntpd
  May 25 06:31:12 capetown ntp[28437]:    ...done.
  May 25 06:31:12 capetown systemd[1]: Stopped LSB: Start NTP daemon.
  May 25 06:31:12 capetown systemd[1]: Starting LSB: Start NTP daemon...
  May 25 06:31:12 capetown ntp[28449]:  * Starting NTP server ntpd
  May 25 06:31:12 capetown ntpd[28457]: ntpd [email protected] Tue Jan  7 
15:08:23 UTC 2020 (1): Starting
  May 25 06:31:12 capetown ntpd[28457]: Command line: /usr/sbin/ntpd -p 
/var/run/ntpd.pid -g -u 113:119
  May 25 06:31:12 capetown ntp[28449]:    ...done.
  May 25 06:31:12 capetown systemd[1]: Started LSB: Start NTP daemon.
  May 25 06:31:12 capetown ntpd[28460]: proto: precision = 0.105 usec (-23)
  May 25 06:31:12 capetown ntpd[2749]: 41.76.128.222 local addr 192.168.0.42 -> 
<null>
  May 25 06:31:12 capetown ntpd[28460]: MS-SNTP signd operations currently 
block ntpd degrading service to all clients.
  May 25 06:31:12 capetown ntpd[28460]: restrict 0.0.0.0: KOD does nothing 
without LIMITED.
  May 25 06:31:12 capetown ntpd[28460]: restrict ::: KOD does nothing without 
LIMITED.
  May 25 06:31:12 capetown ntpd[28460]: unable to bind to wildcard address :: - 
another process may be running - EXITING

  Running the "service ntp restart" command a second time successfully
  starts the ntpd daemon again.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ntp/+bug/1882071/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to