JSI Tip 2337. You get an error when running the W32tm command on a domain controller?


When you use the W32tm command to test / maintain time synchronization in your enterprise, using the -v ( verbose) switch on a domain controller will generate:

RPC to server -v returned 0x6ba.

Additionally, you may receive:

        W32Time: Server: Binding to 1 NIC.
        W32Time: bind failed: 0x80072740
        W32Time: 0xC0000031 reported to System Log in Event Viewer
        W32Time: BEGIN:FinishCleanup
        W32Time: BEGIN:TsUpTheThread
        W32Time: END Line 1384
        W32Time: BEGIN:UnInitializeDC
        W32Time: Ptrs 0 - 0
        W32Time: END:Line 725
        W32Time: Time service stopped.
        W32Time: END:Line 383
and the Event log may contain:
        Event Type: Error
        Event Source: w32time
        Event Category: None
        Event ID: 49
        Date: xx/xx/2000
        Time: 10:49:44 AM
        User: N/A
        Computer: machinename
        Description:
        An unexpected error occurred while trying to start the server.
        The port may already be in use. 
        Data:
        0000: 00 00 00 00 .... 
The problem is caused by the command trying to start the time service, which is already running on default port 123.

To workaround the problem, only use the following switches when running W32tm on a domain controller:

        -tz

        -adj

        -adjoff

        -s
If you want to use other options on a DC, use the -p switch to change the port.

The W32tm command supports the following switches:

w32tm \[ -tz | -s \[computer\] | -adj | -adjoff | -source | -once \]
      \[-test\] \[-v\] \[-p <port>\] \[-period <freq>\]

    Primary options:
    -tz       print the local time zone info and exit.
    -s \[<computer>\] force the given computer (or the local computer if
              none is given) to resynchronize, then exit.
    -adj      set the computer's system clock frequency to the last
              frequency determined during synchronization, then exit.
    -adjoff   set the computer's system clock frequency the system
              default, then exit
    -source   choose a synchronization source, then exit. Note that a
              source is chosen before each synchronization, so this is
              useful only in showing that a source could be found.
              Remember to use -v to see the output.
    -once     do only one synchronization, then exit.
    Otherwise, run continuously as a client, synchronizing the local
              clock until ctrl-c is pressed.

    The program will also run as a server any time the service
    would (when it is on a DC, or when the registry flag is set).

    The following options can be used in conjunction with the above:
    -test     prevent the time on the local system from actually
              being modified.
    -v        print out a verbose description of what the program is
              doing. This is usually needed since otherwise the
              program produces no output. The exceptions are -s and -tz.
    -p  set the server port.
    -period  set the sync period just as in the registry. That is:
              0 

once a day 65535

once every 2 days 65534

once every 3 days 65533

once every week (7 days) 65532

once every 45 min until we get 3 good syncs, then once every 8 hrs (3/day) 65531

once every 45 min until we get 1 good sync, then once every day Otherwise, times per day.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish