Koozali.org: home of the SME Server

Time server

brian read

Time server
« on: October 04, 2002, 02:15:33 PM »
I am sure under 5.1.2 the SMEServer acted as a SNTP time server, as well as syncing itself to the time server specified in trhe server manager.  However since upgrading to 5.5 (update 2), each of my desktops are getting a timeout when AboutTime tries to sync to the SMEserver.

Anyone else found this?

Cheers

Brian

Patrick Hickey

Re: Time server
« Reply #1 on: October 04, 2002, 08:19:39 PM »
The SME Server is an NTP server and I have seen no issues after the upgrade to 5.5 with Mac OS-X or WinXP clients. All sync without delay to the SME.

I have no experience with AboutTime but that's a good place to start. It is possible that this program/utility (???) has fallen behind it the ability to sync to the protocol used by the SME. The ntp protocol is quite a bit different nowadays than, say, five years ago.

What OSs are having trouble syncing? Most contemporary desktops support NTP (or the newer, more sophisticated flavors thereof) out of the box.

I would also question the need to add anything to the time configuration as the machine uses the Stratum lists as the default, but that has nothing to do with your reported issue.

patrick

brian read

Re: Time server
« Reply #2 on: October 04, 2002, 08:57:47 PM »
>What OSs are having trouble syncing? Most contemporary desktops support NTP (or the newer, more sophisticated flavors thereof) out of the box.

The OS's are Win98 and XP, but do you mean that the OS itself will sync the time with no extra input?  This did not seem to be the case in the past.  How do I configure it?

>I would also question the need to add anything to the time configuration as the machine uses the Stratum lists as the default, but that has nothing to do with your reported issue.

The Server-manager panel requires a host to be specified, so I specifiy the time host of my ISP.

>AboutTime

It is a bit long in the tooth, the "latest" version is dated 19/11/99.  Perhaps something has changed between 54.1.2 and 5.5 with the NTP protocol.

cheers

Brian

Patrick Hickey

