NTP synchronised problem in our Centos 7.6 node


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers NTP synchronised problem in our Centos 7.6 node
# 8  
Old 09-23-2019
Hi Folks,

Just a quick addition to the above, I have currently been installing a couple of RHEL 7.5 servers. They are both running ntp and have been installed from a RHEL 7.5 image and then fully updated from the current Red Hat online repos, so I decided just to tick this one off the build and when I checked the server I find.

Code:
[root@fbakirpomd4 bin]# ntpd --version
ntpd 4.2.6p5

exit 0
[root@fbakirpomd4 bin]# systemctl status ntpd
- ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; disabled; vendor preset: disabled)
   Active: active (running) since Tue 2019-09-10 13:46:23 BST; 1 weeks 5 days ago
 Main PID: 32639 (ntpd)
   CGroup: /system.slice/ntpd.service
           └─32639 /usr/sbin/ntpd -u ntp:ntp -g

Sep 10 13:46:23 fbakirpomd4 ntpd[32639]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
Sep 10 13:46:23 fbakirpomd4 ntpd[32639]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Sep 10 13:46:23 fbakirpomd4 ntpd[32639]: Listen and drop on 1 v6wildcard :: UDP 123
Sep 10 13:46:23 fbakirpomd4 ntpd[32639]: Listen normally on 2 lo 127.0.0.1 UDP 123
Sep 10 13:46:23 fbakirpomd4 ntpd[32639]: Listen normally on 3 bond0 10.10.184.51 UDP 123
Sep 10 13:46:23 fbakirpomd4 ntpd[32639]: Listen normally on 4 bond0:0 10.10.184.52 UDP 123
Sep 10 13:46:23 fbakirpomd4 ntpd[32639]: Listening on routing socket on fd #21 for interface updates
Sep 10 13:46:23 fbakirpomd4 ntpd[32639]: 0.0.0.0 c016 06 restart
Sep 10 13:46:23 fbakirpomd4 ntpd[32639]: 0.0.0.0 c012 02 freq_set kernel 0.000 PPM
Sep 10 13:46:23 fbakirpomd4 ntpd[32639]: 0.0.0.0 c011 01 freq_not_set
[root@fbakirpomd4 bin]# ntpstat
unsynchronised
  time server re-starting
   polling server every 8 s
[root@fbakirpomd4 bin]# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 10.107.129.61   .INIT.          16 u    - 1024    0    0.000    0.000   0.000
 10.107.130.62   .INIT.          16 u    - 1024    0    0.000    0.000   0.000
[root@fbakirpomd4 bin]# ntptime
ntp_gettime() returns code 5 (ERROR)
  time e132f4ba.dfb26000  Mon, Sep 23 2019  8:37:30.873, (.873816),
  maximum error 16000000 us, estimated error 16000000 us, TAI offset 0
ntp_adjtime() returns code 5 (ERROR)
  modes 0x0 (),
  offset 0.000 us, frequency 0.000 ppm, interval 1 s,
  maximum error 16000000 us, estimated error 16000000 us,
  status 0x41 (PLL,UNSYNC),
  time constant 7, precision 1.000 us, tolerance 500 ppm,
[root@fbakirpomd4 bin]#

These servers are built from an already supplied Kick Start file, which to be fair is pretty large - much larger than it needs to be to be fair with a huge amount of configuration stuff in the file.

The repo's are setup in the Kick Start as follows;

Code:
[root@fbakirpomd4 bin]# yum repolist
Loaded plugins: product-id, search-disabled-repos, subscription-manager, versionlock
repo id                                            repo name                                                                               status
rhel-7-server-eus-rpms/x86_64                      Red Hat Enterprise Linux 7 Server - Extended Update Support (RPMs)                      21,608
rhel-7-server-rpms/x86_64                          Red Hat Enterprise Linux 7 Server (RPMs)                                                21,088
repolist: 42,696
[root@fbakirpomd4 bin]#

So I'll have a hunt around to try and come up with a reason for the package not updating - a yum update was run against the server.

Regards

Gull04
# 9  
Old 09-23-2019
FWIW, I had the same problem with apt on ubuntu, upgrading to an older and less secure version so I went to the NTP home site and downloaded and installed, in a different directory structure,

