Wrong server time

These are old archives. They are kept for historic purposes only.
ShArDiCk
Posts: 39
Joined: Tue Jun 01, 2004 7:10 pm
Location: Italy
Contact:

Wrong server time

Post by ShArDiCk »

Hi,
i've a strange problem on my network.

All server time are right. But, if i set a ban or set a topic, when i rejoin the channel, or another user join the channel, he see topic date or ban date sets at 11 hours later.

Ex: it's 9.00 . Set a topic. Rejoin channel. I see topic setted at 20.00.

What's the problem? all machines are timed with ntp. and machines time are right.
All /time server returns the correct time.

oO...

Thanx in advance.
Syzop
UnrealIRCd head coder
Posts: 2112
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Post by Syzop »

Could you paste the output of '/tsctl time'? (from the same server you have this topic problem).

Also, what IRC client are you using?
If you use mIRC, try doing '/debug -pt @debug' and do a '/topic #chan' and copypaste the debug output (the line with numeric 333). Naturally, let me know what topic time it SHOULD have been as well (eg: just set it right before you do this command) :).

-

This could be caused by: wrong tsoffset, wrong timezone on servers, wrong timezone on your machine, etc.
With the output of the above commands I'll be able to say what it is :p.
ShArDiCk
Posts: 39
Joined: Tue Jun 01, 2004 7:10 pm
Location: Italy
Contact:

Post by ShArDiCk »

tsctl time : -server- *** TStime=1118740866 time()=1118540342 TSoffset=200526

i'm using mIRC now.

Time would be 12 June 03:42 .

Set the topic.

Rejoin channel.

[03:45] <- :server 333 ShArDiCk #channel ShArDiCk 1118741096 .

my client say that the topic is setted by me on Tue Jun 14 11:24:56

uhm... i noted that:
my services server reports time as: Sun Jun 12 03:49:38 2005 CEST
my server reports time as: Sunday June 12 2005 -- 03:49 +02:00

Services are on other machine respect to my server. the ircd on that machine reports this time: Sunday June 12 2005 -- 03:49 +02:00

we are using anope.

Any ideas?

[funny]we are already watching the future[/funny]
w00t
Posts: 1136
Joined: Thu Mar 25, 2004 3:31 am
Location: Nowra, Australia

Post by w00t »

How about /tsctl alltime ?
-ChatSpike IRC Network [http://www.chatspike.net]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
Syzop
UnrealIRCd head coder
Posts: 2112
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Post by Syzop »

Right, you got a nice TSoffset (the TSoffset=200526). This might be caused by services synching the clock wrongly (especially if you see such a value around 200000 on the other servers too if you do /TSCTL ALLTIME). Basically the ircd got the time right but something told the ircd that it has to add 200526 seconds to it to get the 'correct time' ;).

You can manually reset the offset by doing '/TSCTL OFFSET + 0', or by synching the time trough services (assuming they work ok). The latter method would work network-wide.

NOTE NOTE: If you do this all your clients might stall forever (up to 200526 seconds). The IRCd really really doesn't like it if time gets changed (just like any other server program, in fact). So it could well be that you'll have to restart the ircd after this has been done. But then, the TSCTL OFFSET might not have been saved ;). As a last resort you can remove 'ircd.tune', along with the max users it also stores the time offset (or you can manually edit the value)..

blablabla.. it's way too late... I'm gone to bed ;)
w00t
Posts: 1136
Joined: Thu Mar 25, 2004 3:31 am
Location: Nowra, Australia

Post by w00t »

Actually according to that post time it's early syzop ;).

I missed the huge offset value *smacks forhead*.
-ChatSpike IRC Network [http://www.chatspike.net]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
aquanight
Official supporter
Posts: 862
Joined: Tue Mar 09, 2004 10:47 pm
Location: Boise, ID

Post by aquanight »

Also, client timezones make a difference here. The topic time sent is a TS (an integer value representing the number of seconds since Jan 1, 1970 midnight GMT), so your client will apply it's timezone offset (and daylight savings time, etc) from that when converting the number to a date. So if the two people here are 11 timezones apart then yes the dates will be 11 hours apart :) .

(Of course, the wonky clock would be more likely, that blurb is just FYI :) .)
ShArDiCk
Posts: 39
Joined: Tue Jun 01, 2004 7:10 pm
Location: Italy
Contact:

Post by ShArDiCk »

Yes! it runs!

Thanx syzop.

But i'have to do /TSCTL OFFSET + 0 on every server has wrong offset?
There'isnt a command that sync all server together with one shot?
w00t
Posts: 1136
Joined: Thu Mar 25, 2004 3:31 am
Location: Nowra, Australia

Post by w00t »

Unfortunatly no as you need to compare the output of TSCTL ALLTIME and then use TSCTL OFFSET to adjust the clocks accordingly - Many services include a way to do this automatically.

Alternativly you can run ntpd on your servers to keep time synchronised properly, this is a better situation.
-ChatSpike IRC Network [http://www.chatspike.net]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
Jason
Posts: 570
Joined: Mon Jun 14, 2004 5:09 pm

Re: Wrong server time

Post by Jason »

Uh.. w00t?
ShArDiCk wrote: What's the problem? all machines are timed with ntp. and machines time are right.
Why the hell can't my signature be empty?
"Your message contains too few characters."
aquanight
Official supporter
Posts: 862
Joined: Tue Mar 09, 2004 10:47 pm
Location: Boise, ID

Post by aquanight »

Yes, you'll need to go through each server and fix the TSCTL. I wouldn't trust using services in case that was how you got into this mess to begin with :P .
ShArDiCk
Posts: 39
Joined: Tue Jun 01, 2004 7:10 pm
Location: Italy
Contact:

Post by ShArDiCk »

a time we had os_tssync, a great module for anope. but anope sites, since two days is down.

Anyone has this module?
Jason
Posts: 570
Joined: Mon Jun 14, 2004 5:09 pm

Post by Jason »

Yes, I have that module loaded. PM me your email address
Why the hell can't my signature be empty?
"Your message contains too few characters."
ShArDiCk
Posts: 39
Joined: Tue Jun 01, 2004 7:10 pm
Location: Italy
Contact:

Post by ShArDiCk »

Thanx Jason but at the end i've found it.

To syzop:

we have installed the module for sync all servers together. loaded and used. Naturally it created a great network desync an all servers.

Now topic setted show time correctly.

But:

- me, from my server, dont see #great_channel with 150 users on it
- me, from my server, see #little_channel without modes (but registrered) with 1 user.
- another server admin, from his server, dont see #great_channel but see #little_channel with 11 users.

we had an empty server and we restart it. At relink, this server return at TSOffet of 200526, like yesterday!!!

We have tried to restart services but nothing.

... Any ideas?

Thanx in advance
Dukat
Posts: 1083
Joined: Tue Mar 16, 2004 5:44 pm
Location: Switzerland

Post by Dukat »

Just don't use this module or whatever method to synchronize your clocks.... Use ntpd, it's the best solution.
If you don't make mistakes, you aren't really trying.
- Coleman Hawkins
Post Reply