Re: Time server
« Reply #3 on: October 04, 2002, 09:17:02 PM »
WinXP will use either Network Time (ntp and they really dislike using this as it isn't theirs or proprietary) or the Domain Controller. If a Domain Controller is present you have no option. There is a tab on the Date/Time Control Panel . You can add a time source, like the SME., or use their default server. The problem is they don't allow you to specify an interval - very typical MS foo. Again, it takes a freaking Registry hack to make it poll the time server at a reasonable interval but it DOES support the SME's time service. I think default is weekly and I prefer daily.

Win98 I have no clue and you're probably stuck with a 3rd party as MS hadn't yet ack'd the presence of the Internet at that point. Prior to XP, which marked the FIRST time MS support ntp  (pretty sure 2000 doesn't but I may be wrong) I used Tardis (  http://www.kaska.demon.co.uk/  )   as it ran as a Service, thus consmed less resource and actually worked like it should. I am not slamming what you use, but I simply have never used it.



patrick

Chaloner Hale

Re: Time server
« Reply #4 on: October 05, 2002, 12:56:31 AM »
For Windows 2000, go to the command prompt (C:\) and type;

net time /? for help and to set;

net time /setsntp:yourdomain.com

Then go into Control Panel, Admin Tools, Services and call up;

Windows Time. Set the service to Automatic and click Start.

Seems to work for me.

Chaloner Hale

brian read

Re: Time server
« Reply #5 on: October 05, 2002, 09:30:02 AM »
Patrick

Thanks for your useful posting.  i'll look at Tardis, although I presume it won't work for WIn98 (no services).

Any idea where i can find the registry hack to change the NTP update interval for XP?

Cheers

Brian

Tom Keiser

Re: Time server
« Reply #6 on: October 05, 2002, 09:52:05 AM »
Here's a freebie for NT or W2K workstations. Works flawlessly, and is nicely done. Talks perfectly to ESS and SME.

http://www.arayan.com/basri/

Program is simply called SNTP Client.

Tom

brian read

Re: Time server
« Reply #7 on: October 05, 2002, 01:39:02 PM »
On my XP workstation I went to the time panel, and found the "internet" time tab, and put in the SMEServer name, and clicked "synchronise now".  It failed!

What is the name of the NTP server in SME?  I'd like to see if it is still running.

cheers

Brian

Dave

Re: Time server
« Reply #8 on: October 06, 2002, 12:05:41 AM »
Thanks for the info on this one, I have a Win2K workstation on my network, works like a champ!

Michael Maggard

Re: Time server
« Reply #9 on: October 06, 2002, 06:34:33 AM »
brian read wrote:

> Patrick
>
> Thanks for your useful posting.  i'll look at Tardis,
> although I presume it won't work for WIn98 (no services).
>
> Any idea where i can find the registry hack to change the NTP
> update interval for XP?

MS defaults it’s time client to once a week polling. IMHO this is far too long for slippy Wintel boxes so I’ve mine set to once every 24 hours. This isn’t particularly a problem as after several go-rounds with my ISP I got the address of their local NTP server.

(Usually these are in the form of ntp.isp.domain or ntp1.isp.domain. If you call your ISP’s Tech Support invariably be prepared to explain over-and-over that you want the ntp server address and *not* nntp, this isn’t usenet news, etc. Support phone-monkeys are set for keyword recognition in some sort of weird pavlovian training regime and you must shock them out of it to jump-start some actual cognitive processing, get them to realize “ntp server” isn’t in their list of “10 Answers to the Top 10 Questions We Get” script.)

Anyway, be considerate of your upstream ntp server and don’t set hundreds of clients polling it constantly. As noted your SME server is a fine ntp server and can intermediate. Also Samba offers time synchronization which can be put into your Windows login scripts.

WinXP has a built in easy to use GUI for it’s time server, Win2K has it’s hidden a bit more. Win98 has no such thing, personally I recommend Dimension4 for 9x (Google for it.) To up the polling interval in XP either do the Registry hack (again Google for it or pick out of the script below) or here’s a simple script to run for the same effect. Paste the below into Notepad, save as “xp_time_sync.vbs” and run to choose a different interval:


'xp_time_sync.vbs - Change the Internet Time Update Interval
'© Doug Knox - revised - 5/10/2002
'This code may be freely distributed/modified
'Downloaded from www.dougknox.com
'Thanks to Gregory Phillips for catching an error when clicking Cancel.

Option Explicit
On Error Resume Next

'Declare variables
Dim WSHShell, p1, p2, cn, newtime, mycheck, ev, X, Y

'Set the Windows Script Host Shell and assign values to variables
Set WSHShell = WScript.CreateObject("WScript.Shell")

p1 = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\UpdateInterval"
p2 = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient\SpecialPollInterval"

'This section writes the correct values to the Registry

ev = WSHShell.RegRead(p2)
ev = ev / 3600

cn = ""

Do While IsNumeric(CN) = False

cn = InputBox("Enter the number of hours"& vbCR & "between Internet Time updates" & vbCR & vbCR & "The current Setting in hours is: " & ev & vbCR & vbCR & "The default value is 168 hours (7 days).","Value Entry","24")

If IsNumeric(cn) = False Then
   MsgBox "Please enter a number!",4096,"Error!"
End If

If cn = "" Then
   Exit Do
End If

Loop

If cn <> "" AND cn > 0 Then

X = InStr(cn,".")
cn = Left(cn,X+2)

  newtime = cn * 3600
  WSHShell.RegWrite p1, newtime, "REG_DWORD"
  WSHShell.RegWrite p2, newtime, "REG_DWORD"
  MsgBox "The Internet Time update interval has been changed." & vbCR & "Reboot your computer for the change to take effect.",4096,"Finished"

Else

  If cn = "" Then
    MsgBox "The Internet Time update interval has NOT been changed.",4096,"Cancelled"
  Elseif cn <= 0 Then
    MsgBox "The Internet Time Update interval has NOT been changed." & vbCR & "The value must be greater than 0 (zero).",4096,"Cancelled"
  End If

End If

Matt

Re: Time server
« Reply #10 on: October 07, 2002, 06:54:46 PM »
Does anyone ever have any trouble getting the WinXP clients to Sync?  I'm running SME 5.0 and quite often it will fail to work and report an error message something like "Round trip delay too large" or "message out of order" or just plain not work which I find quite annoying seeing as though the SME box is only a few feet away and doing pretty much nothing :)  If it doesn't work first time it will usually work on the 4th or 5th though.. never had to go any further than that.

Thanks for the heads up on the script Michael.

Patrick Hickey

Re: Time server
« Reply #11 on: October 07, 2002, 07:01:36 PM »
Yes, all the time. It is, after all, an MS product and you are attempting to use it non-natively  ;-)

