Monday 14 October 2013

ULS log files are created but are empty

Problem: I have created a SharePoint 2013 farm with a custom location for my log files e.g. d:\logs.  On the 1st SP2013 VM that created the SP farm using AutoSPInstaller, the logs are present and logging correctly.  On the other/remaining SP VM's, the logs are created every 30 min however, the lof files are empty.

Initial Hypothesis: I had no idea and after looking at google the answer is permissions on the local file system.  Justin Kobel's post gives the fix.

Resolution:
Or run this Powershell on each VM:
PS> $computer= "$env:computername"
PS> $group="Performance Log Users"
PS> $domain="demo"
PS> $user="pbeck"
PS> $de = [ADSI]"WinNT://$computer/$Group,group"
PS> $de.psbase.Invoke("Add",([ADSI]"WinNT://$domain/$user").path)
PS> net stop SPTraceV4
PS> net start SPTraceV4
 
Tip: Using the Invoke-Command you can loop thru and connect to the SP VM's remotely and run the change on each VM in the SP far.  PS to loop thru and change local security groups is here and the xml is here.

 
 
More Info:
You will notice that the files within Windows explorer are shown with a blue colour.  This is to show the files/folders are compressed. 
Blue means compressed.
Green means encrypted.

2 comments:

Hagen Deike said...

How can the ULS file be created but not written when the security deny writting to the file system?
There might be a other reason for this I describe in my Blog
http://gb-sharepointsnippets.blogspot.de/2013/10/help-my-uls-logs-are-empty-what-shall-i.html

Paul Beck said...

Hi Hagen,

Your post describes the fix in this post. I don't follow you comment about "deny writing permissions"

Thanks for the comment

Post a Comment