Page 1 of 1

Uptime error (negative value)

Posted: Sun Nov 13, 2011 1:25 am
by int
Hi everyone,

Are there some types of bug with UnrealIRCd 3.2.9 and *nix-amd64 ?

I'm running Unreal on Debian Squeeze 6.0.3 64bit on a VPS and the /stats u reports this values:

Code: Select all

Server Up 0 days, 0:-45:-47
For the first hour of uptime, the clock is counterclockwise. After that, begins to clockwise. This problem is reflected to nick sqline, gline, ircd/services link:

Code: Select all

*** Notice -- Possible negative TS split at link services.domain.tld (1321144933 - 1321148500 = -3567) [PLEASE SYNC YOUR CLOCKS!]
Any ideas?

Sorry for my bad english,

Regards,

Gianremo

Re: Uptime error (negative value)

Posted: Sun Nov 13, 2011 2:09 am
by int
*** EDIT ***

I've found a solution: disable set::timesynch::
The problem arise when set::timesynch::enabled is enabled and no matter what the IPs are, any IP I configure, the IRCd set clock with offset -3567:

Code: Select all

[Sun Nov 13 03:04:28 2011] - TIME SYNCH: IRCd clock succesfully synchronized to known good time source [offset: -3567, was: 0].
Now, I've another VPS (centos 5.7 64bit) and with *same* NTP Server all works correctly...

any idea?

Thanks you.

Re: Uptime error (negative value)

Posted: Sun Nov 13, 2011 1:18 pm
by Jobe
The offset of approximately 3600 seconds (one hour) suggests to me the clock on your server has NOT been set correctly. For example the clock has been set to "local time" for someone with a time zone one hour different from the time zone the server has been set to use. The solution is A) set the time zone correctly (not sure how) B) set the time correctly, C) run an NTP client to synchronize the servers clock correctly.

Re: Uptime error (negative value)

Posted: Sun Nov 13, 2011 1:27 pm
by int
Hi,
thanks for reply.

The problem arises because the Xen VPS host has -1hr than OS Guest. Unfortunately I can't set clock on Xen so I'll configure set::timesynch:: disabled.


Thanks you

Gianremo

Re: Uptime error (negative value)

Posted: Sun Nov 13, 2011 6:25 pm
by Stealth
Negative 1 hour around this time of year looks like your server was not set properly for daylight savings time.

Re: Uptime error (negative value)

Posted: Thu Nov 17, 2011 10:44 pm
by int
yeah, you right. But I don't have root access on Xen physical Host :)

set::timesynch::disabled works smoothly :D

Regards,

G.

Re: Uptime error (negative value)

Posted: Fri Nov 18, 2011 8:36 pm
by katsklaw
You don't need root on the Xen host, you only need root on the VPS guest. install and run ntpd. Cron (as root) ntpdate -u pool.ntp.org

Re: Uptime error (negative value)

Posted: Fri Nov 18, 2011 10:10 pm
by Syzop
As mentioned previously, it seems either your time zone is incorrect or the clock (which is just a matter of perspective ;p).
Disabling timesync and enabling ntp, or not using either one, does not fix anything.
Bottom line is: your GMT/UTC time is incorrect, which is used extensively in the IRC protocol and internally by the IRCd (and services).
You can see this if you do '/TSCTL ALLTIME' on your network, you will see the clock of this server is off.
Also, if you type 'date' on the shell, pay attention to both the time & the timezone, then you'll see it is not correct.

If you can't change the host, and can't change the clock, then why not change the timezone on the guest?
Change it to a zone which is 1 hour less than you currently have.
For example: if you now use Eatern Time (=UTC-5), then instead use Central Time (=UTC-6).
Or contact the hoster, of course, as this should be something they should be(come) aware of.

Re: Uptime error (negative value)

Posted: Mon Nov 21, 2011 12:40 pm
by int
thanks to all for replys

As mentioned on the first post, the time on the VPS was set correctly (with ntpd). Seems that some Xen versions have problem with squeeze 64bit.
After contacted my hoster and configured independent_wallclock with

Code: Select all

echo 1 > /proc/sys/xen/independent_wallclock
the problem is solved.

Thanks you

G.

P.s: timesynch now is enabled :)

Re: Uptime error (negative value)

Posted: Thu Nov 24, 2011 7:05 pm
by warg
katsklaw wrote:You don't need root on the Xen host, you only need root on the VPS guest. install and run ntpd. Cron (as root) ntpdate -u pool.ntp.org
It has been my experience that you cannot set the guest clock on Xen guest.

Re: Uptime error (negative value)

Posted: Thu Nov 24, 2011 7:10 pm
by Syzop
warg wrote:It has been my experience that you cannot set the guest clock on Xen guest.
Heh, this sounds exactly like something the 'independent_wallclock' option changes, which 'int' described ;)