[Bug 2032805] Re: Could not open socket /var/run/timemaster/chrony.SOCK0
Hi Bryce, Filed a new bug #2068526 with steps to reproduce. Thanks. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2032805 Title: Could not open socket /var/run/timemaster/chrony.SOCK0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/2032805/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2032805] Re: Could not open socket /var/run/timemaster/chrony.SOCK0
Hi Kenneth, thanks for your note about that. Would you mind filing a new bug report for that improvement? If possible, please describe your PTP setup in case we have trouble reproducing the issue. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2032805 Title: Could not open socket /var/run/timemaster/chrony.SOCK0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/2032805/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2032805] Re: Could not open socket /var/run/timemaster/chrony.SOCK0
The AppArmor permissions fix for chrony sockets was too specific to support more than one active PTP instance. chronyd fails to open a second socket: chronyd[35626]: Fatal error : Could not open socket /var/run/timemaster/chrony.SOCK1 Suggested fix is replacing the following line in /etc/apparmor.d/usr.sbin.chronyd: @{run}/timemaster/chrony.SOCK0 rw, with: @{run}/timemaster/chrony.SOCK[0-9]* rw, -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2032805 Title: Could not open socket /var/run/timemaster/chrony.SOCK0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/2032805/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2032805] Re: Could not open socket /var/run/timemaster/chrony.SOCK0
This bug was fixed in the package chrony - 4.5-1ubuntu4 --- chrony (4.5-1ubuntu4) noble; urgency=medium * d/usr.sbin.chronyd: Fix failure to start timemaster due to lack of rw permissions on chrony socket. (LP: #2032805) * d/usr.sbin.chronyd: Allow the default UNIX domain socket address to be used by the reflock_sock service in the Apport configuration. (ref LP #2032805) -- Bryce Harrington Mon, 01 Apr 2024 18:28:32 -0700 ** Changed in: chrony (Ubuntu) Status: In Progress => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2032805 Title: Could not open socket /var/run/timemaster/chrony.SOCK0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/2032805/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2032805] Re: Could not open socket /var/run/timemaster/chrony.SOCK0
This bug was fixed in the package linuxptp - 4.0-1ubuntu1 --- linuxptp (4.0-1ubuntu1) noble; urgency=medium * d/timemaster.conf: Fix path to chrony.conf. (LP: #2032805) -- Bryce Harrington Mon, 01 Apr 2024 18:42:08 -0700 ** Changed in: linuxptp (Ubuntu) Status: In Progress => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2032805 Title: Could not open socket /var/run/timemaster/chrony.SOCK0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/2032805/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2032805] Re: Could not open socket /var/run/timemaster/chrony.SOCK0
Hi Patrik, thanks for the quick response on the testing! I've proceeded with uploading these fixes to both chrony and linuxptp for noble. They're in the unapproved queue currently, as things are frozen for beta release, but hopefully should go in post-beta and be included in the final LTS release. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2032805 Title: Could not open socket /var/run/timemaster/chrony.SOCK0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/2032805/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2032805] Re: Could not open socket /var/run/timemaster/chrony.SOCK0
Bryce, your fixes work fine in my VM. Thanks! -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2032805 Title: Could not open socket /var/run/timemaster/chrony.SOCK0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/2032805/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2032805] Re: Could not open socket /var/run/timemaster/chrony.SOCK0
** Tags added: noble -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2032805 Title: Could not open socket /var/run/timemaster/chrony.SOCK0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/2032805/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2032805] Re: Could not open socket /var/run/timemaster/chrony.SOCK0
** Merge proposal linked: https://code.launchpad.net/~bryce/ubuntu/+source/linuxptp/+git/linuxptp/+merge/463460 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2032805 Title: Could not open socket /var/run/timemaster/chrony.SOCK0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/2032805/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2032805] Re: Could not open socket /var/run/timemaster/chrony.SOCK0
** Merge proposal linked: https://code.launchpad.net/~bryce/ubuntu/+source/chrony/+git/chrony/+merge/463455 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2032805 Title: Could not open socket /var/run/timemaster/chrony.SOCK0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/2032805/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2032805] Re: Could not open socket /var/run/timemaster/chrony.SOCK0
Hi Patrik, I've packaged up the fixes Christian suggested and posted to this PPA: https://launchpad.net/~bryce/+archive/ubuntu/chrony-fix-lp2032805 Once the packages have finished building, I would appreciate it if you could verify this fixes the issues you've encountered, if you're able to run a noble system (e.g. in a LXD container or VM, or similar). -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2032805 Title: Could not open socket /var/run/timemaster/chrony.SOCK0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/2032805/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2032805] Re: Could not open socket /var/run/timemaster/chrony.SOCK0
** Changed in: chrony (Ubuntu) Status: Triaged => In Progress ** Changed in: linuxptp (Ubuntu) Status: Confirmed => In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2032805 Title: Could not open socket /var/run/timemaster/chrony.SOCK0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/2032805/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2032805] Re: Could not open socket /var/run/timemaster/chrony.SOCK0
Agreed with Christian's suggested changes to fix in noble, and worth prioritizing for getting in before final freeze. It sounds like an SRU at least for mantic would be appropriate, however I wonder if the fix should be limited to just what is directly reproducible for this specific issue. But I'll leave that to decide later. ** Changed in: chrony (Ubuntu) Assignee: (unassigned) => Bryce Harrington (bryce) ** Changed in: linuxptp (Ubuntu) Assignee: (unassigned) => Bryce Harrington (bryce) ** Changed in: chrony (Ubuntu) Importance: Undecided => Medium ** Changed in: linuxptp (Ubuntu) Importance: Undecided => Low -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2032805 Title: Could not open socket /var/run/timemaster/chrony.SOCK0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/2032805/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2032805] Re: Could not open socket /var/run/timemaster/chrony.SOCK0
I corrected /etc/chrony/chrony.conf in timemaster.conf years ago but forgot to file a bug. It is still needed. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2032805 Title: Could not open socket /var/run/timemaster/chrony.SOCK0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/2032805/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2032805] Re: Could not open socket /var/run/timemaster/chrony.SOCK0
While the above is needed to change chrony, I further found that timemaster also has an issue in the default config. debian/timemaster.conf:14:[chrony.conf] debian/timemaster.conf:15:include /etc/chrony.conf That causes the default to behave like: Mar 22 07:03:49 n chronyd[50428]: Fatal error : Could not open /etc/chrony.conf : No such file or directory Mar 22 07:03:49 n timemaster[50428]: Fatal error : Could not open /etc/chrony.conf : No such file or directory Mar 22 07:03:49 n timemaster[50427]: [5186982.753] process 50428 terminated with status 1 And this is due to the chrony config itself for ages (since 1.24-1 AFAICS) being in root@n:~# ll /etc/chrony/chrony.conf -rw-r--r-- 1 root root 2230 Dec 11 21:17 /etc/chrony/chrony.conf So there we might want to land a change like diff --git a/debian/timemaster.conf b/debian/timemaster.conf index fd8e77e..4a3e1c1 100644 --- a/debian/timemaster.conf +++ b/debian/timemaster.conf @@ -12,7 +12,7 @@ ntp_program chronyd [chrony.conf] -include /etc/chrony.conf +include /etc/chrony/chrony.conf [ntp.conf] includefile /etc/ntp.conf What do others think? Maybe Patrik has changed that on te initial setup, or happens to know why it is not needed? ** Changed in: chrony (Ubuntu) Status: New => Triaged ** Changed in: linuxptp (Ubuntu) Status: New => Confirmed ** Tags added: server-todo -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2032805 Title: Could not open socket /var/run/timemaster/chrony.SOCK0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/2032805/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2032805] Re: Could not open socket /var/run/timemaster/chrony.SOCK0
Thanks for the ping on this @ahresse ! Yes, this should be very similar to thew old fix in bug 1771028 It is essentially yet another "chrony works with something else" use case. There is a section for that in the chrony apparmor rules and we should indeed add the known default paths (like this) to be allowed. And this is such a default path, from the man page: rundir - Specify the directory where should be generated chronyd, ntpd and ptp4l configuration files and sockets. The directory will be created if it doesn't exist. The default value is /var/run/timemaster. So on this we might even want to allow to read all sub-elements, including the generated config. But RW for the socket. But furthermore while touching it, in addition to the one reported I also see in the ptp4l refclock_sock_address - The address of the UNIX domain socket to be used by the refclock_sock servo. The default is /var/run/refclock.ptp.sock So we should allow that path as well. For chrony my proposal that - once agreed - we need to pick up would seem like diff --git a/debian/usr.sbin.chronyd b/debian/usr.sbin.chronyd index bc52d4f7..e64edc90 100644 --- a/debian/usr.sbin.chronyd +++ b/debian/usr.sbin.chronyd @@ -62,6 +62,13 @@ abi , @{run}/chrony.*.sock rw, # To sign replies to MS-SNTP clients by the smbd daemon /var/lib/samba/ntp_signd/socket rw, + # default path of the sock to sync with ptp4l + @{run}/refclock.ptp.sock rw, + # timemaster directory of chronyd, ... configuration files and sockets. + # read for all configs + @{run}/timemaster/* r, + # rw for coodination via the default socket path + @{run}/timemaster/chrony.SOCK0 rw, # rtc /etc/adjtime r, -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2032805 Title: Could not open socket /var/run/timemaster/chrony.SOCK0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/2032805/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2032805] Re: Could not open socket /var/run/timemaster/chrony.SOCK0
** Also affects: chrony (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2032805 Title: Could not open socket /var/run/timemaster/chrony.SOCK0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/2032805/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs