Upgrade or Repair fails with error: SQL Catalog is not set in CoreSettings.Config
search cancel

Upgrade or Repair fails with error: SQL Catalog is not set in CoreSettings.Config

book

Article ID: 215640

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

The customer was trying to run a repair on Symantec Management Platform (SMP) through Symantec Installation Manager (SIM).

When SIM reached out the reconfiguration portion of the repair, it failed with the following message:

A critical error occurred:
Altiris.NS.Exceptions.DatabaseNotReadyException: Failed to construct DatabaseContext object. Connection to database failed. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Altiris.NS.Exceptions.DatabaseNotReadyException: SQL Catalog is not set in CoreSettings.Config

The SIM log showed the following entries:

Failure during SQL configuration:
Altiris.NS.Exceptions.DatabaseNotReadyException: Failed to construct DatabaseContext object. Connection to database failed. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Altiris.NS.Exceptions.DatabaseNotReadyException: SQL Catalog is not set in CoreSettings.Config
   at Altiris.NS.Utilities.DbUtils.GetConnectionParameters(String configKey, String& server, String& catalog, String& user, String& password)
   at Altiris.NS.Utilities.DbUtils.CreateConnection(String configKey)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at ReflectionProxy.ReflectionProxy.<>c__DisplayClass16_0.<InstallSqlClassNodes>b__0()
   at Altiris.Database.DatabaseContext`1.Initialize(Boolean beginTransaction, IsolationLevel isolationLevel)
   --- End of inner exception stack trace ---
   at Altiris.NS.ContextManagement.AdminDatabaseContext.ThrowDatabaseNotReadyException(String exceptionDetails, Exception innerException)
   at Altiris.Database.DatabaseContext`1.Initialize(Boolean beginTransaction, IsolationLevel isolationLevel)
   at Altiris.Database.DatabaseContext`1.CreateFirstContext(ContextTransactionMode tmode, Nullable`1 isolationLevel, DatabaseContextStack currentStack, Boolean trans)
   at Altiris.Database.DatabaseContext`1.GetContextImpl(ContextTransactionMode tmode, Nullable`1 isolationLevel, Boolean independentContext)
   at Altiris.Database.DatabaseContext`1.GetContext(ContextTransactionMode tmode, Nullable`1 isolationLevel, Boolean independentContext)
   at ReflectionProxy.ReflectionProxy.InstallSqlClassNodes(String configFile, Boolean installClasses)
   at SyncInvokeInstallSqlClassNodes(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
   [System.ServiceModel.FaultException @ mscorlib]

Server stack trace: 
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at ReflectionProxy.IReflectionProxy.InstallSqlClassNodes(String configFile, Boolean installClasses)
   at Symantec.Installation.NSConfiguration.Tasks.InstallSQLTask.InstallSQL()

Exception logged from: 
   at Symantec.Installation.Logging.LogActivity.ReportException(Int32 severity, String strMessage, String category, Exception exception, String footer)
   at Symantec.Installation.Logging.LogActivity.ReportException(String strMessage, String category, Exception exception)
   at Symantec.Installation.NSConfiguration.Tasks.InstallSQLTask.InstallSQL()
   at Symantec.Installation.NSConfiguration.Tasks.InstallSQLTask.<StartImpl>d__5.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   at Symantec.Installation.NSConfiguration.Tasks.InstallSQLTask.StartImpl()
   at Symantec.Installation.NSConfiguration.Tasks.SerialTask.<Start>d__0.MoveNext()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()


-----------------------------------------------------------------------------------------------------
Date: 21/05/2021 09:12:09, Tick Count: 52036203 (14:27:16.2030000), Size: 5,08 KB
Process: SymantecInstallationManager (3252), Thread ID: 17, Module: SymantecInstallationManager.exe
Priority: 1, Source: Symantec.Installation.NSConfiguration.Tasks.InstallSQLTask.InstallSQL

 

ConfigureNS - task_Completed(): Configuration Task Configuring database... Failed: Altiris.NS.Exceptions.DatabaseNotReadyException: Failed to construct DatabaseContext object. Connection to database failed. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Altiris.NS.Exceptions.DatabaseNotReadyException: SQL Catalog is not set in CoreSettings.Config
   at Altiris.NS.Utilities.DbUtils.GetConnectionParameters(String configKey, String& server, String& catalog, String& user, String& password)
   at Altiris.NS.Utilities.DbUtils.CreateConnection(String configKey)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at ReflectionProxy.ReflectionProxy.<>c__DisplayClass16_0.<InstallSqlClassNodes>b__0()
   at Altiris.Database.DatabaseContext`1.Initialize(Boolean beginTransaction, IsolationLevel isolationLevel)
   --- End of inner exception stack trace ---
   at Altiris.NS.ContextManagement.AdminDatabaseContext.ThrowDatabaseNotReadyException(String exceptionDetails, Exception innerException)
   at Altiris.Database.DatabaseContext`1.Initialize(Boolean beginTransaction, IsolationLevel isolationLevel)
   at Altiris.Database.DatabaseContext`1.CreateFirstContext(ContextTransactionMode tmode, Nullable`1 isolationLevel, DatabaseContextStack currentStack, Boolean trans)
   at Altiris.Database.DatabaseContext`1.GetContextImpl(ContextTransactionMode tmode, Nullable`1 isolationLevel, Boolean independentContext)
   at Altiris.Database.DatabaseContext`1.GetContext(ContextTransactionMode tmode, Nullable`1 isolationLevel, Boolean independentContext)
   at ReflectionProxy.ReflectionProxy.InstallSqlClassNodes(String configFile, Boolean installClasses)
   at SyncInvokeInstallSqlClassNodes(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
Altiris.NS.Exceptions.DatabaseNotReadyException: Failed to construct DatabaseContext object. Connection to database failed. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Altiris.NS.Exceptions.DatabaseNotReadyException: SQL Catalog is not set in CoreSettings.Config
   at Altiris.NS.Utilities.DbUtils.GetConnectionParameters(String configKey, String& server, String& catalog, String& user, String& password)
   at Altiris.NS.Utilities.DbUtils.CreateConnection(String configKey)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at ReflectionProxy.ReflectionProxy.<>c__DisplayClass16_0.<InstallSqlClassNodes>b__0()
   at Altiris.Database.DatabaseContext`1.Initialize(Boolean beginTransaction, IsolationLevel isolationLevel)
   --- End of inner exception stack trace ---
   at Altiris.NS.ContextManagement.AdminDatabaseContext.ThrowDatabaseNotReadyException(String exceptionDetails, Exception innerException)
   at Altiris.Database.DatabaseContext`1.Initialize(Boolean beginTransaction, IsolationLevel isolationLevel)
   at Altiris.Database.DatabaseContext`1.CreateFirstContext(ContextTransactionMode tmode, Nullable`1 isolationLevel, DatabaseContextStack currentStack, Boolean trans)
   at Altiris.Database.DatabaseContext`1.GetContextImpl(ContextTransactionMode tmode, Nullable`1 isolationLevel, Boolean independentContext)
   at Altiris.Database.DatabaseContext`1.GetContext(ContextTransactionMode tmode, Nullable`1 isolationLevel, Boolean independentContext)
   at ReflectionProxy.ReflectionProxy.InstallSqlClassNodes(String configFile, Boolean installClasses)
   at SyncInvokeInstallSqlClassNodes(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
   [System.ServiceModel.FaultException @ mscorlib]

Server stack trace: 
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at ReflectionProxy.IReflectionProxy.InstallSqlClassNodes(String configFile, Boolean installClasses)
   at Symantec.Installation.NSConfiguration.Tasks.InstallSQLTask.InstallSQL()
   at Symantec.Installation.NSConfiguration.Tasks.InstallSQLTask.<StartImpl>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Symantec.Installation.NSConfiguration.Tasks.SerialTask.<Start>d__0.MoveNext()

Exception logged from: 
   at Symantec.Installation.Logging.LogActivity.ReportException(Int32 severity, String strMessage, String category, Exception exception, String footer)
   at Symantec.Installation.Logging.LogActivity.ReportException(String strMessage, String category, Exception exception)
   at Symantec.Installation.ConfigureNS.task_Completed(Object sender, CompletedEventArgs e)
   at Symantec.Installation.Task.OnCompleted(Exception ex)
   at Symantec.Installation.NSConfiguration.Tasks.SerialTask.<Start>d__0.MoveNext()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()


-----------------------------------------------------------------------------------------------------
Date: 21/05/2021 09:12:49, Tick Count: 52076359 (14:27:56.3590000), Size: 7,83 KB
Process: SymantecInstallationManager (3252), Thread ID: 17, Module: SymantecInstallationManager.exe
Priority: 1, Source: Symantec.Installation.ConfigureNS.task_Completed

Environment

ITMS 8.1, 8.5, 8.6

Cause

CoreSettings.config was missing the expected values for the following entries:

  <customSetting key="DbServer" type="local" value="" />
  <customSetting key="DbUser" type="local" value="" />
  <customSetting key="DbPassword" type="local" value="" />
  <customSetting key="DbCatalog" type="local" value="" />

Resolution

CoreSettings.config requires to have the following values populated with the proper references:

  <customSetting key="DbServer" type="local" value="" />
  <customSetting key="DbUser" type="local" value="" />
  <customSetting key="DbPassword" type="local" value="" />
  <customSetting key="DbCatalog" type="local" value="" />

Example:

  <customSetting key="DbServer" type="local" value="sqlserver.dom1.com" />
  <customSetting key="DbUser" type="local" value="sa" />
  <customSetting key="DbPassword" type="local" value="AwAeK3bkfQ9E08NlqmNOJWSrdmZFiB6+7ceYf8xq6J52LqC8fOG/WvCHKbRVp7otmEWXz2L3VcnVnuoJmWgZ3OEc7q0FMZTZDybWn09yVo+5SBPWeGLfRpN7LUn2xsDDNAuIQiEvLwenY1vwhKXOjx4E" />
  <customSetting key="DbCatalog" type="local" value="Symantec_CMDB" />

  1. Review the file called "CoreSettings.config.backup" or any other older copy present under "C:\ProgramData\Symantec\SMP\Settings" and see if that information is present.
  2. Update the settings accordingly on CoreSettings.config. Save the changes.
  3. Run a repair again using SIM.

 

In case there is not a working copy of the coresettings.config or a backup of it, try the following:

1. Launch SIM "Configure Settings>Configure Database Settings" in SIM and create the database that way. 

This process should trigger the coresettings.config entry creation and proper regkeys references (usually under "HKEY_LOCAL_MACHINE\SOFTWARE\Altiris\AIM\Configuration\NsConfiguration" and "HKEY_LOCAL_MACHINE\SOFTWARE\Altiris\eXpress\Notification Server")

2. Then, do the same for "Configure NS Settings"

3. Then, you should be able to run a Reconfigure of what you have installed. 

 

Additional Information

170170 "During a reconfiguration SIM error: Connection to database failed"