?
Solved

Where does a windows server get the correct time from?

Posted on 2008-10-22
45
Medium Priority
?
510 Views
Last Modified: 2010-04-21
my server time is 5 minutes fast.

i thought i remembered seeing a setting that said i could connect to time.windows.com to up to date time.

however, i cant find that on the server or my workstation.  was this removed by a windows update?

i can manually set the time 5 minutes back on the servers, but within 1 day, i jumps up 5 minutes.

i know that the workstations get the time from the server because if i reboot my computer it displays the same time as the server.

thanks.
0
Comment
Question by:tomdlgns
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 24
  • 21
45 Comments
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22780069
Hi there.

Is this a virtual or a physical machine?

Nevertheless you can set your time source to ntp.org (probably the best time source) using the following commands on a command line:

net time /setsntp:pool.ntp.org

You need to make sure the server has NTP protocol access to the internet on your firewall/proxy.

These commands may also be useful:

net time /querysntp (it checks what's your current time source)

w32tm /resync (it resyncs your clock using the sntp time source)

Hope it helps

Alex


0
 

Author Comment

by:tomdlgns
ID: 22780159
C:\>net time /querysntp
The current SNTP value is: time.windows.com,0x1

The command completed successfully.

that is the same thing i got on my server and on my workstation.
0
 

Author Comment

by:tomdlgns
ID: 22780180
just tried running this on my server

C:\>w32tm /resync
Sending resync command to local computer...
The computer did not resync because no time data was available.

0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22780194
The command completing successfully doesn't always means it's getting time from the time source.

On your workstation it'll say the time source is time.windows.com because that's the default source for all windows computers. The thing is when you join a computer to a windows domain it'll get its time form a domain controller rather than the internet time source. That's why it's so important to have time synced on the domain controllers.

Did you try the w32tm /resync  command  on the server yet?

Did i t work?
0
 

Author Comment

by:tomdlgns
ID: 22780195
btw, physical machine, nothing virtual.
0
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22780204
That may mean your server doesn't have NTP access to the internet. There were times when I only managed to get a successful connection after a few tries.
0
 

Author Comment

by:tomdlgns
ID: 22780205
i did, just above your last response.  you were probably typing your response as i was updating the thread.
0
 

Author Comment

by:tomdlgns
ID: 22780213
@

That may mean your server doesn't have NTP access to the internet. There were times when I only managed to get a successful connection after a few tries.

do i need to open up a port on my firewall?

i will try the command a few more times.
0
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22780217
Did you try changing the time source to pool.ntp.org?
0
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22780228
Your firewall should allow all domain controllers acccess to UDP port 123 to the internet (it's the NTP protocol port)
0
 

Author Comment

by:tomdlgns
ID: 22780253
yes, it is using pool.ntp.org.
0
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22780261
this may also help

http://support.microsoft.com/?kbid=830092

make sure your w32time DLLs are the same version as the ones mentioned there
0
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22780310
Or more recent hehe
0
 

Author Comment

by:tomdlgns
ID: 22780350
i am going to compare the DLL files, but SP2 is already installed on both of my servers.

0
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22780363
It should be cool then
0
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22780368
Did you manage to open that port on the firewall?
0
 

Author Comment

by:tomdlgns
ID: 22780387
@

Did you manage to open that port on the firewall?

no, i am going to try that now.

also, my XP machine on a domain says that it is still getting the time from time.windows.com

i thought you said once the computer is on a domain, it should grab time from the DC?

0
 

Author Comment

by:tomdlgns
ID: 22780395
it says to use port 80, port 80 is an open port...?
0
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22780408
It does even though when you run the /querysntp command it'll show the external time source. The DC source overrides that one.
0
 

Author Comment

by:tomdlgns
ID: 22780424
ok

now, which port should i open?
0
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22780430
Where does it say to use port 80?
0
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22780436
it's definitely UDP port 123
0
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22780450
outbound only...no need to open inbound
0
 

Author Comment

by:tomdlgns
ID: 22780452
ok
thanks, i am going to open that port and point it to my file server.

should i also point it to my exchange server?

they are both DCs
0
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22780471
probably best, yes
0
 

Author Comment

by:tomdlgns
ID: 22780611
still getting the same error.

although, my windows xp machine says it is completing successfully, and this was before i even opened up the udp 123 port.
0
 
LVL 1

Accepted Solution

by:
JayPeeAS earned 200 total points
ID: 22780721
can you resolve pool.ntp.org on your server?

If not you need to sort out DNS issues.

If so try the following:

net stop w32time

w32tm /unregister

w32tm /register

w32tm /config /manualpeerlist:pool.ntp.org /syncfromflags:MANUAL /reliable:YES (you can also try time.windows.com just to be sure nothing's wrong with the time source)

net start w32tm

w32tm /config /update

w32tm /resync /rediscover

Let me know how it goes

w32tm /config
0
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22780781
IP for pool.ntp.org is 195.22.25.130 in case you wanna try with the IP address
0
 

Author Comment

by:tomdlgns
ID: 22780782

C:\Documents and Settings\Administrator>cd..

C:\Documents and Settings>cd..

C:\>ping pool.ntp.org

Pinging pool.ntp.org [74.86.97.132] with 32 bytes of data:

Reply from 74.86.97.132: bytes=32 time=45ms TTL=55
Reply from 74.86.97.132: bytes=32 time=52ms TTL=55
Reply from 74.86.97.132: bytes=32 time=47ms TTL=55
Reply from 74.86.97.132: bytes=32 time=53ms TTL=55


C:\>net stop w32time
The Windows Time service is stopping.
The Windows Time service was stopped successfully.


C:\>w32tm/unregister
W32Time successfully registered.

C:\>w32tm/register
W32Time successfully registered.

C:\>w32tm/config/manualpeerlist:pool.ntp.org/syncfromflags:MANUAL/reliableYES
The command /config/manualpeerlist:pool.ntp.org/syncfromflags:MANUAL is unknown.


0
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22780800
There are spaces in that commmand

Try it like this

w32tm /config /manualpeerlist:pool.ntp.org /syncfromflags:MANUAL
0
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22780821
I'm getting problems syncing with pool.ntp.org on my end as well. Try all that but using another time source such as time.windows.com or time.nist.gov
0
 

Author Comment

by:tomdlgns
ID: 22780841
net start w32tm

The service name is invalid.
0
 

Author Comment

by:tomdlgns
ID: 22780863
ill try net start w32time
0
 

Author Comment

by:tomdlgns
ID: 22780886
ok, it took my time from 330 to 325.

hopefully it doesn't jump ahead 5 min again.
0
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22780950
If it does you just need to tell it to poll the time source in a shorter period of time

You can change the following reg key for that

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NTPClient\SpecialPollInterval

the default is 900 seconds (15 minutes). If that isn't short enough you can set it to do it in a shorter period of time.

0
 

Author Comment

by:tomdlgns
ID: 22781043
so by default, i will know in 15 minutes if this worked or not, correct?
0
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22781071
Not exactly. You said you'd only notice it after 1 day. This means the internal clock processor takes a while to take the internal clock forward. 15 minutes should be enough to keep the time right. Hopefully you won't notice the clock going forward again.
0
 

Author Comment

by:tomdlgns
ID: 22781323
as of right now, the time is still the same.

so back to the last post, is it trying to sync with time.windows.com every 15 minutes?
0
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22781446
That's it. Is the time still correct?
0
 

Author Comment

by:tomdlgns
ID: 22781463
yeah, since i did that, the time hasn't jumped 5 min ahead.
0
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22781475
Cool potatoes :)))
0
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22781487
What you can do to test is change the time and move it 2 or 3 minutes ahead or behind and wait for it to get back to the correct time automatically. If it does within 15 minutes then it's all working
0
 

Author Closing Comment

by:tomdlgns
ID: 31508899
net start w32tm needs to be changed to net start w32time
0
 
LVL 1

Expert Comment

by:JayPeeAS
ID: 22781561
Glad it worked out for you. Thanks for the points :))
0
 

Author Comment

by:tomdlgns
ID: 22781583
thanks for all of your help.  this has been bugging a few users on the network for a while.  i really don't blame them, though.  

we all have cell phones, office phones, PCs, some have watches, and pretty much everyone with an office has a wall clock.

i guarantee that if i were to take the clock with the slowest time and then take the clock with the fastest time, there is probably a difference of 20 minutes.  it is nice to see that some of the clocks are accurate now.

0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question