I attempted to install chrony and run it on one of the FE machines. It didn't work and in doing so, I lost the working NTP client service on the FE computers as well. Following are some details:
- I added the following two mirrors in the apt source list of root.jessie at /etc/apt/sources.list
deb http://ftp.us.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free
- Then I installed chrony in the root.jessie using
sudo apt-get install chrony
- I was getting an error E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory) . To fix this, I had to run:
sudo mount -t devpts none "$rootpath/dev/pts" -o ptmxmode=0666,newinstance
sudo ln -fs "pts/ptmx" "$rootpath/dev/ptmx"
- Then, I had another error to resolve.
Failed to read /proc/cmdline. Ignoring: No such file or directory
start-stop-daemon: nothing in /proc - not mounted?
To fix this, I had to exit to fb1 and run:
sudo mount --bind /proc /diskless/root.jessie/proc
- With these steps, chrony was finally installed, but I immediately saw an error message saying:
Starting /usr/sbin/chronyd...
Could not open NTP sockets
- I figured this must be due to ntp running in the FE machines. I logged into c1iscex and stopped and disabled the ntp service:
sudo systemctl stop ntp
sudo systemctl disable ntp
- I saw some error messages from the above coomand as FEs are read only file systems:
Synchronizing state for ntp.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d ntp defaults
insserv: fopen(.depend.stop): Read-only file system
Executing /usr/sbin/update-rc.d ntp disable
update-rc.d: error: Read-only file system
- So I went back to chroot in fb1 and ran the two command sabove that failed:
/usr/sbin/update-rc.d ntp defaults
/usr/sbin/update-rc.d ntp disable
- The last line gave the output:
insserv: warning: current start runlevel(s) (empty) of script `ntp' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (2 3 4 5) of script `ntp' overrides LSB defaults (empty).
- I igored this and moved forward.
- I copied the chronyd.service from nodus to the chroot in fb1 and configured it to use nodus as the server. The I started the chronyd.service
sudo systemctl status chronyd.service
but got the saem issue of NTP sockets.
â—Â chronyd.service - NTP client/server
Loaded: loaded (/usr/lib/systemd/system/chronyd.service; disabled)
Active: failed (Result: exit-code) since Tue 2021-08-24 21:52:30 PDT; 5s ago
Process: 790 ExecStart=/usr/sbin/chronyd $OPTIONS (code=exited, status=1/FAILURE)
Aug 24 21:52:29 c1iscex systemd[1]: Starting NTP client/server...
Aug 24 21:52:30 c1iscex chronyd[790]: Could not open NTP sockets
Aug 24 21:52:30 c1iscex systemd[1]: chronyd.service: control process exited, code=exited status=1
Aug 24 21:52:30 c1iscex systemd[1]: Failed to start NTP client/server.
Aug 24 21:52:30 c1iscex systemd[1]: Unit chronyd.service entered failed state.
-
I tried a few things to resolve this, but couldn't get it to work. So I gave up on using chrony and decided to go back to ntp service atleast.
-
I stopped, disabled and checked status of chrony:
sudo systemctl stop chronyd
sudo systemctl disable chronyd
sudo systemctl status chronyd
This gave the output:
â—Â chronyd.service - NTP client/server
Loaded: loaded (/usr/lib/systemd/system/chronyd.service; disabled)
Active: failed (Result: exit-code) since Tue 2021-08-24 22:09:07 PDT; 25s ago
Aug 24 22:09:07 c1iscex systemd[1]: Starting NTP client/server...
Aug 24 22:09:07 c1iscex chronyd[2490]: Could not open NTP sockets
Aug 24 22:09:07 c1iscex systemd[1]: chronyd.service: control process exited, code=exited status=1
Aug 24 22:09:07 c1iscex systemd[1]: Failed to start NTP client/server.
Aug 24 22:09:07 c1iscex systemd[1]: Unit chronyd.service entered failed state.
Aug 24 22:09:15 c1iscex systemd[1]: Stopped NTP client/server.
-
I went back to fb1 chroot and removed chrony package and deleted the configuration files and systemd service files:
sudo apt-get remove chrony
-
But when I started ntp daemon service back in c1iscex, it gave error:
sudo systemctl restart ntp
Job for ntp.service failed. See 'systemctl status ntp.service' and 'journalctl -xn' for details.
-
Status shows:
sudo systemctl status ntp
â—Â ntp.service - LSB: Start NTP daemon
Loaded: loaded (/etc/init.d/ntp)
Active: failed (Result: exit-code) since Tue 2021-08-24 22:09:56 PDT; 9s ago
Process: 2597 ExecStart=/etc/init.d/ntp start (code=exited, status=5)
Aug 24 22:09:55 c1iscex systemd[1]: Starting LSB: Start NTP daemon...
Aug 24 22:09:56 c1iscex systemd[1]: ntp.service: control process exited, code=exited status=5
Aug 24 22:09:56 c1iscex systemd[1]: Failed to start LSB: Start NTP daemon.
Aug 24 22:09:56 c1iscex systemd[1]: Unit ntp.service entered failed state.
-
I tried to enable back the ntp service by sudo systemctl enable ntp. I got similar error messages of read only filesystem as earlier.
Synchronizing state for ntp.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d ntp defaults
insserv: warning: current start runlevel(s) (empty) of script `ntp' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (2 3 4 5) of script `ntp' overrides LSB defaults (empty).
insserv: fopen(.depend.stop): Read-only file system
Executing /usr/sbin/update-rc.d ntp enable
update-rc.d: error: Read-only file system
-
I came back to c1iscex and tried restarting the ntp service but got same error messages as above with exit code 5.
-
I checked c1sus, the ntp was running there. I tested the configuration by restarting the ntp service, and then it failed with same error message. So the remaining three FEs, c1lsc, c1ioo and c1iscey have running ntp service, but they won't be able to restart.
-
As a last try, I rebooted c1iscex to see if ntp comes back online nicely, but it doesn't.
Bottom line, I went to try chrony in the FEs, and I ended up breaking the ntp client services on the computers as well. We have no NTP synchronization in any of the FEs.
Even though Paco and I are learning about the ntp and cds stuff, I think it's time we get help from someone with real experience. The lab is not in a good state for far too long.
Quote: |
tl;dr: NTP servers and clients were never synchronized, are not synchronizing even with ntp... nodus is synchronized but uses chronyd; should we use chronyd everywhere?
|
|