Error occurred while opening logfile C:\Windows\system32\LogFiles\Sum\Api.log. - by Arjan Fraaij

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


42
1
Sign in
to vote
ID 781317 Comments
Status Closed Workarounds
Type Bug Repros 22
Opened 3/13/2013 3:02:44 PM
Access Restriction Public

Description

Installation: 
- SQL Server 2012 Developers edition, SP1, CU2 on a single server. 
- Server OS Windows 2012 Standard edition (x64).
- Domain accounts are used for running the SSAS & SSDE services

I keep having the event errors for both the SSAS as SSDE services in EVENTS:

msmdsrv (2616) Error -1032 (0xfffffbf8) occurred while opening logfile C:\Windows\system32\LogFiles\Sum\Api.log.

msmdsrv (2616) An attempt to open the file "C:\Windows\system32\LogFiles\Sum\Api.log" for read only access failed with system error 5 (0x00000005): "Access is denied. ".  The open file operation will fail with error -1032 (0xfffffbf8).

sqlservr (4520) Error -1032 (0xfffffbf8) occurred while opening logfile C:\Windows\system32\LogFiles\Sum\Api.log.

sqlservr (4520) An attempt to open the file "C:\Windows\system32\LogFiles\Sum\Api.log" for read only access failed with system error 5 (0x00000005): "Access is denied. ".  The open file operation will fail with error -1032 (0xfffffbf8).

Did read the http://msdn.microsoft.com/en-us/library/ms143504.aspx#Windows to see or I could find additional rights needed to be set on files & folders only no reference for the system32\logfiles folders.

Did do an security check (Effective Access) for the domain services accounts for both files and folders in system32\Logfiles as sub level Sum.

Users do not have any effective rights to write, change files in the folders.
I can add the Service Accounts manual but like to know or this normal behaviour or did I miss something... 
Sign in to post a comment.
Posted by yup. _ on 12/13/2014 at 8:51 AM
Please see this here.
https://support.microsoft.com/kb/2811566?wa=wsignin1.0
Posted by tom987654321 on 9/20/2014 at 6:17 AM
Not sure if this is recommendable security, but the fix for me for all these errors that affect "C:\Windows\system32\LogFiles\Sum\" was to give permissions to the following users (based on a default installation of MS SQL 2014 on Win 2012 R2): NT Service\MSSQLSERVER, NT Service\ReportServer, NT Service\MSSQLServerOLAPService\, NT Service\SQLServerAgent. Basically, these are all the default accounts used by SQL and listed under "login" in the Services utility. Not sure why the directory did not have these permissions added automatically during the SQL installation, but the System account is not used by SQL (by default, System and Administrator are the only accounts with permissions in the "Sum" directory.

After reboot the errors cease to appear - several reboots later still no errors - and the files inside - Api.chk, Api.log are being updated.
Posted by CorrectTech on 8/5/2014 at 2:50 PM
I just received this error following a fresh installation of SQL Server 2014.
Posted by Niels Grove-Rasmussen on 3/25/2014 at 8:04 AM
We had this problem on a SQL Server 20012 SP1 installation on Windows Server 2012. The SQL Server Agent would not start, and the Windows Application Log has two entries:
1) Failed to initialize SQL Agent log (reason: Access is denied).
2) sqlservr (3744) An attempt to open the file "C:\windows\system32\LogFiles\Sum\Api.chk" for read / write access failed with system error 5 (0x00000005): "Access is denied. ". The open file operation will fail with error -1032 (0xfffffbf8).
Actually the problem was not the file "C:\windows\system32\LogFiles\Sum\Api.chk" but access to the file "...\MSSQL11.MSSQLSERVER\MSSQL\Log\SQLAGENT.OUT" that the SQL Server Agent tries to rename during startup.
A look at the Advanced Security Settings for SQLAGENT.OUT showed a permission entry only refered to by SID not name. Also comparing with other working SQL Server Agent installations the permission entry for SQLSERVERAGENT was missing.
The SQL Server not working was a server used for developing automated SQL Server installations, and at some point the Managed Service Account (MSA) had been removed and re-created and by that given another SID. The re-creation had been done without a cleanup of the SQL Server files. So the SQLAGENT.OUT ended up with a orphan SID blocking granting the correct rights.
Our solution was in six steps:
1) Uninstall SQL Server.
2) Uninstall Managed Service Accounts (MSAs) from server.
3) Delete SQL Server folders, also the SQL Server programs folder.
4) Empty Windows Recycle Bin.
5) Remove MSAs from AD.
6) Reboot server.

