aosc-os-abbs icon indicating copy to clipboard operation
aosc-os-abbs copied to clipboard

chrony: systemctl start stuck on "Can't open PID file"

Open Artoria2e5 opened this issue 2 years ago • 1 comments

Bug description

root@arisu [ a2 ] ! systemctl restart chrony
^C
root@arisu [ a2 ] # systemctl status chrony
● chrony.service - Chrony Network Time Daemon
     Loaded: loaded (/usr/lib/systemd/system/chrony.service; enabled; preset: disabled)
     Active: activating (start) since Thu 2023-06-08 10:09:32 UTC; 1s ago
    Process: 50813 ExecStart=/usr/bin/chronyd -u chrony (code=exited, status=0/SUCCESS)
      Tasks: 2 (limit: 18772)
     Memory: 788.0K
        CPU: 4ms
     CGroup: /system.slice/chrony.service
             └─50815 /usr/bin/chronyd -u chrony

Jun 08 10:09:32 arisu systemd[1]: Starting chrony.service...
Jun 08 10:09:32 arisu chronyd[50815]: chronyd version 4.2 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP -SCFILTER -SIGND +ASYNCDNS +NTS +SECHASH +IPV6 -DEBUG)
Jun 08 10:09:32 arisu chronyd[50815]: Frequency 0.640 +/- 97.356 ppm read from /var/lib/chrony/drift
Jun 08 10:09:32 arisu systemd[1]: chrony.service: Can't open PID file /run/chronyd.pid (yet?) after start: Operation not permitted

Steps to reproduce

Install and go.

Update channel(s)

stable

Package and version

Package: chrony
Status: install ok installed
Section: admin
Installed-Size: 1108
Maintainer: Mingcong Bai <[email protected]>
Architecture: amd64
Version: 4.2
Depends: libcap (>= 2.43-3), libedit (>= 20191231+3.1-1), nss (>= 3.73), readline (>= 8.1.1)
Conffiles:
 /etc/chrony.conf 8d8b093aa61ede22179448f654e32c05
Description: Lightweight NTP client and server
X-AOSC-ACBS-Version: 20211125
X-AOSC-Commit: e99088039f
X-AOSC-Autobuild3-Version: 2:1.6.39

Artoria2e5 avatar Jun 08 '23 10:06 Artoria2e5

Two possible fixes:

  • Forget about forking. Go for "simple" service and do chronyd -d -u chrony.
  • Use the very fancy example service files like https://github.com/mlichvar/chrony/blob/master/examples/chronyd-restricted.service.

Artoria2e5 avatar Jun 08 '23 10:06 Artoria2e5

Cannot repro, closing.

KexyBiscuit avatar Jul 19 '24 16:07 KexyBiscuit