You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After again running the installation script with /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" as shown on the Homebrew website https://brew.sh, I was trying use the command sudo /opt/homebrew/bin/chronyc selectdata in order to view the appropriate data. (sudo /opt/homebrew/bin/chronyc tracking and sudo /opt/homebrew/bin/chronyc sources work.)
A problem analysis and a solution is provided below.
What happened (include all command output)?
Client:
S Name/IP Address Auth COpts EOpts Last Score Interval Leap
=======================================================================
501 Not authorised
Run the installation script with /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install chrony: brew install chrony
Again run the installation script with /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Run sudo /opt/homebrew/bin/chronyc selectdata
Analysis:
The selectdata option requires a working socket connection.
The directory in which the socket file resides MUST have correct, ownership (root), group, and permissions (o-rwx), see: https://gitlab.com/chrony/chrony/-/blob/master/conf.c#L1836
Ownership is corrupted by the installation script command /usr/bin/sudo /usr/sbin/chown -R user:admin /opt/homebrew.
Permissions may be corrupted by manually fixing permissions recursively over /opt/homebrew which sometimes is necessary to fix permission problems.
Solution:
Set ownership, group, and permissions for the directory in the install script such that they are fixed by running brew install chrony or brew reinstall chrony.
Even better would be additionally placing the socket in a global directory /var/run/chrony (instead of /opt/homebrew/var/run/chrony) by adding bindcmdaddress /var/run/chrony/chronyd.sock to /etc/chrony.conf, so ownership, group, and permissions are not modified by re-installing Homebrew or modifying permissions in the Homebrew directory. Then chronyc must be run with option -h /var/run/chrony/chronyd.sock,127.0.0.1,::1.
Not only for chronyd, but also for the client chronyc the debugging flag should be enabled. Currently chronyc -d doesn't seem to produce any debug output.
brew gist-logs <formula>
link ORbrew config
ANDbrew doctor
outputVerification
brew doctor
output saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem.What were you trying to do (and why)?
After again running the installation script with
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
as shown on the Homebrew website https://brew.sh, I was trying use the commandsudo /opt/homebrew/bin/chronyc selectdata
in order to view the appropriate data. (sudo /opt/homebrew/bin/chronyc tracking
andsudo /opt/homebrew/bin/chronyc sources
work.)A problem analysis and a solution is provided below.
What happened (include all command output)?
Client:
Daemon (restarted manually with debugging output:
launchctl kill 9 system/org.tuxfamily.chrony; /opt/homebrew/sbin/chronyd -d -d
)or
What did you expect to happen?
The requested data to be shown.
Step-by-step reproduction instructions (by running
brew
commands)/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install chrony
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
sudo /opt/homebrew/bin/chronyc selectdata
Analysis:
The
selectdata
option requires a working socket connection.The directory in which the socket file resides MUST have correct, ownership (root), group, and permissions (o-rwx), see: https://gitlab.com/chrony/chrony/-/blob/master/conf.c#L1836
Ownership is corrupted by the installation script command
/usr/bin/sudo /usr/sbin/chown -R user:admin /opt/homebrew
.Permissions may be corrupted by manually fixing permissions recursively over /opt/homebrew which sometimes is necessary to fix permission problems.
Solution:
brew install chrony
orbrew reinstall chrony
./var/run/chrony
(instead of/opt/homebrew/var/run/chrony
) by addingbindcmdaddress /var/run/chrony/chronyd.sock
to/etc/chrony.conf
, so ownership, group, and permissions are not modified by re-installing Homebrew or modifying permissions in the Homebrew directory. Then chronyc must be run with option-h /var/run/chrony/chronyd.sock,127.0.0.1,::1
.chronyd
, but also for the clientchronyc
the debugging flag should be enabled. Currentlychronyc -d
doesn't seem to produce any debug output.Originally reported at: https://gitlab.com/chrony/chrony/-/issues/16
The text was updated successfully, but these errors were encountered: