You are not logged in.
Why has this happened again. Why is keeping correct time in Arch such a constant struggle and general pain in the ass?
My latest Ubuntu install doesn't even use ntp or openntpd, and never looses track of time. It keeps correct time running in an
Arch Vbox along with most other virtual Linux distros.
Does this have to be this way. I could care less if my time is off by a min or so, but to be off 10min every 2-3 days is not good.
It seems the info in the wiki is ether obsolete or inaccurate and or overly complex.....with too many....some people do this....you may want to try that....
If I was a Linux GURU, I'd figure this problem out and correct/update the wiki......but since I'm not, and can't...
I have no choice but to beg for help, Please!!
This is the problem again!!!
[jeff@Arch2009p2 ~]$ ntpq -p
No association ID's returned
Last edited by jeff story (2009-12-02 22:45:58)
Check out my website for info on the Arch Linux Installer
Offline
I had a similar problem and solved it by looking at:
$ cat /var/lib/hwclock/adjtime
-0.054927 1259763458 0.000000
1259763458
LOCAL
The first number should be somewhat low. If it's high, rm that file, set the time with ntp or "date -s <time>" and write it to the hardware clock (hwclock -w).
It did the trick to me, so good luck.
Offline
Jeff,
I'm not sure why time is giving you so much grief ... it should not.
Let me try to help.
This is what I've always done, and it works.
1. pacman -S ntp
2. create an /etc/ntp.conf
Here is mine:
restrict default noquery notrust nomodify
restrict 127.0.0.1
restrict 192.168.1.0 mask 255.255.255.0 nomodify
fudge 127.127.1.0 stratum 3
server 127.127.1.0
# Public NTP servers to synch to (Canadian) stratum 2
server tick.utoronto.ca
server timeserver.cs.umb.edu
server time.sinectis.com.ar
restrict server tick.utoronto.ca noquery nomodify
restrict timeserver.cs.umb.edu noquery nomodify
restrict time.sinectis.com.ar noquery nomodify
driftfile /etc/ntp.drift
logfile /var/log/ntp.log
The really important part is the server.something.com (or ca, .edu, etc.) Make sure you have the same server in the restrict as well as in the server line.
3. To make sure your machine does not have to give "big jumps" when adjusting add the following to your /etc/rc.local:
# Synchromize time
ntpdate tick.utoronto.ca
And that's it.
Naturally, use whatever time servers seem more appropriate to your needs but other than that you should be OK.
BTW, if you get the time servers from the web always test to make sure they are active ... just ping them and make sure you get a response.
All the best now !!
R.
Offline
Simpler: pacman -S openntpd, and add openntpd to your $DAEMONS array, or, if you need to wait until there is an Internet connection available, then...
/etc/rc.local:
# ...
( until ping -c1 google.com &> /dev/null; do
sleep 15
done
/etc/rc.d/openntpd start 2&> /dev/null
) &
Last edited by Wintervenom (2009-12-02 23:54:40)
Offline
Thanks for all the input from every one!
A little additional info...
I have used or tried npt, openntpd, and exhausted everything I could apply from the wiki at
http://wiki.archlinux.org/index.php/Net … e_Protocol
I started with openntpd until it stopped working, then switched to ntp and have had time stay accurate with ntp.
Ntp has quit working and this is the second time.
See the output to the ntpq -p command (No association ID's returned) above. Same symptoms as previously, but I don't know exactly what I did that fixed it when it quit the first time.
The wiki states:
One more thing that you may want to do. In some cases, your /etc/ntp.conf file may be overwritten by dhcp. To avoid this, edit the /etc/conf.d/dhcpcd file and add -N to the line that starts with 'dhcpcd -t 10'.
I'm thinking this may be related to my problem, but I have implemented the solution/s as documented....
Also I'm using networkmanager if this can possibly further complicate the problem.
Last edited by jeff story (2009-12-03 09:58:11)
Check out my website for info on the Arch Linux Installer
Offline
When using ntp you may want to add the addresses of the ntp servers you use to your hosts file.
I have changed from openntpd to ntp and it was not working at first because ntp was starting _before_ I had a network connection running, thus not being able to translate the names to IPs and discarding all the servers in the list.
If you add the correspondence IP - address to your hosts file then it will just timeout when trying to contact the servers and it will keep trying until there is a network connection and it succeeds.
Oh and the latest ubuntu may use ntpdate on startup (I'm not sure and I don't really care) which will only update the time on startup (unless there is a cron job to keep running ntpdate). Running ntp as a daemon allows for a continuous adjustment of time even if the computer is on for a long time.
Ntpdate is owned by ntp so no magic there, it just seems that ubuntu doesn't ship everything together, it's their decision.
$ pacman -Qo `which ntpdate`
/usr/bin/ntpdate is owned by ntp 4.2.4p7-3
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Time is one of those things I'm picky about too. The adjtime tip by Sugat_ is probably where you problem lies. If hwclock finds a skew between the system and hardware clock it adds to the value Surgat mentioned. Then a program like ntp will gradually adjust to the correct using the skew. This may sound like a pain in the ass but it was created with the thought of servers in mind which is a good idea so you don't get radical time switches (and because when it was created some programs would not deal well with large time shifts). Basically I cheat how I do my time. In the root crontab, I do:
03 00 * * * /usr/sbin/ntpd -s && hwclock -w # d - set clock
04 00 * * 0 rm /var/lib/hwclock/adjtime # w - rm timeskew
'ntpd -s' is from openntp and will set the time immediately, and then I'm sure the hardware clock gets set by it and then periodically remove the adjtime. I didn't think that last was needed but apparently hwclock gets invoked on boot up.
Setting Up a Scripting Environment | Proud donor to wikipedia - link
Offline
Rebooted a few times while trying to troubleshoot ntp .... for some unknown reason .... ntp connects and functional and clock is correct!?!?
Now if I could just figure out why it seems to come and go I'd feel a lot better prepared to deal with this issue next time it decides to stop working.
$ ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
ntp.your.org .INIT. 16 u 48 64 0 0.000 0.000 0.000
173-45-238-221. .INIT. 16 u 46 64 0 0.000 0.000 0.000
www1.bitvector. .INIT. 16 u 42 64 0 0.000 0.000 0.000
router.w0ss.com .INIT. 16 u 41 64 0 0.000 0.000 0.000
caesar.cs.wisc. 128.105.201.11 2 u 43 64 7 1262.06 -249.40 349.630
dr-zaius.cs.wis 128.105.201.11 2 u 41 64 7 1246.51 -236.47 339.481
zoroaster.sf-ba 128.105.201.11 2 u 40 64 7 2231.13 -561.47 618.550
Check out my website for info on the Arch Linux Installer
Offline
I just installed openntpd package and added the daemon to /etc/rc.conf and everything works just fine...
Offline
echo "echo echo ehco ehlo ehllo"
hello?
Last edited by Gen2ly (2009-12-03 14:28:13)
Setting Up a Scripting Environment | Proud donor to wikipedia - link
Offline
Have you ensured your network daemon is coming up before the ntp daemon?
It sounds like asynchronous daemon initialization could be your culprit, as has been suggested. This is likely the case if you have backgrounded ntp and/or network.
Offline
I had problems as well with my time, but I found out that the original /etc/rc.conf had HARDWARECLOCK="local" instead of HARDWARECLOCK="localtime".
Don't panic!
Offline
My system time is broken again!!!
I notice upon rebooting,
NTP CLIENT [FAIL]
NTP DAEMON [DONE]
Here's some additional info.
[jeff@Arch2009p2 ~]$ ntpq -p
No association ID's returned
My /etc/rc.conf file:
#
# /etc/rc.conf - Main Configuration for Arch Linux
#
# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
# TIMEZONE:US/Pacific
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="en_US.utf8"
HARDWARECLOCK="UTC"
USEDIRECTISA="yes"
TIMEZONE="America/Los_Angeles"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"
# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=(fuse vboxdrv vboxnetflt)
# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"
# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="Arch2009p2"
# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
# - prefix an entry in INTERFACES with a ! to disable it
# - no hyphens in your interface names - Bash doesn't like it
#
# DHCP: Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#
eth0="dhcp"
INTERFACES=(eth0)
# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
# - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.2.1"
ROUTES=(!gateway)
# Enable these network profiles at boot-up. These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
# - set to 'menu' to present a menu during boot-up (dialog package required)
# - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(main)
# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
# - prefix a daemon with a ! to disable it
# - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng hal networkmanager netfs rpcbind nfs-common nfs-server crond fam avahi-daemon stbd sshd ntpdate ntpd tun)
#
My /etc/hosts file.
#
# /etc/hosts: static lookup table for host names
#
127.0.0.1 Arch2009p2 localhost.localdomain localhost
#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost Arch2009p2
0.north-america.pool.ntp.org
1.north-america.pool.ntp.or
2.north-america.pool.ntp.org
3.north-america.pool.ntp.org
ntp1.cs.wisc.edu
ntp3.cs.wisc.edu
ntp3.sf-bay.org
# End of file
My /etc/ntp.conf file.
restrict default noquery notrust nomodify
restrict 127.0.0.1
restrict 192.168.2.2 mask 255.255.255.0 nomodify
# public NTP servers to sync with (all stratum 2)
server 0.north-america.pool.ntp.org
server 1.north-america.pool.ntp.org
server 2.north-america.pool.ntp.org
server 3.north-america.pool.ntp.org
server ntp1.cs.wisc.edu
server ntp3.cs.wisc.edu
server ntp3.sf-bay.org
restrict ntp1.cs.wisc.edu noquery nomodify
restrict ntp3.cs.wisc.edu noquery nomodify
restrict ntp3.sf-bay.org noquery nomodify
restrict 0.north-america.pool.ntp.org noquery nomodify
restrict 1.north-america.pool.ntp.org noquery nomodify
restrict 2.north-america.pool.ntp.org noquery nomodify
restrict 3.north-america.pool.ntp.org noquery nomodify
# NTP drift file - used to keep track of your system clocks
# time deviation
driftfile /etc/ntp.drift
# NTP log file
logfile /var/log/ntp.log
From the WIKI:
One more thing that you may want to do. In some cases, your /etc/ntp.conf file may be overwritten by dhcp.
To avoid this, edit the /etc/conf.d/dhcpcd file and add -N to the line that starts with 'dhcpcd -t 10'.On the system, /etc/conf.d/dhcpcd contains a single line:
DHCPCD_ARGS="-t 30 -h $HOSTNAME"
Change it to:
DHCPCD_ARGS="-N -t 30 -h $HOSTNAME"
Some have suggested adding -R to preserve /etc/resolv.conf as well.
My /etc/conf.d/dhcpcd contains no such line, so I can't "add" it to the line containing DHCPCD_ARGS="-t 30 -h $HOSTNAME".
I did add "-N -R" to the DHCPCD_ARGS line though.
My /etc/conf.d/dhcpcd.
#
# Arguments to be passed to the DHCP client daemon
#
DHCPCD_ARGS="-N -R -q"
From the WIKI:
It is recommended to add a line like the following to your /etc/rc.local file so when you boot your system,
your time will be correct (use an NTP server close to your location).
/usr/bin/ntpdate ntp1.cs.wisc.edu
My /etc/rc.local file.
#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#
alsactl restore
TIMEZONE=America/Los_Angeles
# Synchromize time
ntpdate ntp3.cs.wisc.edu
Last edited by jeff story (2009-12-09 19:11:00)
Check out my website for info on the Arch Linux Installer
Offline
Your /etc/hosts needs an IP _before_ the name of the servers, otherwise the entries are pointless, check the valid format for entries in that file.
Also the .pool.ntp.org servers you are using don't resolve to a single IP so I guess that hosts file trick may not work with those, it is intended for single IPs, check which servers are closer to you and use them.
Another thing I notice is that it seems you are just copying stuff from the wiki without understanding what you are doing ... thats not a good way to try to make things work.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
it seems you are just copying stuff from the wiki without understanding what you are doing
Yes exactly!!
Actually I'm "trying" stuff rather than copying it though.
If I understood all this, my system would be configured correctly and most likely my system time would be working....and I'd have no reason to be here asking for help....
Since I don't understand this, I am blindly following the wiki for "the fix" to my problem, not even "slightly" understanding much of it.
I do hope to accomplish two things with this post though.
1) fix my ntp problems
2) learn something in the process!
Would you please care to explain the address format of the time servers and how to "find the closest" server?
0.north-america.pool.ntp.org
1.north-america.pool.ntp.or
2.north-america.pool.ntp.org
3.north-america.pool.ntp.org
ntp1.cs.wisc.edu
ntp3.cs.wisc.edu
ntp3.sf-bay.org
I tried the following in my /etc/hosts, with no luck.
128.105.201.11 ntp1.cs.wisc.edu
128.105.201.11 ntp3.cs.wisc.edu
128.105.201.11 ntp3.sf-bay.org
[jeff@Arch2009p2 ~]$ ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
ntp1.cs.wisc.ed .INIT. 16 u - 64 0 0.000 0.000 0.000
ntp1.cs.wisc.ed .INIT. 16 u - 64 0 0.000 0.000 0.000
ntp1.cs.wisc.ed .INIT. 16 u - 64 0 0.000 0.000 0.000
Check out my website for info on the Arch Linux Installer
Offline
To find the closest server then I guess you have to look in the web for any institution near you that provides the ntp service and find out the IP.
Trying stuff without knowing exactly what the problem is isn't a good idea too .
I'm going to explain quickly how the hosts file works and why the workaround will not work with the pool servers, I'll leave the rest for you to search on google and figure out.
The hosts file can be used to associate a name with an IP, when trying to contact any site by name the hosts file is checked first to see if the name is know and which IP it corresponds to, thats why it needs and IP _and_ a name, the format is:
IP name1 name2 ....
Much like the localhost line you already have there, as far as I know 1 IP can be know by many names but 1 name can't have more than 1 IP in the hosts file (I may be wrong here).
The pool servers will not work because 1 name has more than 1 IP, and again you are not reading the wiki and trying what is there to try and understand how things work, did you even try to use dnslookup with the IPs in the wiki and then with the pool servers you want to use and see the differences?
128.105.201.11 ntp1.cs.wisc.edu
128.105.201.11 ntp3.cs.wisc.edu
128.105.201.11 ntp3.sf-bay.org
Did you just make up the IP and expected it to work? Thats not the IP that is in the wiki.
What you did is just make the association of 128.105.201.11 with the 3 names, thats why 'ntpq -p' lists only one server and because you used the wrong IP it doesn't work.
My advice is that you try to understand what you want to do, if you can't understand it you have 2 choices, test it anyway and undo the changes if it doesn't work or don't try it at all. If you keep changing and breaking things all over the place no one will be able to help you.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
If all you want to do is sync the machine to the local time, just install openntpd and set it to run as a deamon (this stuff is discussed earlier). If there is some other problem, is there anything in the logs? Have you seen if there is any more descriptive stuff from running "/etc/rc.d/openntpd restart"?
Matt
"It is very difficult to educate the educated."
Offline
Thanks for the help and patience Rookie.
I guess I am kinda guilty in not wanting to put much into "just want to see close to the correct time on my desktop" problem!!!
I tend to prioritize the time I spend on my new Linux hobby by what I find interesting and or FUN.....
To be honest, this time issue has been neither, and is something I'd like to find a quick fix, and move on.
I haven't spent much/any time actually "studying" it....my bad!!
And no, I didn't just randomly guess 4 numbers between 0 and 255, put them together with decimal points, and hope for the best....
I used my random time server IP address generating algorithm ....just kiddn!!
I got them from my ntpq -p output (#8 post above) that was when ntp was working.
My ntp.log file:
8 Dec 00:00:47 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 00:06:10 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 00:08:17 ntpd[1668]: time reset +1.958317 s
8 Dec 00:13:01 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 00:23:40 ntpd[1668]: time reset +1.960090 s
8 Dec 00:27:59 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 00:33:21 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 00:38:42 ntpd[1668]: time reset +1.951408 s
8 Dec 00:45:30 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 00:48:24 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 00:54:22 ntpd[1668]: time reset +2.034356 s
8 Dec 01:00:26 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 01:08:57 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 01:10:28 ntpd[1668]: time reset +2.060369 s
8 Dec 01:16:26 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 01:20:45 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 01:26:26 ntpd[1668]: no servers reachable
8 Dec 01:31:32 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 01:31:34 ntpd[1668]: time reset +2.768349 s
8 Dec 01:38:23 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 01:47:01 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 01:47:03 ntpd[1668]: time reset +1.893794 s
8 Dec 01:58:09 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 01:58:14 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 01:58:48 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 02:02:31 ntpd[1668]: time reset +1.940767 s
8 Dec 02:08:04 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 02:12:17 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 02:18:14 ntpd[1668]: time reset +1.977182 s
8 Dec 02:22:57 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 02:28:14 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 02:34:06 ntpd[1668]: time reset +1.986197 s
8 Dec 02:39:11 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 02:42:50 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 02:50:01 ntpd[1668]: time reset +2.012326 s
8 Dec 02:54:36 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 02:57:59 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 03:05:31 ntpd[1668]: time reset +1.900115 s
8 Dec 03:15:00 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 03:16:03 ntpd[1668]: no servers reachable
8 Dec 03:16:03 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 03:21:27 ntpd[1668]: time reset +1.951422 s
8 Dec 03:27:49 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 03:36:30 ntpd[1668]: time reset +1.871193 s
8 Dec 03:42:13 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 03:51:38 ntpd[1668]: time reset +1.902758 s
8 Dec 04:00:30 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 04:01:18 ntpd[1668]: synchronized to 206.55.70.42, stratum 2
8 Dec 04:03:35 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 04:06:42 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 04:07:03 ntpd[1668]: time reset +1.878555 s
8 Dec 04:11:43 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 04:14:38 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 04:17:21 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 04:22:09 ntpd[1668]: time reset +1.820429 s
8 Dec 04:26:44 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 04:37:33 ntpd[1668]: time reset +1.884735 s
8 Dec 04:41:59 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 04:52:49 ntpd[1668]: time reset +1.904257 s
8 Dec 05:01:26 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 05:02:14 ntpd[1668]: no servers reachable
8 Dec 05:02:18 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 05:08:45 ntpd[1668]: time reset +1.934852 s
8 Dec 05:15:36 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 05:24:32 ntpd[1668]: time reset +1.989070 s
8 Dec 05:33:32 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 05:35:41 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 05:39:52 ntpd[1668]: time reset +1.848521 s
8 Dec 05:45:38 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 05:49:53 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 05:55:34 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 05:55:36 ntpd[1668]: time reset +1.964663 s
8 Dec 06:00:30 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 06:10:38 ntpd[1668]: time reset +1.842886 s
8 Dec 06:15:04 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 06:25:49 ntpd[1668]: time reset +1.844650 s
8 Dec 06:31:03 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 06:41:32 ntpd[1668]: time reset +1.951328 s
8 Dec 06:48:37 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 06:56:54 ntpd[1668]: time reset +1.887304 s
8 Dec 07:01:44 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 07:12:27 ntpd[1668]: time reset +1.920628 s
8 Dec 07:18:13 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 07:28:29 ntpd[1668]: time reset +1.980813 s
8 Dec 07:33:42 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 07:38:39 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 07:43:49 ntpd[1668]: time reset +1.881431 s
8 Dec 07:50:03 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 07:53:34 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 07:59:46 ntpd[1668]: time reset +1.965866 s
8 Dec 08:04:45 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 08:08:26 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 08:15:38 ntpd[1668]: time reset +1.909397 s
8 Dec 08:21:58 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 08:31:06 ntpd[1668]: time reset +1.875074 s
8 Dec 08:37:27 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 08:41:17 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 08:45:00 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 08:46:43 ntpd[1668]: time reset +1.901449 s
8 Dec 08:51:02 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 08:56:23 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 09:02:11 ntpd[1668]: time reset +1.913327 s
8 Dec 09:07:47 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 09:11:36 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 09:17:35 ntpd[1668]: time reset +1.879629 s
8 Dec 09:26:08 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 09:28:47 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 09:33:41 ntpd[1668]: time reset +1.955124 s
8 Dec 09:39:45 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 09:43:00 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 09:49:32 ntpd[1668]: time reset +1.956294 s
8 Dec 09:53:52 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 09:58:09 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 10:05:09 ntpd[1668]: time reset +1.870515 s
8 Dec 10:10:46 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 10:20:30 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 10:20:56 ntpd[1668]: time reset +1.943897 s
8 Dec 10:26:15 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 10:31:36 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 10:36:01 ntpd[1668]: time reset +1.847729 s
8 Dec 10:40:58 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 10:51:45 ntpd[1668]: time reset +1.889479 s
8 Dec 10:57:04 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 11:01:49 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 11:06:50 ntpd[1668]: time reset +1.839236 s
8 Dec 11:14:02 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 11:19:16 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 11:22:41 ntpd[1668]: time reset +1.968947 s
8 Dec 11:27:02 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 11:32:23 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 11:38:41 ntpd[1668]: time reset +1.903414 s
8 Dec 11:47:32 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 11:54:16 ntpd[1668]: time reset +1.915699 s
8 Dec 11:59:17 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 12:04:31 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 12:10:06 ntpd[1668]: time reset +1.846985 s
8 Dec 12:15:07 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 12:20:32 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 12:25:53 ntpd[1668]: time reset +1.985553 s
8 Dec 12:32:53 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 12:41:32 ntpd[1668]: time reset +1.929433 s
8 Dec 12:46:47 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 12:57:15 ntpd[1668]: time reset +1.946246 s
8 Dec 13:02:05 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 13:07:30 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 13:13:10 ntpd[1668]: time reset +1.927305 s
8 Dec 13:19:04 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 13:28:49 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 13:29:15 ntpd[1668]: time reset +1.972395 s
8 Dec 13:34:22 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 13:39:47 ntpd[1668]: synchronized to 128.105.39.11, stratum 2
8 Dec 13:44:19 ntpd[1668]: time reset +1.838454 s
8 Dec 13:48:51 ntpd[1668]: synchronized to 128.105.37.11, stratum 2
8 Dec 13:59:42 ntpd[1668]: time reset +1.850518 s
8 Dec 14:06:32 ntpd[1668]: ntpd exiting on signal 15
8 Dec 14:07:25 ntpd[1609]: signal_no_reset: signal 17 had flags 4000000
8 Dec 14:09:31 ntpd[1609]: ntpd exiting on signal 15
8 Dec 14:09:31 ntpd[1608]: ntpd exiting on signal 15
8 Dec 14:10:32 ntpd[1622]: signal_no_reset: signal 17 had flags 4000000
8 Dec 14:10:59 ntpd[1621]: ntpd exiting on signal 15
8 Dec 14:10:59 ntpd[1622]: ntpd exiting on signal 15
8 Dec 14:11:55 ntpd[1591]: signal_no_reset: signal 17 had flags 4000000
8 Dec 14:19:56 ntpd[1659]: signal_no_reset: signal 17 had flags 4000000
8 Dec 14:21:01 ntpd[1657]: Listening on interface #4 eth0, fe80::224:8cff:febc:ccee#123 Enabled
8 Dec 14:21:01 ntpd[1657]: Listening on interface #5 eth0, 192.168.2.2#123 Enabled
8 Dec 14:21:01 ntpd[1657]: new interface(s) found: waking up resolver
9 Dec 01:21:04 ntpd[1657]: ntpd exiting on signal 15
9 Dec 01:25:33 ntpd[1649]: signal_no_reset: signal 17 had flags 4000000
9 Dec 01:27:42 ntpd[1649]: ntpd exiting on signal 15
9 Dec 01:27:42 ntpd[1648]: ntpd exiting on signal 15
9 Dec 01:28:33 ntpd[1600]: signal_no_reset: signal 17 had flags 4000000
9 Dec 01:32:01 ntpd[1629]: signal_no_reset: signal 17 had flags 4000000
9 Dec 01:32:01 ntpd[1628]: bind() fd 20, family AF_INET6, port 123, scope 2, addr fe80::224:8cff:febc:ccee, mcast=0 flags=0x11 fails: Cannot assign requested address
9 Dec 01:32:01 ntpd[1628]: unable to create socket on eth0 (5) for fe80::224:8cff:febc:ccee#123
9 Dec 01:32:01 ntpd[1628]: failed to initialize interface for address fe80::224:8cff:febc:ccee
ntpq -p
Last edited by jeff story (2009-12-10 10:07:18)
Check out my website for info on the Arch Linux Installer
Offline
Ok then, but it seems you picked a bad server, look at the jitter, that can't be good if you want to have accurate time.
From your ntp.log it seems it was able to sync sort of fine during Dec 8th.
The servers I use give me this:
$ ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*ntp02.oal.ul.pt 194.117.9.129 2 u 32 512 377 7.339 0.239 0.585
+ntp04.oal.ul.pt 194.117.9.129 2 u 330 512 377 7.668 0.495 0.748
I'm using servers located in my country and the only thing about the servers I have in the hosts file is this
194.117.9.130 ntp02.oal.ul.pt
194.117.9.136 ntp04.oal.ul.pt
Things work just fine here. I don't have IPv6 enabled (you do but it shouldn't matter that much). I do background the ntp daemon and wicd (that I use to manage my connection). When I get to XFCE I still don't have a network connection, I can watch it finishing the connection and ntp works fine here.
DAEMONS=(syslog-ng shm_mnt !netfs hal oss iptables @wicd @dnsmasq @cron !network @cpufreq @wireless-regdom @smartd @cups @ntpd @centos_chroot !bluetooth)
Just as example a bit of my ntp.log
9 Dec 09:30:30 ntpd[3410]: Listening on interface #2 wlan0, 10.3.9.21#123 Enabled
9 Dec 09:30:30 ntpd[3410]: new interface(s) found: waking up resolver
9 Dec 09:34:03 ntpd[3410]: synchronized to 194.117.9.130, stratum 2
9 Dec 09:34:03 ntpd[3410]: time reset -0.268664 s
9 Dec 09:34:03 ntpd[3410]: kernel time sync status change 2001
9 Dec 09:42:56 ntpd[3410]: synchronized to 194.117.9.130, stratum 2
9 Dec 14:21:46 ntpd[3410]: kernel time sync status change 6001
9 Dec 14:38:52 ntpd[3410]: kernel time sync status change 2001
9 Dec 16:55:28 ntpd[3410]: kernel time sync status change 6001
9 Dec 17:01:44 ntpd[3410]: ntpd exiting on signal 15
9 Dec 18:52:10 ntpd[3326]: ntpd exiting on signal 15
9 Dec 19:53:32 ntpd[3313]: ntpd exiting on signal 15
Try to pick other servers and keep things simple and while trying to get it to work don't use the .pool servers. Install dnsutils and try to use dnslookup and understand the steps you are doing.
Edit:
You were trying to use the ntp server from which the other servers in your list are/were syncing ... I'm not sure it will work, use the proper IPs. In case of doubt use the example in the wiki _as is_ and then slightly adapt it to your needs.
Last edited by R00KIE (2009-12-10 11:23:54)
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
OK.........
Time (NTP) is working again. I'll mark this as solved when it "stays" working for a while.
I made the following changes to my /etc/ntp.conf file and /etc/hosts file.
[jeff@Arch2009p2 ~]$ ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
ntp1.cs.wisc.ed 128.105.201.11 2 u 21 64 1 132.093 167.074 0.001
ntp3.cs.wisc.ed 128.105.201.11 2 u 57 64 1 131.912 91.743 0.001
ntp3.sf-bay.org 128.252.19.1 2 u 27 64 1 195.795 151.089 0.001
/etc/ntp.conf
restrict default noquery notrust nomodify
restrict 127.0.0.1
restrict 192.168.2.2 mask 255.255.255.0 nomodify
# public NTP servers to sync with (all stratum 2)
server ntp1.cs.wisc.edu
server ntp3.cs.wisc.edu
server ntp3.sf-bay.org
restrict ntp1.cs.wisc.edu noquery nomodify
restrict ntp3.cs.wisc.edu noquery nomodify
restrict ntp3.sf-bay.org noquery nomodify
# NTP drift file - used to keep track of your system clocks
# time deviation
driftfile /etc/ntp.drift
# NTP log file
logfile /var/log/ntp.log
/etc/hosts
#
# /etc/hosts: static lookup table for host names
#
127.0.0.1 Arch2009p2 localhost.localdomain localhost
#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost Arch2009p2
128.105.39.11 ntp1.cs.wisc.edu
128.105.37.11 ntp3.cs.wisc.edu
206.55.70.42 ntp3.sf-bay.org
# End of file
Check out my website for info on the Arch Linux Installer
Offline