Where is the log file?

  • Follow


   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
0
Reply Alan 6/14/2008 12:04:38 AM

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
0
Reply Alan 6/14/2008 12:15:56 AM


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 


0
Reply David 6/14/2008 8:18:13 AM

David,
          Thanks, this and setting the NTP service up to logon to an
account as a service did it.       Alan
0
Reply Alan 6/14/2008 11:56:07 AM

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 


0
Reply David 6/14/2008 12:30:55 PM

   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

0
Reply Alan 6/16/2008 2:04:49 AM

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 


0
Reply David 6/16/2008 6:19:26 AM

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
0
Reply Heiko 6/16/2008 7:38:40 AM

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

On Jun 16, 3:38=A0am, Heiko Gerstung
<heiko.removethistext.gerst...@meinberg.de> wrote:
>
> Alan,
>
> under Vista you need to run the batch files with administrative rights.
> =A0From 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,
> =A0 Heiko



0
Reply Alan 6/16/2008 11:26:54 AM

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


0
Reply Heiko 6/16/2008 12:21:46 PM

Now, it is not connecting to any time servers at all.
0
Reply Alan 6/17/2008 2:44:59 AM

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

Firewall?  Is basic IP connectivity there?

David 


0
Reply David 6/17/2008 5:21:28 AM

  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
0
Reply Alan 6/18/2008 12:41:23 AM

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 


0
Reply David 6/18/2008 6:26:22 AM

"David J Taylor"
<david-taylor@blueyonder.neither-this-bit.nor-this-bit.co.uk> wrote in
message news:iU16k.11391$E41.7688@text.news.virginmedia.com...
> 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


0
Reply Maarten 6/18/2008 7:44:21 AM

Maarten Wiltink wrote:
> "David J Taylor"
> <david-taylor@blueyonder.neither-this-bit.nor-this-bit.co.uk> wrote in
> message news:iU16k.11391$E41.7688@text.news.virginmedia.com...
>> 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 


0
Reply David 6/18/2008 8:01:09 AM

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
0
Reply mayer 6/23/2008 3:44:49 AM

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
0
Reply Heiko 6/24/2008 7:09:43 AM

  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

0
Reply Alan 6/24/2008 10:00:15 AM

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
0
Reply Heiko 6/24/2008 10:45:51 AM

Alan wrote:
> 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
> <heiko.removethistext.gerst...@meinberg.de> 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

Why would you need a batch file?

Danny
0
Reply mayer 6/27/2008 1:51:57 AM

Danny Mayer wrote:
> Alan wrote:
>> 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
>> <heiko.removethistext.gerst...@meinberg.de> 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
>
> Why would you need a batch file?
>
> Danny

Presumably, Danny, it's easier for some people to have a "click here" 
icon, than to have to go:

- Start, Administrative Tools, Services.

- Scroll down to select "Network Time Protocol"

and press the "Stop", "Start" or "Restart" buttons.

Cheers,
David 


0
Reply David 6/27/2008 3:48:20 AM

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

This has nothing to do with Vista. This has to do with OpenSSL. It needs 
to create a seed file called .rnd. I forget where it puts it but I did 
document this behavior in the winnt.html file.

Danny
0
Reply mayer 6/28/2008 1:19:29 AM

Danny Mayer wrote:

> 
> This has nothing to do with Vista. This has to do with OpenSSL. It needs 
> to create a seed file called .rnd. I forget where it puts it but I did 
> document this behavior in the winnt.html file.

Although the error message isn't about a function of Vista, it is a 
result of using Vista, because the default location of the file is 
somewhere that Vista considers a protected location.
0
Reply David 6/28/2008 8:00:33 AM

David Woolley wrote:
> Danny Mayer wrote:
>
>>
>> This has nothing to do with Vista. This has to do with OpenSSL. It
>> needs to create a seed file called .rnd. I forget where it puts it
>> but I did document this behavior in the winnt.html file.
>
> Although the error message isn't about a function of Vista, it is a
> result of using Vista, because the default location of the file is
> somewhere that Vista considers a protected location.

... and a function of incorrect options for OpenSSL.  I don't believe that 
writing to the root of the system disk should be considered good practice 
in any OS.

Cheers,
David 


0
Reply David 6/28/2008 10:04:58 AM

David J Taylor wrote:

> .. and a function of incorrect options for OpenSSL.  I don't believe that 
> writing to the root of the system disk should be considered good practice 
> in any OS.
Actually the OS (including previous incarnations ) we seem to talk about
has established about every bad practice thinkable to boot  and
active denial of doing the "Right Thing".

Most of these things are imho a platform  and not an application
problem. (though you will now have to fix the app)


uwe


0
Reply Uwe 6/28/2008 12:00:01 PM

David J Taylor wrote:
> Danny Mayer wrote:
>> Alan wrote:
>>> 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
>>> <heiko.removethistext.gerst...@meinberg.de> 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
>> Why would you need a batch file?
>>
>> Danny
> 
> Presumably, Danny, it's easier for some people to have a "click here" 
> icon, than to have to go:
> 
> - Start, Administrative Tools, Services.
> 
> - Scroll down to select "Network Time Protocol"
> 
> and press the "Stop", "Start" or "Restart" buttons.
> 
> Cheers,
> David 

Just use:
net start ntpd
which doesn't require a batch file.

Danny
0
Reply mayer 6/30/2008 3:51:45 AM

Danny,

Danny Mayer wrote:
> David J Taylor wrote:
>> Danny Mayer wrote:
>>> Why would you need a batch file?
>>>
>>> Danny
>> 
>> Presumably, Danny, it's easier for some people to have a "click here"
>> icon, than to have to go:
>> 
>> - Start, Administrative Tools, Services.
>> 
>> - Scroll down to select "Network Time Protocol"
>> 
>> and press the "Stop", "Start" or "Restart" buttons.
>> 
>> Cheers,
>> David
> 
> Just use:
> net start ntpd
> which doesn't require a batch file.
> 
> Danny

That's exactly what the batch file does. 

AFAIK Heiko (who is currently on holiday) has added those batch files just
to be able to simplify running those commands from a start menu entry (as
already mentioned by David). 

Anyway, it the user account does not have sufficient rights then typing "net
start ntp" would not work, either.

Martin
-- 
Martin Burnicki

Meinberg Funkuhren
Bad Pyrmont
Germany
0
Reply Martin 6/30/2008 7:34:54 AM

David Woolley wrote:
> Danny Mayer wrote:
> 
>> This has nothing to do with Vista. This has to do with OpenSSL. It needs 
>> to create a seed file called .rnd. I forget where it puts it but I did 
>> document this behavior in the winnt.html file.
> 
> Although the error message isn't about a function of Vista, it is a 
> result of using Vista, because the default location of the file is 
> somewhere that Vista considers a protected location.

No, that's not about using Vista. It doesn't matter what the Operating 
System is, if that O/S does not allow ntpd to write to any specific 
directory. It's an O/S permissions thing and you need to configure both 
ntpd and the O/S to allow ntpd to use a writeable directory into which 
you can place this file.

Danny
0
Reply mayer 7/4/2008 3:32:18 AM

28 Replies
135 Views

(page loaded in 0.297 seconds)

Similiar Articles:


















7/12/2012 3:48:40 PM


Reply: