Video Screencast Help

Background Commit errors

Created: 09 Jul 2012 • Updated: 23 Jul 2012 | 6 comments

I recently began seeing errors similar to the following in the NS server logs:

Jul 08 09:56:23  E  Background commit failed for incident #492400:
Altiris.Helpdesk.Services.WorkItemException: A SQL error has occurred:Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. ---> System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. at Altiris.Helpdesk.Services.SqlHelper.Execute(DataSet fillDataSet, String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters, Int32 nRowsToReturn, Int32 nRowsToSkip, Int32 commandTimeout) at Altiris.Helpdesk.Services.WorkItemService.Retrieve(WorkItemDataSet fillDataSet, Int32 id) --- End of inner exception stack trace --- at Altiris.Helpdesk.Services.WorkItemService.BackgroundCommit(Object stateInfo)  Altiris.Helpdesk.Services.WorkItemService.BackgroundCommit  AltirisNativeHelper.dll  w3wp.exe (6356)  5884  
 

We are running Nositifcation Server 6.0.6074 (SP 3 + R13) and Helpdesk Solution 6.0.308 (Helpdesk Solution 6.x, SP5).

When these errors happen, all business rules look like they appliedwhen looking at the ticket, but they do not actually work (Notify Rules do not send an email, Automation Rules do not create child tickets, etc). One thing I have noticed is when these errors start, they are preceded in the NS logs with license errors like the following:

Jul 08 00:02:06  E  Unable to retrieve license information. Error: Failed to construct DatabaseContext object. Connection to database failed. <License error="true" SolutionGuid="{FCA7F0B7-B61B-4979-946E-C921B85F2A39}" SolutionName="" Trial="False" Status="Unlicensed" Available="10000000" InUse="0" DaysRemaining="0" /> at Altiris.NS.ContextManagement.DatabaseContext..ctor(ContextIdentity identity, Boolean beginTransaction, IsolationLevel isolationLevel) at Altiris.NS.ContextManagement.DatabaseContext.GetContext(Boolean createNewTransaction, IsolationLevel isolationLevel, ContextIdentity identity, Boolean independentContext) at Altiris.NS.ItemManagement.Item.GetItem(Guid itemGuid) at Altiris.Helpdesk.Services.Configuration.GetLicenseDetails(String solutionGuid)
 

What is strange is the 'SolutionName' in the error is equal to "". When I look at the NS log viewer on the server, the Solution Guid will show the actual solution name, in the example above it is 'Helpdesk Solution'. This also happens for Carbon Copy and Real-Time System Mgr. We recently updated our NS licenses in May to update the AUP dates. These errors started to happen on June 30.

I tried to re-apply the licenses and the only thing that gets rid of the Background Commit errors is a reboot of the Helpdesk server. Has anyone seen anything similar to this before or have any suggestions for a fix? Thanks

Comments 6 CommentsJump to latest comment

Rob Moore's picture

Are you using the application identity to access the SQL database? or is it a local SQL account?

 

When you see this username :AUTHORITY\NETWORK SERVICE' it usually means your system is not connecting with a named user account, but rather the generic Network Service, which usually has no permissions to do anything in SQL.

 

rob

 

 

matzebru's picture

Thanks for the reply. Yes, I'm using the Application Identity with a domain service account name for the SQL access.

- Bruce

 *** If a forum post solves your problem, please flag it as a solution. If you like an article or forum post, vote it up. ***

matzebru's picture

I deleted all the solution licenses on the server and then applied only the most recent batch. This seems to have done the trick.

- Bruce

 *** If a forum post solves your problem, please flag it as a solution. If you like an article or forum post, vote it up. ***

matzebru's picture

I should have knocked on wood ... the issue came back this weekend. Unfortunately the only way to "fix" this is to restart the server. Restarting IIS, the SQL (SQL is "on-box") and the Altiris Services doesn't help at all. There are no errors in the Application or System event logs that provide any clues and this is random when it happens.

What will always happen is three license errors in the NS logs for Carbon Copy, Helpdesk Solution and Real-Time System Mgr. And then a single error like the following:

Date: 07/20/2012 10:52:30 PM
Tick Count: 1003980750
Host Name: PBIDELPRD087
Process: w3wp.exe (6808)
Thread ID: 2420
Module: AltirisNativeHelper.dll
Source: SqlHelper.GetSpParameterSet
Description: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.    at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)  
   at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
   at System.Data.SqlClient.SqlConnection.Open()
   at Altiris.Helpdesk.Services.SqlHelperParameterCache.DiscoverSpParameterSet(SqlConnection connection, String spName, Boolean includeReturnValueParameter, SqlCommand command)
   at Altiris.Helpdesk.Services.SqlHelperParameterCache.GetSpParameterSet(SqlConnection connection, String spName, Boolean includeReturnValueParameter, SqlCommand command)
   at Altiris.Helpdesk.Services.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName, Boolean includeReturnValueParameter, SqlCommand command)
 

Then I get the three license errors again following that error. The weird thing with those license erros is the "Solution Name" part of the error always show as ' SolutionName="" '. I don't know which solutions they are unless I look at the SolutionGUID in the error. Once those license errors trip, I then get the Background Commit errors, with part of the error being "Login failed for user 'NT AUTHORITY\NETWORK SERVICE'" ,everytime a Helpdesk ticket is edited.

- Bruce

 *** If a forum post solves your problem, please flag it as a solution. If you like an article or forum post, vote it up. ***

matzebru's picture

Well I got around our License and SQL Background Commit errors in the NS Logs by changing the NS "Database Settings" and "Incident Settings" config pages in the console from using the Application Identity for the database credentials to using a local SQL account for db credentials.

Now, every hour when the AlertManager AutoUpdate Sync runs, I'm getting 5 instances of "Login failed for user '<SQL account name>'". I also have two Incident Rules that use the AEXQUERY data macro that will trigger the same message when they query the Altiris database. Everything else in NS runs fine interacting with the Altiris database using the same SQL login.

Anybody ever run into a similar issue and know how to fix this or have any ideas on what to try?

Thanks

- Bruce

 *** If a forum post solves your problem, please flag it as a solution. If you like an article or forum post, vote it up. ***

Rob Moore's picture

The SQL errors make sense as the alert manager runs under the user context service account running the alert manager. That  account needs to be a domain account with permissions to the SQL server.

 

I have all my settings using the application identity, and all the Altiris services on the NS server using the same app identity as the account running the services.

 

rob