Code:
4.2.8p38

The reason was that there has been myriad vulnerabilities and flaws found and fixed in NTP since 2011 when 4.2.6p5 was released.
# 10  
Old 09-23-2019
Hmm,

This might cause me a minor problem, due to the nature of the servers although these are development servers - the production servers keep things running. So it may well be that I'll have to change to Chrony.

I'll investigate my options and report back.

Regards

Gull04
# 11  
Old 09-23-2019
That is actually a good idea for me as well:

chrony - Comparison of NTP implementations

I may switch to chrony .... because I have never really trusted ntp (because of the many ntp code vulnerabilities over the years).
# 12  
Old 09-23-2019
Also, not sure how much confidence we can have in this, but cvedetails reports than 0 Chrony vulnerabilities has been reported after 2016:

Tuxfamily Chrony : CVE security vulnerabilities, versions and detailed reports
# 13  
Old 09-23-2019
Your ntpq output in post#1 is missing a column!?

Are you sure your current ntpd is the only process listening on port 123?
Code:
pgrep '(ntp|chrony)d?$'
netstat -antp | grep -w 123

# 14  
Old 09-24-2019
Hi Folks,

I've been round the houses on this, the decision has been to change from NTP to Chrony. - due mainly to security concerns.

So here's a quick breakdown.

Code:
[root@fbakirpomd4 bin]# systemctl stop ntpd
[root@fbakirpomd4 bin]# chkconfig ntpd off
Note: Forwarding request to 'systemctl disable ntpd.service'.
[root@fbakirpomd4 bin]# systemctl enable chronyd
[root@fbakirpomd4 bin]# systemctl start chronyd
[root@fbakirpomd4 bin]# ps -ef | grep cronyd
root     23225 26147  0 10:11 pts/1    00:00:00 grep --color=auto cronyd
[root@fbakirpomd4 bin]# ps -ef | grep chronyd
chrony   23208     1  0 10:11 ?        00:00:00 /usr/sbin/chronyd
root     23253 26147  0 10:11 pts/1    00:00:00 grep --color=auto chronyd
[root@fbakirpomd4 bin]# cat /etc/chrony.conf
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
# server 0.rhel.pool.ntp.org iburst
# server 1.rhel.pool.ntp.org iburst
# server 2.rhel.pool.ntp.org iburst
# server 3.rhel.pool.ntp.org iburst
##############################################################
#
# Added local hosts for xxxxxxxx xxxxx chrony servers
#
##############################################################
server 10.1.100.134 iburst
server 10.235.100.19 iburst
##############################################################

# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift

# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second.
makestep 1.0 3

# Enable kernel synchronization of the real-time clock (RTC).
rtcsync

# Enable hardware timestamping on all interfaces that support it.
#hwtimestamp *

# Increase the minimum number of selectable sources required to adjust
# the system clock.
#minsources 2

# Allow NTP client access from local network.
#allow 192.168.0.0/16

# Serve time even if not synchronized to a time source.
#local stratum 10

# Specify file containing keys for NTP authentication.
#keyfile /etc/chrony.keys

# Specify directory for log files.
logdir /var/log/chrony

# Select which information is logged.
#log measurements statistics tracking
[root@fbakirpomd4 bin]# systemctl enable chronyd
[root@fbakirpomd4 bin]# systemctl start chronyd
[root@fbakirpomd4 bin]# ps -ef | grep cronyd
root     23225 26147  0 10:11 pts/1    00:00:00 grep --color=auto cronyd
[root@fbakirpomd4 bin]# ps -ef | grep chronyd
chrony   23208     1  0 10:11 ?        00:00:00 /usr/sbin/chronyd
root     23253 26147  0 10:11 pts/1    00:00:00 grep --color=auto chronyd
[root@fbakirpomd4 bin]# chronyc tracking
Reference ID    : 0AEB6413 (ntp2.xxxxxxxxxxxxx.co.uk)
Stratum         : 2
Ref time (UTC)  : Mon Sep 23 09:11:35 2019
System time     : 0.000000041 seconds slow of NTP time
Last offset     : +0.000060960 seconds
RMS offset      : 0.000060960 seconds
Frequency       : 6.443 ppm fast
Residual freq   : -0.865 ppm
Skew            : 0.017 ppm
Root delay      : 0.000187665 seconds
Root dispersion : 0.000315763 seconds
Update interval : 1.8 seconds
Leap status     : Normal
[root@fbakirpomd4 bin]# man chkconfig
[root@fbakirpomd4 bin]# chkconfig chronyd on
Note: Forwarding request to 'systemctl enable chronyd.service'.
[root@fbakirpomd4 bin]#

