The Altiris logs show "Error: 18456, Severity: 14, State: 16" with a connection error to the database
search cancel

The Altiris logs show "Error: 18456, Severity: 14, State: 16" with a connection error to the database

book

Article ID: 176689

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

The following errors are showing up in the Altiris logs:

<event date='Nov 13 05:54:00' severity='1' hostName='Altiris' source='Altiris.NS.Scheduling.ScheduleService.ProcessSchedule' module='AltirisNativeHelper.dll' process='aexsvc.exe' pid='1328' thread='3284' tickCount='26503031' >
  <![CDATA[Failed to process schedule '{c1aa60e3-43cf-49b8-a7cb-8531b06bf871}'. Exception: Failed to construct DatabaseContext object. Connection to database failed.    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.NS.Scheduling.ScheduleService.ProcessSchedule(String scheduleId)]]>
</event>
<event date='Nov 13 05:54:00' severity='1' hostName='Altiris' source='Altiris.NS.Scheduling.ScheduleService.ProcessSchedule' module='AltirisNativeHelper.dll' process='aexsvc.exe' pid='1328' thread='3284' tickCount='26503046' >
  <![CDATA[Additional info '{c1aa60e3-43cf-49b8-a7cb-8531b06bf871}'. Exception: Failed to open database connection. Current user is domain\Administrator. Error: Cannot open database "Altiris" requested by the login. The login failed.
Login failed for user 'domain\Administrator'.    at Altiris.NS.Utilities.DbUtils.OpenConnection(SqlConnection dbConn)
   at Altiris.NS.Utilities.DbUtils.CreateConnection(String configKey)
   at Altiris.NS.Utilities.DbUtils.CreateConnection()
   at Altiris.NS.ContextManagement.DatabaseContext..ctor(ContextIdentity identity, Boolean beginTransaction, IsolationLevel isolationLevel)]]>
</event>
<event date='Nov 13 05:54:01' severity='1' hostName='Altiris' source='Altiris.NS.ClientMessaging.ClientEvtQueueWatcher.LogEventQueueStatusThreadProc' module='AltirisNativeHelper.dll' process='aexsvc.exe' pid='1328' thread='1668' tickCount='26504062' >
  <![CDATA[Caught unknown exception. Error=Altiris.NS.Exceptions.AeXException: Failed to open database connection. Current user is domain\Administrator. Error: Cannot open database "Altiris" requested by the login. The login failed.
Login failed for user 'domain\Administrator'. ---> System.Data.SqlClient.SqlException: Cannot open database "Altiris" requested by the login. The login failed.
Login failed for user 'domain\Administrator'.
   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.NS.Utilities.DbUtils.OpenConnection(SqlConnection dbConn)
   --- End of inner exception stack trace ---
   at Altiris.NS.Utilities.DbUtils.OpenConnection(SqlConnection dbConn)
   at Altiris.NS.Utilities.DbUtils.CreateConnection(String configKey)
   at Altiris.NS.Utilities.DbUtils.GetNSDatabaseVersion()
   at Altiris.NS.Utilities.DbUtils.IsNSDatabaseReady()
   at Altiris.NS.ClientMessaging.ClientEvtQueueWatcher.LogEventQueueStatusThreadProc()]]>
</event>

Upon checking the SQL Server logs, they are showing: "Error: 18456, Severity: 14, State: 16."  The next statement in the logs was "Login failed for user 'domain\Administrator'. (CLIENT: 127.0.0.1)". After a few entries of this, it showed "Starting up database 'Altiris'" and also the Altiris_Incidents database, and then the errors went away.

Cause

  1. The database permissions were correct in the Notification Server, and it ran properly for most of the time. According to the Windows System logs, the server was rebooted using a planned reboot, and the Altiris database was taking 5–10 minutes to come online, while some scheduled tasks were already starting to run.
  2. In other cases, the Notification Server logs also showed errors where there were also continual (hourly) failures to authenticate to the Altiris_Incidents database using the same account. This was causing said account to be locked or disabled by the security settings on the database server.

Resolution

  1. The SQL Server needs to get this database online sooner. This issue would have to be taken up with Microsoft.
  2. If there are other authentication failures to other databases in the Notification Server logs, SQL logs or Event logs using the same account (as the Application Identity) then this may be the cause of the eventual catastrophic failures on Notification Server. In the case of the Altiris_Incidents database authentication failures, simply going into Configuration > Server Settings > Notification Server Settings, under Altiris Incidents then reconfiguring the proper settings and applying them shut the authentication failures off and ultimately eliminated the other failures to the Altiris database.

Applies To
Notification Server 6.0.6074 (SP3 R6)
Windows 2003 Server Enterprise SP2
SQL Server 2005 (installed on the same server)