Koozali.org: home of the SME Server

Date go creazy

Offline larieu

  • *****
  • 214
  • +0/-0
Date go creazy
« on: December 08, 2008, 03:48:15 PM »
I have a strange situation

I noticed this from several days ago when I updated all packages installed on server
and I don't know from where to catch the problem
any hint will be welcomed

If I set manually the date and time on server after several minutes (15-20) I can notify that the server go in future
if I let them "to do his job" after 6-8 hours it goes up to 4-6 hour in future
in the past I had the NTP service set to europe.pool.ntp.org
and everything seems to work normall

after I noticed one +10 hour advance of the time on server I changed to several NTP public servers
the behaviour remain the same (my server predict the future)

I tried follwing 2 work around
1. I checked the server settings for the time (It's ok EET with daylight saving)
I set the clock manually by date and wait several minutes
in 5 minutes I was able to observe an 40 s "acceleration per minute"
for example I set 2008 12 08 10 00 00 and after 5 minutes
I had
2008 12 08 18 20 (expected 2008 12 08 15 00)

2. I set
hwclock --set --localtime --date="appropriate date" (for example 2008 12 08 10 00 00"  )
after that I set
net time set
wait for 5 minutes
the same +40s per minute was seen

I don't know another approach to this problem
thank you in advance for any comment
« Last Edit: December 08, 2008, 06:17:26 PM by larieu »
if everybody's life around you is better, probably yours will be better
just try to improve their life

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Date go creazy
« Reply #1 on: December 08, 2008, 07:31:33 PM »
Is this a hardware server or perhaps a VMWare server?
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline larieu

  • *****
  • 214
  • +0/-0
Re: Date go creazy
« Reply #2 on: December 08, 2008, 08:59:24 PM »
it is not an virtual one

Is one hardware server
based on Intel TM board with 965 chipset
INTEL DQ965GF
the BIOS date is 07/27/2008 v 6079
right now I sow that it exist a new version 01/12/2008 v 6088 on INTEL site
but it will take some time to look on version changing to see if it will help me

I wonder if it exist an way to have a list of all contribs I installed on this server until now
to see if some of them can cause this kind of trouble

if everybody's life around you is better, probably yours will be better
just try to improve their life

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Date go creazy
« Reply #3 on: December 08, 2008, 10:27:40 PM »
I wonder if it exist an way to have a list of all contribs I installed on this server until now
to see if some of them can cause this kind of trouble
I doubt if that is the cause, but if you have a recent installation from the 7.x tree you might have the newrpms tool in the audit folder you could run to see what was additionally installed.

Log in as root and observe the output of this command:
Code: [Select]
/sbin/e-smith/audittools/newrpms
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline larieu

  • *****
  • 214
  • +0/-0
Re: Date go creazy
« Reply #4 on: December 08, 2008, 10:30:37 PM »
this are the packages installed last time

[root@mail ~]# /sbin/e-smith/audittools/newrpms
==============================================================
WARNING: Additional commands may be required after running yum
==============================================================
Loading "installonlyn" plugin
Loading "fastestmirror" plugin
Loading "smeserver" plugin
Setting up repositories
Loading mirror speeds from cached hostfile
Reading repository metadata in from local files
Excluding Packages from CentOS - os
Finished
Excluding Packages from CentOS - updates
Finished
Extra Packages
GeoIP.i386                               1.4.4-1.el4.centos     installed
fping.i386                               2.4-1.b2.2.el4.rf      installed
ghostscript-fonts.noarch                 6.0-4rvda              installed
hddtemp.i386                             0.3-0.beta12.2.2.el4.r installed
hylafax.i386                             20080423:4.4.4-1.el4.s installed
kernel.i686                              2.6.9-67.0.7.EL        installed
kernel.i686                              2.6.9-67.0.4.EL        installed
kernel.i686                              2.6.9-67.0.1.EL        installed
kernel-smp.i686                          2.6.9-67.0.1.EL        installed
kernel-smp.i686                          2.6.9-67.0.7.EL        installed
kernel-smp.i686                          2.6.9-67.0.4.EL        installed
kronolith-h3.noarch                      2.2-1.el4.sme          installed
libmcrypt.i386                           2.5.7-5.el4            installed
metamail.i386                            2.7-28                 installed
mnemo-h3.noarch                          2.2.1-1.el4.sme        installed
monitor-edid.i386                        1.11-1.el4.remi        installed
nag-h3.noarch                            2.2-1.el4.sme          installed
ocsinventory-agent.noarch                0.0.6-1.el4.remi       installed
ocsinventory-ipdiscover.i386             1.01-2.el4.remi        installed
perl-Apache-DBI.noarch                   1.07-1.el4             installed
perl-Apache-Htpasswd.noarch              1.8-1.el4.rf           installed
perl-Class-Accessor.noarch               0.31-1.el4.rf          installed
perl-Config-Tiny.noarch                  2.12-1.el4.rf          installed
perl-Crypt-DES.i386                      2.05-3.2.el4.rf        installed
perl-Date-Pcalc.noarch                   1.2-1.2.el4.rf         installed
perl-Email-Valid.noarch                  0.179-1.el4.rf         installed
perl-Filesys-DiskFree.noarch             0.06-1.2.el4.rf        installed
perl-GD.i386                             2.41-2.el4.rf          installed
perl-GD-Graph.noarch                     1.43-1.2.el4.rf        installed
perl-GD-Graph3d.noarch                   0.63-2.2.el4.rf        installed
perl-GD-Text-Util.noarch                 0.86-1.2.el4.rf        installed
perl-Geo-IP.i386                         1.31-1.el4.centos      installed
perl-HTML-Format.noarch                  2.04-1.2.el4.rf        installed
perl-HTML-Tree.noarch                    1:3.23-2.el4           installed
perl-MIME-Lite.noarch                    3.01-5.el4             installed
perl-Math-Calc-Units.noarch              1.06-1.el4.rf          installed
perl-Net-Jabber.noarch                   2.0-1.2.el4.rf         installed
perl-Net-SNMP.noarch                     5.2.0-1.2.el4.rf       installed
perl-Net-XMPP.noarch                     1.02-1.el4.rf          installed
perl-Params-Validate.i386                0.91-1.el4.rf          installed
perl-SOAP-Lite.noarch                    0.710.08-1.el4.rf      installed
perl-Text-Autoformat.noarch              1.13-1.2.el4.rf        installed
perl-Text-Reform.noarch                  1.11-1.2.el4.rf        installed
perl-Unicode-String.i386                 2.09-6.el4             installed
perl-XML-Simple.noarch                   2.18-1.el4.rf          installed
perl-XML-Stream.noarch                   1.22-1.2.el4.rf        installed
perl-esmith-PasswordTools.noarch         0.02-2.el4.sme         installed
perl-rrdtool.i386                        1.2.28-1.el4.rf        installed
php-pear-HTTP-Request.noarch             1.4.0-1.el4.sme        installed
php-pear-Net-Socket.noarch               1.0.6-1.el4.sme        installed
php-pear-Net-URL.noarch                  1.0.14-1.el4.sme       installed
phpmyadmin.noarch                        2.11.9.3-1.el4.rf      installed
roundcube.noarch                         0.1-479svn.el4.sme     installed
rrdtool.i386                             1.2.28-1.el4.rf        installed
smeserver-certificate.noarch             1.0-1                  installed
smeserver-dirty-tools.noarch             0.0.9-2.el4.sme        installed
smeserver-gallery2.noarch                2.2-3.el4.sme          installed
smeserver-hylafax.noarch                 0.9-6.el4.sme          installed
smeserver-inventory-tools.i386           1-7.el4.sme            installed
smeserver-joomla.noarch                  1.5.1-2                installed
smeserver-lazy_admin_tools.noarch        0.9.1-2                installed
smeserver-mailstats.noarch               0.0.3-13.el4.sme       installed
smeserver-mnemo.noarch                   2.2-2.el4.sme          installed
smeserver-mod_python.noarch              0.1-1.el4.sme          installed
smeserver-nag.noarch                     2.2-1.el4.sme          installed
smeserver-nagios.noarch                  1.0.5-0                installed
smeserver-nagios-nsca.noarch             1.0.1-0.el4.sme        installed
smeserver-phpldapadmin.noarch            0.9.8.3-1.el4.sme      installed
smeserver-phpmyadmin.noarch              2.11.1.2-3.el4.sme     installed
smeserver-qpsmtpd-spamassassinlevelstars 0.0.2-1.el4.sme        installed
smeserver-roundcube.noarch               0.9-7.el4.sme          installed
smeserver-saco-qmHandle.noarch           1.3.4-3                installed
smeserver-sitemaker.noarch               2.0.1-3.el4.sme        installed
smeserver-system_monitor.noarch          1.1-1                  installed
smeserver-teamspeak-server.noarch        2.0.24.1-1.el4.sme     installed
smeserver-typo3.noarch                   4.1.1-2.el4.sme        installed
smeserver-userpanel.noarch               0.9-11.el4.sme         installed
smeserver-userpanels.noarch              1.0-22.el4.sme         installed
smeserver-vacation.noarch                1.0-30.el4.sme         installed
smeserver-wbl.noarch                     0.1.0-8.el4.sme        installed
smeserver-webshare.noarch                1.0.0-9.el4.sme        installed
================================================================
No new rpms were installed. No additional commands are required.
================================================================
if everybody's life around you is better, probably yours will be better
just try to improve their life

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Date go creazy
« Reply #5 on: December 08, 2008, 10:33:09 PM »
I do not think it is in the list. To tackle your issues I suggest you launch a bug and attach the output (not post it inline) as well as a little server history and the problems (symptoms) you are experiencing to as much detail as you can.

If you have done so, please post a link to the bug here as reference for future readers.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline ingtech

  • *
  • 6
  • +0/-0
    • ingTECH
Re: Date go creazy
« Reply #6 on: December 09, 2008, 02:55:23 PM »
:o And I thought I was the only one....
I noticed the same issue on an 7.4 server with Dutch webinterface (no vm) that I installed just last Saturday.
I don't quite remember if I had set it up initially on ntp sync or manual date/time set, but whatever I try to change from one to the other on the server-manager page it just doesn't work like it is supposed to do.
I even tried doing "/etc/init.d/ntpd stop" but reviewing the output of "ps aux" still shows ntp processes ([ntpd -n -l /dev/stdout] and [runsv ntpd]) although the time is synchronized correctly. Anyhow, this is what happened when I executed the date command after the stop command:

[root@ngtynnym ~]# date
Tue Dec  9 14:40:58 CET 2008
[root@ngtynnym ~]# date
Tue Dec  9 14:40:58 CET 2008
[root@ngtynnym ~]# date
Tue Dec  9 14:40:59 CET 2008
[root@ngtynnym ~]# date
Tue Dec  9 14:41:00 CET 2008
[root@ngtynnym ~]# date
Tue Dec  9 14:40:56 CET 2008
[root@ngtynnym ~]# date
Tue Dec  9 14:40:57 CET 2008
[root@ngtynnym ~]# date
Tue Dec  9 14:40:58 CET 2008
[root@ngtynnym ~]# date
Tue Dec  9 14:40:59 CET 2008
[root@ngtynnym ~]# date
Tue Dec  9 14:41:00 CET 2008
[root@ngtynnym ~]# date
Tue Dec  9 14:40:57 CET 2008

Before the stop command the time was around 7:50am.
Could a workaround be to stop the ntpd process continously so it (apparently) restarts and syncs to the right time?

@larieu: have you already submitted a bug report? I hope this issue is solved soon.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Date go creazy
« Reply #7 on: December 09, 2008, 09:48:53 PM »
@larieu: have you already submitted a bug report? I hope this issue is solved soon.
You don't have to wait for larieu, if you experience the problem you can create a bug report as well. :-)
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Date go creazy
« Reply #8 on: December 09, 2008, 09:53:14 PM »
I noticed the same issue on an 7.4 server with Dutch webinterface (no vm) that I installed just last Saturday.
The locale of the server-manager panels should have nothing to do with your timekeeping issues.

I don't quite remember if I had set it up initially on ntp sync or manual date/time set, but whatever I try to change from one to the other on the server-manager page it just doesn't work like it is supposed to do.
AFAIK SME Server comes default with ntpd configured on and listening to smeserver.pool.ntp.org.

I even tried doing "/etc/init.d/ntpd stop" but reviewing the output of "ps aux" still shows ntp processes ([ntpd -n -l /dev/stdout] and [runsv ntpd]) although the time is synchronized correctly.
AFAIK that service is supervised and will restart automatically.

What is the output of
Code: [Select]
ntpq -pn
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline ingtech

  • *
  • 6
  • +0/-0
    • ingTECH
Re: Date go creazy
« Reply #9 on: December 10, 2008, 07:45:17 AM »
@cactus:

[root@ngtynnym ~]# ntpq -pn
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 204.9.53.11     .INIT.          16 u    -   64    0    0.000    0.000 4000.00
 145.24.129.6    .INIT.          16 u    -   64    0    0.000    0.000 4000.00
 193.193.193.113 .INIT.          16 u    -   64    0    0.000    0.000 4000.00
 141.35.1.80     .INIT.          16 u    -   64    0    0.000    0.000 4000.00
 127.127.1.0     LOCAL(0)        10 l    -   64    0    0.000    0.000 4000.00

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Date go creazy
« Reply #10 on: December 10, 2008, 08:49:35 AM »
Code: [Select]
[root@ngtynnym ~]# ntpq -pn
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 204.9.53.11     .INIT.          16 u    -   64    0    0.000    0.000 4000.00
 145.24.129.6    .INIT.          16 u    -   64    0    0.000    0.000 4000.00
 193.193.193.113 .INIT.          16 u    -   64    0    0.000    0.000 4000.00
 141.35.1.80     .INIT.          16 u    -   64    0    0.000    0.000 4000.00
 127.127.1.0     LOCAL(0)        10 l    -   64    0    0.000    0.000 4000.00
Does it keep displaying .INIT. under the refid even after an hour or so? This looks like no connection has been established. Did you do this right after a restart?

Are you sure you did not modify anything to the configuration files for ntpd?
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline ingtech

  • *
  • 6
  • +0/-0
    • ingTECH
Re: Date go creazy
« Reply #11 on: December 10, 2008, 02:00:12 PM »
Yes sorry about that, I issued the command right after restarting ntpd.

Just checked again:

[root@ngtynnym ~]# ntpq -pn
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 204.9.53.11     64.202.112.75    2 u   19   64   77    9.168  60925.5 1301049
 145.24.129.6    193.79.237.14    2 u   30   64   77   14.044  1943667 1278265
 193.193.193.113 192.43.244.18    2 u  226   64   37   53.825  182793. 1095740
 141.35.1.80     131.234.137.23   2 u    4   64   77   30.796  1986317 1301785
*127.127.1.0     LOCAL(0)        10 l   11   64   77    0.000    0.000   0.004
[root@ngtynnym ~]# date
Wed Dec 10 08:02:16 CET 2008


Time is really lost again. What does the table tell you? Anyway, I did another:

[root@ngtynnym ~]# /etc/init.d/ntpd stop
Shutting down ntpd:                                        [  OK  ]
[root@ngtynnym ~]# date
Wed Dec 10 13:52:43 CET 2008

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Date go creazy
« Reply #12 on: December 10, 2008, 04:43:09 PM »
Yes sorry about that, I issued the command right after restarting ntpd.

Just checked again:

[root@ngtynnym ~]# ntpq -pn
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 204.9.53.11     64.202.112.75    2 u   19   64   77    9.168  60925.5 1301049
 145.24.129.6    193.79.237.14    2 u   30   64   77   14.044  1943667 1278265
 193.193.193.113 192.43.244.18    2 u  226   64   37   53.825  182793. 1095740
 141.35.1.80     131.234.137.23   2 u    4   64   77   30.796  1986317 1301785
*127.127.1.0     LOCAL(0)        10 l   11   64   77    0.000    0.000   0.004
[root@ngtynnym ~]# date
Wed Dec 10 08:02:16 CET 2008


Time is really lost again. What does the table tell you?
It tells me that you are synchronising against four stratum 2 servers, but that the time offset's are way off. Also the jitter, the difference between the result of multiple time queries is very high, most likely due to you trying to stop the service, where SME Server automatically restarts it.

Anyway, I did another:

[root@ngtynnym ~]# /etc/init.d/ntpd stop
Shutting down ntpd:                                        [  OK  ]
[root@ngtynnym ~]# date
Wed Dec 10 13:52:43 CET 2008

Stop doing that, as that will bring you no relief as this is a supervised service (which will keep restarting like I explained earlier).

We first need to temporarily disable ntpd:
Code: [Select]
db configuration setprop ntpd status disabledNow we stop the service:
Code: [Select]
service ntpd stopNow we can manually sync the clock like this:
Code: [Select]
ntpdate 0.smeserver.pool.ntp.orgThe output should look something like this (and the offset should be really small), if not try and repeat it a few times to see if the offset gets smaller (I believe ntpd will only adjust to a certain level at once sometimes):
Code: [Select]
[root@homer ~]# ntpdate 0.smeserver.pool.org
10 Dec 16:36:32 ntpdate[17163]: adjust time server 67.220.194.133 offset -0.003384 sec
[root@homer ~]#
Now we should be able to start ntpd again:
Code: [Select]
db configuration setprop ntpd status enabledAnd firing up the service again:
Code: [Select]
service ntpd startIt should start OK now, you can check the status like this:
Code: [Select]
service ntpd statusIf it runs it should look something like this:
Code: [Select]
[root@homer ~]# service ntpd status
run: /service/ntpd: (pid 17261) 3s, normally down; run: log: (pid 2384) 26338s
[root@homer ~]#

Now after some time do this again to see what the status of the time on your system is:
Code: [Select]
ntpq -pn
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline ingtech

  • *
  • 6
  • +0/-0
    • ingTECH
Re: Date go creazy
« Reply #13 on: December 11, 2008, 08:32:47 AM »
First of all, thanks for helping!
I just did what you described, here is result:

[root@ngtynnym ~]# date
Wed Dec 10 14:54:20 CET 2008
[root@ngtynnym ~]# db configuration setprop ntpd status disabled
[root@ngtynnym ~]# service ntpd stop
Stopping ntpd:                                             [  OK  ]
[root@ngtynnym ~]# ntpdate 0.smeserver.pool.ntp.org
11 Dec 07:56:25 ntpdate[26829]: step time server 130.89.164.77 offset 61295.620128 sec
[root@ngtynnym ~]# ntpdate 0.smeserver.pool.ntp.org
11 Dec 08:07:11 ntpdate[26853]: step time server 204.9.53.11 offset 609.301594 sec
[root@ngtynnym ~]# ntpdate 0.smeserver.pool.ntp.org
11 Dec 08:08:16 ntpdate[26864]: step time server 204.9.53.11 offset 60.929864 sec
[root@ngtynnym ~]# ntpdate 0.smeserver.pool.ntp.org
11 Dec 08:09:20 ntpdate[26869]: step time server 204.9.53.11 offset 60.930072 sec
[root@ngtynnym ~]# ntpdate 0.smeserver.pool.ntp.org
11 Dec 08:11:30 ntpdate[26877]: step time server 204.9.53.11 offset 121.860101 sec
[root@ngtynnym ~]# date
Thu Dec 11 08:11:30 CET 2008
[root@ngtynnym ~]# ntpdate 0.smeserver.pool.ntp.org
11 Dec 08:12:34 ntpdate[26884]: step time server 204.9.53.11 offset 60.930195 sec
[root@ngtynnym ~]# db configuration setprop ntpd status enabled
[root@ngtynnym ~]# service ntpd start
Starting ntpd:                                             [  OK  ]
[root@ngtynnym ~]# service ntpd status
run: /service/ntpd: (pid 26915) 1s, normally down; run: log: (pid 2923) 250663s


I haven't modified files in any way. I just configured everything by means of the server-manager webinterface.

[root@ngtynnym ~]# cat /etc/ntp.conf
#------------------------------------------------------------
#              !!DO NOT MODIFY THIS FILE!!
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at http://www.contribs.org/development/
#
# Copyright (C) 1999-2006 Mitel Networks Corporation
#------------------------------------------------------------
server 0.europe.pool.ntp.org
server 1.europe.pool.ntp.org
server 2.europe.pool.ntp.org
server 3.europe.pool.ntp.org

server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10

driftfile /etc/ntp/drift


I will post again after an hour or so to see what the time is then on this server.

Offline ingtech

  • *
  • 6
  • +0/-0
    • ingTECH
Re: Date go creazy
« Reply #14 on: December 11, 2008, 09:03:36 AM »
Just tried to see what is going on with the RTC

[root@ngtynnym ~]# date
Thu Dec 11 08:14:58 CET 2008
[root@ngtynnym ~]# service ntpd status
run: /service/ntpd: (pid 26915) 146s, normally down; run: log: (pid 2923) 250808s
[root@ngtynnym ~]# date
Thu Dec 11 08:15:20 CET 2008
[root@ngtynnym ~]# hwclock
Thu 11 Dec 2008 08:39:16 AM CET  -0.580514 seconds
...........
[root@ngtynnym ~]# date
Thu Dec 11 08:15:32 CET 2008
[root@ngtynnym ~]# hwclock --hctosys
[root@ngtynnym ~]# date
Thu Dec 11 08:42:44 CET 2008
[root@ngtynnym ~]# hwclock
Thu 11 Dec 2008 08:42:48 AM CET  -0.849626 seconds
...........
[root@ngtynnym ~]# hwclock
Thu 11 Dec 2008 08:44:49 AM CET  -0.984365 seconds
[root@ngtynnym ~]# date
Thu Dec 11 08:44:27 CET 2008


To me it seems the BIOS battery is okay. But why doesn't system time show the same time as RTC?
« Last Edit: December 11, 2008, 09:15:45 AM by ingtech »