Where is the log file? - NTP

This is a discussion on Where is the log file? - NTP ; I install ntp, choosing a public time server, and got an error trying to start the service. It says to check the "event log". I am running under Windows Vista. Where do I find this log? Could not readily find ...

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 29

Thread: Where is the log file?

  1. Where is the log file?

    I install ntp, choosing a public time server, and got an error
    trying to start the service. It says to check the "event log". I am
    running under Windows Vista.

    Where do I find this log?

    Could not readily find this information on this newsgroup or on
    the ntp.org web site. I figure it has to be there, somewhere, but I
    had no luck finding this information.

    Thanks, Alan

  2. Re: Where is the log file?

    Some additional information: When I run "startntp", I get the error:

    System error 5 has occurred.
    Access is denied

    I`m wondering if this is a Vista snafu. Any ideas?

    Thanks, Alan

  3. Re: Where is the log file?

    Alan wrote:
    > I install ntp, choosing a public time server, and got an error
    > trying to start the service. It says to check the "event log". I am
    > running under Windows Vista.
    >
    > Where do I find this log?
    >
    > Could not readily find this information on this newsgroup or on
    > the ntp.org web site. I figure it has to be there, somewhere, but I
    > had no luck finding this information.
    >
    > Thanks, Alan


    Alan,

    The Event Log is a standard Windows function, so you should refer to your
    Windows documentation for help. Under Windows Vista Ultimate, use the
    Start button, Administrative tools, Event Viewer option. Note that your
    installation may have installed the Administrative tools under the Control
    Panel. Answer Continue to the UAC dialog. Select Windows logs,
    Application to see any messages from NTP. You can use the filter
    functions of the Event Viewer to show just NTP if you wish. The Help,
    Search, Filter has an entry describing how to do this.

    I hope that helps.

    As with a lot of software which may write to its own directory, I have
    followed the practice of installing the software outside the C:\Program
    Files\ tree, as Vista protects that folder tree against users writing
    there. I installed NTP in C:\Tools\NTP\ instead. It is quite possible
    that your System Error 5 is caused by an inappropriate installation
    directory choice.

    Cheers,
    David



  4. Re: Where is the log file?

    David,
    Thanks, this and setting the NTP service up to logon to an
    account as a service did it. Alan

  5. Re: Where is the log file?

    Alan wrote:
    > David,
    > Thanks, this and setting the NTP service up to logon to an
    > account as a service did it. Alan


    That's good news, Alan. I used the Meinberg installer which does most of
    that for you.

    http://www.meinberg.de/english/sw/ntp.htm

    although I recall one security issue on Vista which I reported to them.

    Cheers,
    David



  6. Re: Where is the log file?

    I changed the configuration file and wanted to stop and then
    restart the NTP client on my PC. When I run the stopntp, restartntp
    or startntp batch files, I get System Error 5 - Access Denied errors
    again.

    Alan


  7. Re: Where is the log file?

    Alan wrote:
    > I changed the configuration file and wanted to stop and then
    > restart the NTP client on my PC. When I run the stopntp, restartntp
    > or startntp batch files, I get System Error 5 - Access Denied errors
    > again.
    >
    > Alan


    I recall there was a protection issue with some of the NTP files, but I
    can't find my notes at the moment. Check in the Event Viewer for the
    error message. If it happens about one hour after NTP starts, it might be
    NTP trying to write the drift file. I would simply make the NTP directory
    completely open.

    Cheers,
    David



  8. Re: Where is the log file?

    Alan schrieb:
    > I changed the configuration file and wanted to stop and then
    > restart the NTP client on my PC. When I run the stopntp, restartntp
    > or startntp batch files, I get System Error 5 - Access Denied errors
    > again.
    >
    > Alan
    >


    Alan,

    under Vista you need to run the batch files with administrative rights.
    From the start menu you can just right-click the corresponding batch
    file entry and choose "Run as Administrator" which will present you the
    famous Vista "Do you really really REALLY want to do this?" dialogue ...

    Best Regards,
    Heiko

  9. Re: Where is the log file?

    Heiko,
    Thanks. That did it. I`m still getting used to all of
    Vista`s new twists. Alan

    On Jun 16, 3:38*am, Heiko Gerstung
    wrote:
    >
    > Alan,
    >
    > under Vista you need to run the batch files with administrative rights.
    > *From the start menu you can just right-click the corresponding batch
    > file entry and choose "Run as Administrator" which will present you the
    > famous Vista "Do you really really REALLY want to do this?" dialogue ...
    >
    > Best Regards,
    > * Heiko





  10. Re: Where is the log file?

    Alan schrieb:
    > Heiko,
    > Thanks. That did it. I`m still getting used to all of
    > Vista`s new twists. Alan


    Me too. You can edit the properties of the start menu entries for
    start/stop/restart.bat in order to always run it with Admin rights:
    right-click, "Properties", "Shortcut" tab, "Advanced"

    I will try to find out how to create the shortcuts this way and put that
    into the next version of the NTP Installer (for 4.2.4p5) ...

    Best Regards,
    Heiko



  11. Re: Where is the log file?

    Now, it is not connecting to any time servers at all.

  12. Re: Where is the log file?

    Alan wrote:
    > Now, it is not connecting to any time servers at all.


    Firewall? Is basic IP connectivity there?

    David



  13. Re: Where is the log file?

    The Windows Event log shows an error, "Unable to initialize .rnd
    file":

    Log Name: Application
    Source: NTP
    Date: 6/17/2008 7:57:31 PM
    Event ID: 1
    Task Category: None
    Level: Error
    Keywords: Classic
    User: N/A
    Description:
    Unable to initialize .rnd file

    Anybody know what this means on Vista? Thanks, Alan

  14. Re: Where is the log file?

    Alan wrote:
    > The Windows Event log shows an error, "Unable to initialize .rnd
    > file":
    >
    > Log Name: Application
    > Source: NTP
    > Date: 6/17/2008 7:57:31 PM
    > Event ID: 1
    > Task Category: None
    > Level: Error
    > Keywords: Classic
    > User: N/A
    > Description:
    > Unable to initialize .rnd file
    >
    > Anybody know what this means on Vista? Thanks, Alan


    Alan,

    I'm not sure about this, but I think the SSL package used in NTP tries to
    write a random number file to the root directory of the hard disk, and
    most likely Windows Vista in not allowing access. I don't /think/ that
    this would affect normal operation of NTP, unless you are using security
    functions (I'm sure other will correct me). I have commented on this bad
    behaviour before, but I don't know if it can or will be fixed.

    Checking on my own Vista system, I do see a file "C:\.rnd", which was
    created on 2007 Nov 23, probably about the first time NTP was run on that
    system. It shows as:

    Created: 23-Nov-2007 22:47
    Modified: 22-Oct-2007 06:04 (UTC)
    Accessed: 23-Nov-2007 22:47

    The owner is the Administrators group, and it is set for the Users group
    to have full control. It's possible that I made that change myself, but I
    can't be sure. Checking further, I see the same errors on my system, but
    they are all from lat year, suggesting that I did change permissions on
    that file. It's not impossible that I even copied that file from the XP
    system to the Vista system.

    On my XP system, I also have a C:\.rnd file:

    Created: 22-Oct-2007 07:04
    Modified: 22-Oct-2007 07:04 (UTC + 1)
    Accessed: 18-Jun-2008 06:48 (about 30 minutes ago)

    So it would appear that the file /is/ being accessed on the XP system, but
    not on the Vista system. Although I can't see how, I wonder if this
    accounts for the poor timekeeping I am seeing on Vista?

    Sorry for the slightly lengthy reply, but I don't think I've found many
    others running NTP on Vista.

    Cheers,
    David



  15. Re: Where is the log file?

    "David J Taylor"
    wrote in
    message news:iU16k.11391$E41.7688@text.news.virginmedia.co m...
    > Alan wrote:


    >> The Windows Event log shows an error, "Unable to initialize .rnd
    >> file":

    [...]
    > I'm not sure about this, but I think the SSL package used in NTP tries
    > to write a random number file to the root directory of the hard disk,
    > and most likely Windows Vista in not allowing access. ...


    I think that's exactly it. The location defaults to c:\ on Windows,
    which is a staggeringly bad default in my opinion, but at least it is
    configurable through an environment variable. On this machine, I have
    this:

    randfile=%systemroot%\system32\drivers\etc\.rnd

    which makes it use the same filename but in the Windows equivalent of
    Unix's /etc directory, mostly because ntp.conf lives there, too.

    A temp directory might be a better place and note that they might have
    deduced that from an environment variable as well. Something under an
    equivalent of the /var directory might be better still but I'm not sure
    what that would be. All Users/Application Data perhaps?

    Groetjes,
    Maarten Wiltink



  16. Re: Where is the log file?

    Maarten Wiltink wrote:
    > "David J Taylor"
    > wrote in
    > message news:iU16k.11391$E41.7688@text.news.virginmedia.co m...
    >> Alan wrote:

    >
    >>> The Windows Event log shows an error, "Unable to initialize .rnd
    >>> file":

    > [...]
    >> I'm not sure about this, but I think the SSL package used in NTP
    >> tries to write a random number file to the root directory of the
    >> hard disk, and most likely Windows Vista in not allowing access. ...

    >
    > I think that's exactly it. The location defaults to c:\ on Windows,
    > which is a staggeringly bad default in my opinion, but at least it is
    > configurable through an environment variable. On this machine, I have
    > this:
    >
    > randfile=%systemroot%\system32\drivers\etc\.rnd
    >
    > which makes it use the same filename but in the Windows equivalent of
    > Unix's /etc directory, mostly because ntp.conf lives there, too.
    >
    > A temp directory might be a better place and note that they might have
    > deduced that from an environment variable as well. Something under an
    > equivalent of the /var directory might be better still but I'm not
    > sure what that would be. All Users/Application Data perhaps?
    >
    > Groetjes,
    > Maarten Wiltink


    Maarten, if I ever knew that, I had long since forgotten it! I've just
    added a system environment variable:

    RANDFILE=C:\Tools\NTP\etc\.rnd

    and restarted NTP. It has created the .rnd file where it was supposed to.
    Now to see if it makes any difference to the timekeeping....

    http://www.satsignal.eu/mrtg/gemini_ntp.html

    It would be good to see something included with NTP (or their build of
    SSL) to conform to the OS conventions you mention.

    Thanks,
    David



  17. Re: Where is the log file?

    Alan wrote:
    > David,
    > Thanks, this and setting the NTP service up to logon to an
    > account as a service did it. Alan
    >


    The installer was supposed to do that. Did it not do so?

    Danny

  18. Re: Where is the log file?

    Alan schrieb:
    > The Windows Event log shows an error, "Unable to initialize .rnd
    > file":
    >
    > Log Name: Application
    > Source: NTP
    > Date: 6/17/2008 7:57:31 PM
    > Event ID: 1
    > Task Category: None
    > Level: Error
    > Keywords: Classic
    > User: N/A
    > Description:
    > Unable to initialize .rnd file
    >
    > Anybody know what this means on Vista? Thanks, Alan



    Hi Alan,

    please add a environment variable RANDFILE to your system configuration
    which points to the etc subdirectory of your NTP installation.

    Like this:

    Control Panel > System and Maintenance > System > Advanced Settings

    On the "Advanced" tab, use the "Environment Variables" button to open
    the required dialogue. Use the lower "New..." button to add a
    system-wide environment variable named "RANDFILE" and assign a full
    pathname to it, e.g. "C:\PROGRAM FILES\NTP\ETC\ntp.rnd".

    Save and restart NTPD and it should work. The installer should do that
    and I will carefully test this on Vista 32/64bit before releasing the
    next version of it.

    Heiko

  19. Re: Where is the log file?

    It did not.

    On Jun 22, 11:44 pm, ma...@ntp.isc.org (Danny Mayer) wrote:
    > Alan wrote:
    > > David,
    > > Thanks, this and setting the NTP service up to logon to an
    > > account as a service did it. Alan

    >
    > The installer was supposed to do that. Did it not do so?
    >
    > Danny



  20. Re: Where is the log file?

    Alan schrieb:
    > It did not.
    >
    > On Jun 22, 11:44 pm, ma...@ntp.isc.org (Danny Mayer) wrote:
    >> Alan wrote:
    >>> David,
    >>> Thanks, this and setting the NTP service up to logon to an
    >>> account as a service did it. Alan

    >> The installer was supposed to do that. Did it not do so?
    >>
    >> Danny

    >


    That looks and smells like a bug. I will look into this before I release the
    next version of the installer ...

    Best Regards,
    Heiko

+ Reply to Thread
Page 1 of 2 1 2 LastLast