SUSE Support

Here When You Need Us

NTP Service Fails to Start or Hangs on SLES12

This document (7015867) is provided subject to the disclaimer at the end of this document.


SUSE Linux Enterprise Server 12 GA


Upon completing the NTP configuration in yast2 and clicking Finish, an error "Error: Cannot restart the NTP daemon" appears on the screen.

Running systemctl start ntpd.service fails or hangs.

The error persists whether NTP is configured in a chroot jail or not.

The system log /var/log/messages contains the errors:
'kernel: [  657.760204] type=1400 audit (1415376571.756:44): apparmor="DENIED" operation="file_mmap" parent=1 profile="/usr/sbin/ntpd" name="/run/nscd/group" pid=2879 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0'

"systemd[1]: Failed to start NTP Server Daemon."

# ntpq -p
ntpq: read: Connection refused

The following services are enabled.
# apparmor_status
apparmor module is loaded.
39 profiles are loaded.
39 profiles are in enforce mode.
0 profiles are in complain mode.
3 processes have profiles defined.
3 processes are in enforce mode.
   /usr/sbin/avahi-daemon (892) 
   /usr/sbin/libvirtd (1425) 
   /usr/sbin/nscd (896) 
0 processes are in complain mode.
0 processes are unconfined but have a profile defined.
# systemctl status ntpd
ntpd.service - NTP Server Daemon
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled)
   Active: activating (auto-restart) (Result: timeout) since Fri 2014-11-07 09:26:57 MST; 1min 38s ago
     Docs: man:ntpd(1)
  Process: 4584 ExecStart=/usr/sbin/start-ntpd start (code=exited, status=0/SUCCESS)

Nov 07 09:26:57 sles12 systemd[1]: Failed to start NTP Server Daemon.

Rebooting the server seems to start the NTP service daemon just fine, but it terminates after some time attempting to activate the service.
# systemctl status ntpd
ntpd.service - NTP Server Daemon
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled)
   Active: activating (start) since Fri 2014-11-07 09:59:14 MST; 45s ago
     Docs: man:ntpd(1)
  Process: 1428 ExecStart=/usr/sbin/start-ntpd start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/ntpd.service
           └─1444 /usr/sbin/ntpd -p /var/run/ntp/ -g -u ntp:ntp -i /v...

Nov 07 09:59:14 sles12 ntpd[1444]: pid file /var/run/ntp/ Permission denied
Nov 07 09:59:14 sles12 ntpd[1444]: ntp_io: estimated max descriptors: 102...



Update the AppArmor /usr/sbin/ntpd profile with logprof to allow read access to /run/nscd/group and write access to /var/lib/ntp/var/run/ntp/ Once the AppArmor ntpd policy has been saved, you can restart the NTP service.

Login as root on the command line and run:
# logprof
Reading log entries from /var/log/messages.
Updating AppArmor profiles in /etc/apparmor.d.
Enforce-mode changes:

Profile:  /usr/sbin/ntpd
Path:     /run/nscd/group
Mode:     r
Severity: unknown

 [1 - /run/nscd/group]

(A)llow / [(D)eny] / (G)lob / Glob w/(E)xt / (N)ew / Abo(r)t / (F)inish / (O)pts
Adding /run/nscd/group r to profile.

Profile:  /usr/sbin/ntpd
Path:     /var/lib/ntp/var/run/ntp/
Mode:     w
Severity: unknown

 [1 - /var/lib/ntp/var/run/ntp/]

(A)llow / [(D)eny] / (G)lob / Glob w/(E)xt / (N)ew / Abo(r)t / (F)inish / (O)pts
Adding /var/lib/ntp/var/run/ntp/ w to profile.

= Changed Local Profiles =

The following local profiles were changed.  Would you like to save them?

 [1 - /usr/sbin/ntpd]

(S)ave Changes / [(V)iew Changes] / Abo(r)t
Writing updated profile for /usr/sbin/ntpd.

# systemctl restart ntpd.service
# systemctl status ntpd.service


Apparmor is restricting the NTP service from reading /run/nscd/group and from writing to /var/lib/ntp/var/run/ntp/

Additional Information

Problem is fixed since: apparmor-2.8.2-28.2


This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7015867
  • Creation Date: 07-Nov-2014
  • Modified Date:12-Oct-2022
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.