Sincerely
Søren Tillgaard & Niels Grove-Rasmussen
Posted by mcbsys on 12/3/2013 at 12:27 PM
Update: using Systinternals Process Explorer, I discovered that this error was happening on Server 2012 R2 Essentials when the Remote Desktop Gateway service starts. It is not related to SQL Server. Remote Desktop Gateway runs under the Network Service account. When I gave that account Modify permission on C:\Windows\system32\LogFiles\Sum, the errors stopped. Instead, I get Information events 326 and 327 about attaching and detaching SystemIdentity.mdb.
Posted by mcbsys on 11/14/2013 at 6:08 PM
Just got this with SQL 2012 Express SP1 under Server 2012 R2 Essentials. I can't figure out how to add the permissions to the folder because the account "NT Service\MSSQL$SQLEXPRESS" (where SQL runs) is apparently not in Active Directory.
Posted by Stefan Prodan Dev on 5/12/2013 at 4:52 AM
I am getting the same error on SQL Server 2012 x64 SP1 Enterprise hosted on Hyper-V Windows Server 2012 Datacenter.
Posted by GScully on 4/24/2013 at 3:34 PM
I just did a fresh install of SQL 2012x64 with SP1 Enterprise on Server 2012 and see this in the event log.

Log Name:     Application
Source:        ESENT
Date:         04/24/13 15:24:16
Event ID:     489
Task Category: General
Level:         Error
Keywords:     Classic
User:         N/A
Computer:     2012SRVSQL
Description:
sqlservr (2820) An attempt to open the file "C:\Windows\system32\LogFiles\Sum\Api.log" for read only access failed with system error 5 (0x00000005): "Access is denied. ". The open file operation will fail with error -1032 (0xfffffbf8).
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
    <Provider Name="ESENT" />
    <EventID Qualifiers="0">489</EventID>
    <Level>2</Level>
    <Task>1</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2013-04-24T22:24:16.000000000Z" />
    <EventRecordID>1559</EventRecordID>
    <Channel>Application</Channel>
    <Computer>2012SRVSQL</Computer>
    <Security />
</System>
<EventData>
    <Data>sqlservr</Data>
    <Data>2820</Data>
    <Data>
    </Data>
    <Data>C:\Windows\system32\LogFiles\Sum\Api.log</Data>
    <Data>-1032 (0xfffffbf8)</Data>
    <Data>5 (0x00000005)</Data>
    <Data>Access is denied. </Data>
</EventData>
</Event>
Posted by Keith Langmead on 4/23/2013 at 8:19 AM
I'm seeing the same error. SQL Server 2012 Standard SP1 installed on Windows Server 2012 Standard, fresh install of both with Windows Server being a Hyper-V guest, and both fully patched. No databases installed yet, only changes made were to give local admin sysadmin permissions and adjust the default port being used. Installed using most of the defaults except for putting the user database, user transaction and backup files onto a different drive. Haven't changed the service users from default. Installed SQL Server, Intergration services and management tools, but didn't install reporting services, analysis services etc. Not currently seeing the error constantly, just when I start SQL.
Posted by Euler College on 4/13/2013 at 11:06 AM
Can Microsoft fix this issue? I hate seeing my event logs filled with this kinds of errors.
Posted by Miron contrib on 4/11/2013 at 1:12 PM
Please see workaround section for an example of how to address this issue when using encrypted connection.
Posted by Miron contrib on 4/11/2013 at 9:15 AM
Windows 2012 Data Center Edition.
SQL Server 2012 SP1 Enterprise Edition.

Message(s) in Windows Application event log appear as following:

5.
sqlservr (7572) Error -1032 (0xfffffbf8) occurred while opening logfile C:\Windows\system32\LogFiles\Sum\Api.log.
Cause unknown.

4.
sqlservr (7572) An attempt to open the file "C:\Windows\system32\LogFiles\Sum\Api.log" for read only access failed with system error 5 (0x00000005): "Access is denied. ". The open file operation will fail with error -1032 (0xfffffbf8).