That is, it WANTS to sync to an MS Domain Controller and resists all else.

How did you enter the name of the server? I have found it "seems" to prefer a full entry; either foo.bar.com or the IP of the SME server. Using the name singularly seems to cause mine to gag just like you are reporting.

it just blows my mind that an Internet convention as universally accepted as ntp is a stuggle to configure on the "industrial strength" XP. Just look at what is required to even change the polling intervals!

regards,

patrickMatt wrote:

Dub Dublin

Re: Time server
« Reply #12 on: October 08, 2002, 08:56:03 AM »
For what it's worth, CyberKit runs flawlessly under Win9X as well as newer versions of windows, and in addition to an NTP client, it includes other vital Internet utilities missing from Windows, including nslookup, ping, traceroute, finger, portscanner, whois, etc.  

This is one of those basic utilities that allows a Unix guy to retain his sanity when working with Windows.  It's not a stretch to say that this is one of the big reasons I find it easier and better to run Windows than BSD or Linux on the desktop, especially when combined with a real shell environment like U/Win or cygwin...

Matt

Re: Time server
« Reply #13 on: October 08, 2002, 05:56:36 PM »
Patrick,

I currently have the time server in WinXP set to the IP address of my SME server, 192.168.0.1.  It is annoying how it takes a very long time to time out or whatever it waits to do.  I'm now going to use the domain name instead and see how it goes.  It's not really that much of a problem.  Afterall, the only time that I notice that the time hasn't updated is when I myself try to do it and it fails.  

Still, I'd rather that it DID work 100% of the time.  There is just something to be said for knowing that the you have the EXACT time (or close enough anyway).  I set my watch to the time on my computer and I know that the time is EXACT (within a couple of seconds) and that all other time pieces I see are likely to be wrong.. I wish the bus company would realise that because it would certainly make things easier :P

I think I'll just put up with the default Windows implementation.. I like to keep things pretty lean and clean (no matter how small an application may be) so I'll just have to put up with it.

Does anyone know the frequency at which the SME server updates the time?  It seems to do it quite often from what I can tell - maybe 10+ times a day which seems rather excessive?

HB

Re: Time server
« Reply #14 on: October 09, 2002, 02:28:42 PM »
FYI
I have done no modifications to my e-smith 5.5 (regarding ntp).
And AboutTime works no problems on w2k and w98
...
Hope this helps!

brian read

Re: Time server
« Reply #15 on: October 09, 2002, 02:56:00 PM »
I have just re-booted my 5.5 server, and got the following from the boot log:

Oct  9 10:41:31 server01 ntpd: Synchronizing with time server:
Oct  9 10:41:20 server01 ntpd:  succeeded
Oct  9 10:41:20 server01 ntpd: ^[[60G
Oct  9 10:41:20 server01 ntpd:
Oct  9 10:41:20 server01 ntpd: Starting ntpd:
Oct  9 10:41:20 server01 ntpd: ntpd startup failed
Oct  9 10:41:20 server01 ntpd: ^[[60G
Oct  9 10:41:20 server01 ntpd:
Oct  9 10:41:20 server01 rc: Starting ntpd:  failed

Why is trying to start ntpd 3 times?  I can ping the ISP time server ok.

This is what the messages log says:

Oct  9 10:41:31 server01 ntpd: Synchronizing with time server:
Oct  9 10:41:20 server01 ntpdate[768]: step time server 194.153.0.233 offset -12.092483 sec
Oct  9 10:41:20 server01 ntpd:  succeeded
Oct  9 10:41:20 server01 ntpd: ^[[60G
Oct  9 10:41:20 server01 ntpd:
Oct  9 10:41:20 server01 ntpd: Starting ntpd:
Oct  9 10:41:20 server01 ntpd: Failed to lookup user 'ntp'.
Oct  9 10:41:20 server01 ntpd: ntpd startup failed
Oct  9 10:41:20 server01 ntpd: ^[[60G
Oct  9 10:41:20 server01 ntpd:
Oct  9 10:41:20 server01 rc: Starting ntpd:  failed

Any ideas?

Cheers

Brian