1

I think I'm completely missing some step in my CD server deployment as I'm setting up my first XP Scaled environment in Azure and I'm facing the following issue with my CD server:

Unknown connection string. Name: 'master'

I think there's still some configs that are trying to refer to the master db?

I thought the Azure Toolkit wouldve taken care of that in 9.0.2?

the path /sitecore/admin/showconfig.aspx will throw the error as well, so I cant see which configs are there.

Stacktrace:

[InvalidOperationException: Unknown connection string. Name: 'master']
   Sitecore.Configuration.DefaultSettings.GetConnectionString(String connectionStringName) +384
   Sitecore.Configuration.DefaultFactory.CreateFromConnectionStringName(XmlNode configNode, String[] parameters, Boolean assert) +182
   Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +188
   Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert) +72
   Sitecore.Configuration.DefaultFactory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert) +109
   Sitecore.Configuration.DefaultFactory.GetConstructorParameters(XmlNode configNode, String[] parameters, Boolean assert) +161
   Sitecore.Configuration.DefaultFactory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert) +94
   Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +163
   Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert) +72
   Sitecore.Configuration.DefaultFactory.CreateObject(String configPath, String[] parameters, Boolean assert) +693
   Sitecore.Configuration.DefaultFactory.CreateFromReference(XmlNode configNode, String[] parameters, Boolean assert) +170
   Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +116
   Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert) +72
   Sitecore.Configuration.DefaultFactory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert) +941
   Sitecore.Configuration.DefaultFactory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper) +527
   Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +320
   Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert) +72
   Sitecore.Configuration.DefaultFactory.CreateObject(String configPath, String[] parameters, Boolean assert) +693
   Sitecore.Configuration.DefaultFactory.GetDatabase(String name, Boolean assert) +157
   Sitecore.Configuration.DefaultFactory.GetDatabase(String name) +55
   Sitecore.Configuration.DefaultFactory.GetDatabases() +121
   Sitecore.Data.Managers.DefaultItemManager.Initialize() +101
   (Object , Object ) +87
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
   (Object , Object ) +9
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists) +236
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
   Sitecore.Nexus.Web.HttpModule.Application_Start() +161
   Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +767
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +581
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +168
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +277
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +369

[HttpException (0x80004005): Unknown connection string. Name: 'master']
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +532
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +714

EDIT

I'm a real idiot. I've been so confident in having set the following to ContentDelivery that I completely wrote that out of the possibilities. I need to automate this in my release pipeline.

Wasted four hours on nothing huh,,

    <!-- SUPPORTED SERVER ROLES
         Specify the roles that you want this server to perform. A server can perform one or more roles. Enter the roles in a comma separated list. The supported roles are:

         ContentDelivery
         ContentManagement
         Processing
         Reporting
         Standalone

    Default value: Standalone
    -->
    <add key="role:define" value="ContentDelivery" />
  • Your edit was the answer – JGilmartin Apr 16 at 9:28
  • @Anh-Duc Yours Edit, you can add as answer. – Abhishek Malaviya May 19 at 6:20
1

It's likely that you have a patch config file somewhere in your App_Config folder that references the master connection string.

Some things to check:

  1. Have you enabled the Z.SwitchMasterToWeb.config patch config for your CD server?
  2. Have you followed the configuration steps in the documentation for a single or multiple CD setup?
  3. There were some potential solutions raised by this similar question on Stack Overflow, including the following:
    • Make sure your search indexes don't contain references to the master database or connection string
2

You have "master" database configuration on your CD server. It requires "master" connection string that is absent.

You can remove master database (<database id="master") configuration on your CD server to overcome this issue.

(or if you need for some reason master database on your CD server, then add connection string to master database in you connectionstrings.config file)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.