3.
sqlservr (7572) Error -1032 (0xfffffbf8) occurred while opening logfile C:\Windows\system32\LogFiles\Sum\Api.log.
Cause unknown.

2.
sqlservr (7572) An attempt to open the file "C:\Windows\system32\LogFiles\Sum\Api.log" for read only access failed with system error 5 (0x00000005): "Access is denied. ". The open file operation will fail with error -1032 (0xfffffbf8).

1
sqlservr (7572) An attempt to open the file "C:\Windows\system32\LogFiles\Sum\Api.chk" for read / write access failed with system error 5 (0x00000005): "Access is denied. ". The open file operation will fail with error -1032 (0xfffffbf8).
Posted by VDimitris on 3/30/2013 at 9:17 AM
I am seeing this error too.
The kit is Windows Server 2012 Datacentre x64, SQL 2012, with Visual Studio 2010 and Visual Studio 2012 side by side.
I guess it has to do with the user account permissions used. Also same machine has issues with the reporting services (again on permissions grounds). The machine is also a domain controller which is not recommended for SQL installations.
Posted by Giuseppe Porcelli on 3/26/2013 at 10:50 AM
This happens in Developer 2012 too
Posted by Simn on 3/21/2013 at 4:41 AM
Me too: Server 2012 Foundation (not in domain) + SQL 2012 Ent.
ESENT ID 489 msmdsrv (1312) An attempt to open the file "C:\Windows\system32\LogFiles\Sum\Api.log" for read only access failed with system error 5 (0x00000005): "Access is denied. ". The open file operation will fail with error -1032 (0xfffffbf8).
ESENT ID 455 msmdsrv (1312) Error -1032 (0xfffffbf8) occurred while opening logfile C:\Windows\system32\LogFiles\Sum\Api.log.
ESENT ID 489 sqlservr (1276) An attempt to open the file "C:\Windows\system32\LogFiles\Sum\Api.log" for read only access failed with system error 5 (0x00000005): "Access is denied. ". The open file operation will fail with error -1032 (0xfffffbf8).
ESENT ID 455 sqlservr (1276) Error -1032 (0xfffffbf8) occurred while opening logfile C:\Windows\system32\LogFiles\Sum\Api.log.

Posted by Burt.Harris on 3/17/2013 at 12:07 PM
This is caused by an ACCESS DENIED error from sqlservr.exe 2011.0110.3128.00 ((SQL11_SP1_GDR).121228-2010 ) running as NT SERVICE\MSSQLSERVER calling the new User Access Logging function UalRegisterProduct at sqllang.dll + 0x15bc5f3.

Documentation on User Access Logging is at http://technet.microsoft.com/en-us/library/jj574126.aspx, but I followed the procedure for stopping and disabling UAL, yet the logged errors continue. Also tried corruption clean-up process from that web page (deleting files from C:\Windows\system32\LogFiles\Sum), but it's still spamming the event log with errors, now ESENT Event ID 413 "sqlservr (2592) Unable to create a new logfile because the database cannot write to the log drive. The drive may be read-only, out of disk space, misconfigured, or corrupted. Error -1032.".    

This looks like a permissions bug with User Access Logging to me.
Posted by Burt.Harris on 3/17/2013 at 10:39 AM
I think this is because the domain account I configured SSRS to run under may not have the right permissions. Also good to note that my server is also a domain controller, perhaps that's a necessary part of the repro. Message text for these events read:

sqlservr (5016) An attempt to open the file "C:\Windows\system32\LogFiles\Sum\Api.chk" for read / write access failed with system error 5 (0x00000005): "Access is denied. ". The open file operation will fail with error -1032 (0xfffffbf8).

sqlservr (5016) An attempt to open the file "C:\Windows\system32\LogFiles\Sum\Api.log" for read / write access failed with system error 5 (0x00000005): "Access is denied. ". The open file operation will fail with error -1032 (0xfffffbf8).

sqlservr (5016) Error -1032 (0xfffffbf8) occurred while opening logfile C:\Windows\system32\LogFiles\Sum\Api.log.
Posted by Burt.Harris on 3/17/2013 at 10:27 AM
I'm seeing this too, running SQL Server 2012 Enterprise Edition w/ SP1 on a physical machine. I took defaults in the install process, and have not installed any PowerPivot or SharePoint.