cancel
Showing results for 
Search instead for 
Did you mean: 

NTPDATE - Help please

 
SOLVED
Go to solution
Highlighted
Frequent Advisor

NTPDATE - Help please

I am trying to configure a NTPDATE in my server. But i can't.
With this command:

[root@lab1 sbin]# ntpdate -qv clock2.redhat.com
I didn't get any answer.

But ntpdate is running in my server.
[root@lab1 sbin]# /sbin/service ntpd status
ntpd (pid 8962 8959) is running...


this command:
[root@lab1 sbin]# /usr/sbin/ntpq
ntpq> peer
localhost.localdomain: timed out, nothing received
***Request timed out


The /etc/ntp.conf
:

# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.

restrict default nomodify notrap 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


# -- CLIENT NETWORK -------
# Permit systems on this network to synchronize with this
# time service. Do not permit those systems to modify the
# configuration of this service. Also, do not use those
# systems as peers for synchronization.
# restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap


restrict 172.27.109.42 mask 255.255.255.0 nomodify notrap

# --- OUR TIMESERVERS -----
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org


restrict 66.187.224.4 mask 255.255.255.255 nomodify notrap noquery
# The server listed below is clock2.redhat.com
server 66.187.224.4

# --- NTP MULTICASTCLIENT ---
#multicastclient # listen on default 224.0.1.1
# restrict 224.0.1.1 mask 255.255.255.255 nomodify notrap
# restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap



# --- GENERAL CONFIGURATION ---
#
# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available. The
# default stratum is usually 3, but in this case we elect to use stratum
# 0. Since the server line does not have the prefer keyword, this driver
# is never used for synchronization, unless no other other
# synchronization source is available. In case the local host is
# controlled by some external source, such as an external oscillator or
# another protocol, the prefer keyword would cause the local host to
# disregard all other synchronization sources, unless the kernel
# modifications are in use and declare an unsynchronized condition.
#
#server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10


#
# Drift file. Put this in a directory which the daemon can write to.
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
#
driftfile /var/lib/ntp/drift
broadcastdelay 0.008

#
# Keys file. If you want to diddle your server at run time, make a
# keys file (mode 600 for sure) and define the key number to be
# used for making requests.
#
# PLEASE DO NOT USE THE DEFAULT VALUES HERE. Pick your own, or remote
# systems might be able to reset your clock at will. Note also that
# ntpd is started with a -A flag, disabling authentication, that
# will have to be removed as well.
#
keys /etc/ntp/keys



Any help ?????????
33 REPLIES 33
Highlighted
Honored Contributor

Re: NTPDATE - Help please

First of all, you cannot run the ntpdate with the ntpd service started. You must stop the ntpd service and then run ntpdate.

If you don't receive any answer, probably your system is firewalled, check your firewall status.

¿What distro are you using?
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Highlighted
Frequent Advisor

Re: NTPDATE - Help please

hmmm

I stop to the command.

I am using Red Hat.

So... what can i do to resolve this firewall problem? =P

thanks!!
Highlighted
Honored Contributor

Re: NTPDATE - Help please

Try with:

service ntpd stop
service iptables stop
ntpdate -b
service ntpd start
ntpq -pn
chkconfig iptables off
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Highlighted
Honored Contributor

Re: NTPDATE - Help please

in /etc/ntp.conf file put only the lines

restrict default nomodify notrap noquery
restrict 127.0.0.1
driftfile /var/lib/ntp/drift
keys /etc/ntp/keys
and along trhe above lines put only the ntp server name like

server x.x.x.x

and then put your ntp server's ip address in /etc/ntp/step-tickers file.

now all set. start the ntp service and check.
a warrior never quits
Highlighted
Frequent Advisor

Re: NTPDATE - Help please

I did everthing you said but didn't work;

[root@lab1 media]# /etc/init.d/ntpd start
ntpd: Synchronizing with time server: [FAILED]
Starting ntpd:


[root@lab1 media]# /etc/init.d/ntpd status
ntpd (pid 19488 19487 19464 19461) is running...



I think is some firewall problem. (someone already said this...)
But what can i do to solve?

Thanks
Highlighted
Frequent Advisor

Re: NTPDATE - Help please

more information:

[root@lab1 /]# ping 66.187.224.4
PING 66.187.224.4 (66.187.224.4) 56(84) bytes of data.
From 172.27.109.3 icmp_seq=0 Packet filtered
From 172.27.109.3 icmp_seq=1 Packet filtered
From 172.27.109.3 icmp_seq=3 Packet filtered
From 172.27.109.3 icmp_seq=4 Packet filtered

is some firewall problem???

what can i do to solve????
Highlighted
Honored Contributor

Re: NTPDATE - Help please

yes, the symptomp says the time server has firewall or your gateway has firewall.
a warrior never quits
Highlighted
Honored Contributor

Re: NTPDATE - Help please

Just an added note. You also might what to run

chkconfig ntpd on

That won't solve your connection issue, but the daemon will start after boot up.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Highlighted
Frequent Advisor

Re: NTPDATE - Help please

Ok.... i know that exist a firewall... but what can i do to solve???