LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   ntp client is not syncing with ntp server time (https://www.linuxquestions.org/questions/linux-server-73/ntp-client-is-not-syncing-with-ntp-server-time-4175528722/)

sagar666 12-18-2014 11:01 PM

ntp client is not syncing with ntp server time
 
Hi
NTP client is not syncing with ntp server time.

ntpq output

ntpq -pn vncin3
ntp1.pointone.com: timed out, nothing received
***Request timed out

ntpdc output

ntpdc> peers
remote local st poll reach delay offset disp
=======================================================================
*ntp1.pointone 10.193.180.101 3 64 7 0.00014 -0.003961 0.04138

ntpstat output

synchronised to NTP server (10.193.182.23) at stratum 4
time correct to within 554 ms
polling server every 64 s

Below is ntp conf file

# For more information about this file, see the man pages
# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).

driftfile /var/lib/ntp/drift

# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery

# Permit all access over the loopback interface. This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1
restrict -6 ::1
# Hosts on local network are less restricted.
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

# 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


#broadcast 192.168.1.255 autokey # broadcast server
#broadcastclient # broadcast client
#broadcast 224.0.1.1 autokey # multicast server
#multicastclient 224.0.1.1 # multicast client
#manycastserver 239.255.254.254 # manycast server
#manycastclient 239.255.254.254 autokey # manycast client

# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available.
#server 127.127.1.0 # local clock
#fudge 127.127.1.0 stratum 10

# Enable public key cryptography.
#crypto

includefile /etc/ntp/crypto/pw

# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography.
keys /etc/ntp/keys

# Specify the key identifiers which are trusted.
#trustedkey 4 8 42

# Specify the key identifier to use with the ntpdc utility.
#requestkey 8

# Specify the key identifier to use with the ntpq utility.
#controlkey

# Enable writing of statistics records.
#statistics clockstats cryptostats loopstats peerstats
server 10.193.182.23 iburst
#server ntp2 iburst
~

Why it is not syncing? please help me out

michaelk 12-19-2014 04:12 AM

Quote:

remote local st poll reach delay offset disp
=======================================================================
*ntp1.pointone 10.193.180.101 3 64 7 0.00014 -0.003961 0.04138

ntpstat output

synchronised to NTP server (10.193.182.23) at stratum 4
time correct to within 554 ms
polling server every 64 s
The leading asterisk and the output of ntpstat do indicate you are synced to your server. If the system clock is not displaying the correct time it could mean your timezone or hardware clock reference are not set correctly.

sagar666 12-19-2014 04:25 AM

Hi Michaelk,

Both are syncing correctly.

hwclock
Fri 19 Dec 2014 03:49:24 PM IST -0.219134 seconds
date
Fri Dec 19 15:49:49 IST 2014
ntpq
ntpq> peers
remote refid st t when poll reach delay offset jitter
==============================================================================
*ntp1.pointone 10.192.160.25 3 u 397 512 377 0.183 1.515 0.066

ntpq -pn ntp1 showing

ntp1.pointone.com: timed out, nothing received
***Request timed out

Why?

michaelk 12-19-2014 04:47 AM

Quote:

ntpq -pn hostname
Is trying to find the list of peers for the time server not your computer. So the command fails since administration access is limited to the server itself. ntpq -pn without a hostname or you can use localhost prints the same information that the peers command does when using ntpq interactively.


All times are GMT -5. The time now is 08:00 PM.