Checked the servers this morning and all seems well.

Regards

Gull04
This User Gave Thanks to gull04 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

GPS Clock Not Synchronised

Hi guys, I got some error on my application server mentioning that gps clock not sync to my db server. what is the command to check is my server is sync with the gps clock? appreciate if you guys can let me know how to troubleshoot this problem. Thanks (1 Reply)
Discussion started by: leecopper
1 Replies

2. AIX

NTP time problem

I got an ntp time problem on AIX server. os version is AIX7.1 OS LEVEL 7.1.0.0 i got below output,when i run the below command bash-3.2# ntpdate -dv XXXXXXXXXXXXXXXXXXXXXXXX 4 Dec 12:50:49 ntpdate: 3.4y transmit(xxxxxxxxx) receive(xxxxxxxxx) transmit(xxxxxxxx) receive(xxxxxxxxx)... (9 Replies)
Discussion started by: murali969
9 Replies

3. UNIX for Advanced & Expert Users

NTP Problem

Hello every one i want to setup a ntp on sco unix 5.0.6 and i don't have any time server how can i do this with local time (1 Reply)
Discussion started by: kaydream
1 Replies

4. Solaris

NTP problem.

Hi, I have edited the /etc/inet/ntp.conf file to point to a new time server. When I restart ntp on Solaris 10 using 'svcadm disable/enable ntp' it still points to the old ntp server when I run a 'ntpq -p'. Any ideas? Thanks. Sparcman (4 Replies)
Discussion started by: sparcman
4 Replies

5. Red Hat

NTP sync problem

Hi, I have 4 machines and all are NTP configured with same ntp.conf file. But 3 machines are in sync with Time server and 4th machine is not contacting & sync with the NTP server. Please see the below details. # service ntpd stop Stopping ntpd: ... (0 Replies)
Discussion started by: uday123
0 Replies

6. AIX

NTP Client problem

Hello everybody! When I run command "ntpdate" the following error occures "ksh: ntpdate: 0403-006 Execute permission denied. " # oslevel -s 5300-08-06-0918 oslevel -r 5300-08 eny suggestion friends? :-) (3 Replies)
Discussion started by: wwwzviadi
3 Replies

7. UNIX for Dummies Questions & Answers

NTP problem

All - i tried to sysn the clock from our server to get the timing and the server IP has been added in the ntp.conf file and i have some problems here. if some1 help me to solve this problem. 1. i can ping server 2. i was unable to ntpq -p (time out, no response from remote server, it looks... (2 Replies)
Discussion started by: March_2007
2 Replies

8. Solaris

NTP Authen Problem

Dear All I'm solaris user . I need to setup NTP authentication for my office server but I have some question for ntp setting up. I need to know if i set authen NTP the client that doesn't set for authen key can sync time from authen ntp server or not ?? when i setup the authen at ntp server ... (1 Reply)
Discussion started by: goasutlor
1 Replies

9. HP-UX

NTP problem

Hi, I have a problem using NTP. We have a setup as following : client --> HP Server(NTP) --> DMZ server --> DMZ server --> Internet Only some clients and our HP server is using NTP, the others are using different software. Now I get an error every day : Oct 1 13:17:15 nlunx1n1 xntpd:... (4 Replies)
Discussion started by: davidg
4 Replies

10. Programming

i-node problem

First , thank you for reading the post. I Use Digital Unix 4.0F . I get an i-node number of a text file using stat() function . I want to read the file context following the i-node information . But I do not know how to read disk information accroding to i-node information . (1 Reply)
Discussion started by: chenhao_no1
1 Replies
Login or Register to Ask a Question