I observed the same bug in Centos 7, 2 instances of ntpd were created on
system boot, ie:

# ps -ef | grep ntp
ntp        619     1  0 15:57 ?        00:00:00 /usr/sbin/ntpd -u ntp:ntp -g
root       633   619  0 15:57 ?        00:00:00 /usr/sbin/ntpd -u ntp:ntp -g

And it produced these errors in the log:
 9 Sep 15:57:23 ntpd[619]: process_private: failed auth mod_okay 0
 9 Sep 15:57:23 ntpd[633]: ntp_intres.request: permission denied


What's surprising, when you restart the service after the system has booted 
(ie. systemctl restart ntpd), the problem is gone.

I had this ntp.conf config:
restrict    default kod nomodify notrap nopeer

So I had to add this line, and now the service starts correctly on system boot:
restrict 127.0.0.1

For IPv6 you probably need this as well:
restrict -6 default kod nomodify notrap nopeer
restrict -6 ::1

-- 
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/50406

Title:
  Two instances of ntpd are launched, only one is stopped by the init
  script

Status in ntp package in Ubuntu:
  Fix Released
Status in ntp package in Debian:
  Fix Released

Bug description:
  Binary package hint: ntp-server


  :) 01:03 sam@shodan ~
  $ pgrep ntpd

  :( 01:03 sam@shodan ~
  $ sudo /etc/init.d/ntp-server start
   * Starting NTP server...                                                [ ok 
]

  :) 01:03 sam@shodan ~
  $ pgrep ntpd -fl
  31544 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 116:116
  31548 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 116:116

  :) 01:03 sam@shodan ~
  $ sudo /etc/init.d/ntp-server stop
   * Stopping NTP server...                                                [ ok 
]

  :) 01:03 sam@shodan ~
  $ pgrep ntpd -fl
  31548 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 116:116

  :) 01:04 sam@shodan ~
  $ sudo /etc/init.d/ntp-server start
   * Starting NTP server...                                                [ ok 
]

  :) 01:04 sam@shodan ~
  $ pgrep ntpd -fl
  31548 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 116:116
  31585 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 116:116
  31589 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 116:116

  :) 01:04 sam@shodan ~
  $ sudo /etc/init.d/ntp-server stop
   * Stopping NTP server...                                                [ ok 
]

  :) 01:04 sam@shodan ~
  $ pgrep ntpd -fl
  31589 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 116:116

  :) 01:04 sam@shodan ~
  $ sudo /etc/init.d/ntp-server start
   * Starting NTP server...                                                [ ok 
]

  :) 01:04 sam@shodan ~
  $ pgrep ntpd -fl
  31589 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 116:116
  31622 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 116:116
  31626 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 116:116

  :) 01:04 sam@shodan ~
  $ sudo /etc/init.d/ntp-server stop
   * Stopping NTP server...                                                [ ok 
]

  :) 01:04 sam@shodan ~
  $ pgrep ntpd -fl
  31589 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 116:116
  31626 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 116:116

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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to