2

大家好,我的 Content Delivery 服务器有点问题。我们无法删除主数据库而不使其崩溃。我们目前的信息如下:

Sitecore.NET 6.5.0 (rev. 111230)
December 30, 2011
.NET Framework 4.0.30319.239
Database version: 500

我们收到的错误和堆栈跟踪是:

[InvalidOperationException: Unknown connection string. Name: 'master']
   Sitecore.Configuration.Settings.GetConnectionString(String connectionStringName) +364
   Sitecore.Configuration.Factory.CreateFromConnectionStringName(XmlNode configNode, String[] parameters, Boolean assert) +106
   Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +164
   Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert) +110
   Sitecore.Configuration.Factory.GetConstructorParameters(XmlNode configNode, String[] parameters, Boolean assert) +209
   Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert) +94
   Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +141
   Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert) +424
   Sitecore.Configuration.Factory.CreateFromReference(XmlNode configNode, String[] parameters, Boolean assert) +194
   Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +118
   Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert) +930
   Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper) +581
   Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +296
   Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert) +424
   Sitecore.Configuration.Factory.GetDatabase(String name, Boolean assert) +185
   Sitecore.Configuration.Factory.GetDatabases() +152
   Sitecore.Data.Managers.HistoryManager.InitializeEventHandlers() +49
   Sitecore.Pipelines.Loader.InitializeManagers.Process(PipelineArgs args) +14
   (Object , Object[] ) +80
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +191
   Sitecore.Nexus.Web.HttpModule.Application_Start() +146
   Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +603
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +575
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +352
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +407
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +375

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

似乎当历史管理器正在初始化时,它在某个时候从主数据库请求信息。谁能帮我找出这个问题发生在哪里?

提前致谢,

-汤姆

更新#1

将 SwitchMasterToWeb.config 添加到 app_config/include 文件夹后,我现在收到以下消息:

[InvalidOperationException: Could not find configuration node: databases/database[@id='master']]
   Sitecore.Diagnostics.Assert.IsTrue(Boolean condition, String message) +57
   Sitecore.Configuration.Factory.GetConfigNode(String xpath, Boolean assert) +279
   Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert) +144
   Sitecore.Configuration.Factory.GetDatabase(String name) +169
   LuceneSearch.LuceneSearch.LuceneSearchBox.Page_Load(Object sender, EventArgs e) in C:\xyz\Website\sitecore modules\LuceneSearch\LuceneSearchBox.ascx.cs:29
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064
4

6 回答 6

5

您的搜索索引配置可能包含对主数据库和 Web 数据库的引用。您需要在 CD 服务器上修补或替换它,以仅包含一个 Web 数据库位置。

于 2013-03-12T22:07:11.983 回答
3

LuceneSearch.LuceneSearch.LuceneSearchBox.Page_Load()具有对数据库的硬编码引用。在没有这个的情况下重新编译或不部署此代码隐藏所在的 DLL。

于 2013-03-13T00:01:46.323 回答
2

如果您在 app_config\include 中复制 SwitchMasterToWeb.Config,则应删除对主数据库的引用。如果您已经复制了它,请检查您在配置历史引擎时是否犯了复制粘贴错误。

于 2013-03-12T21:50:25.710 回答
1

如果要删除生产环境的数据库,您还需要记住更新环境的配置(将每个站点重新指向Web数据库、删除数据库索引和档案等)。

这是解释如何配置Sitecore生产环境的文档。它是为 Sitecore 6.0 编写的,但在较新版本中的工作方式相同。第 1.2.1 章解释了删除master数据库需要做什么:

http://sdn.sitecore.net/upload/sdn5/developer/configuring%20production%20environments/configuring%20production%20environments.pdf

于 2013-03-12T21:46:44.293 回答
1

转到 www.yoursite.com/sitecore/admin/showconfig.aspx 查看您当前的配置。对“master”进行文本搜索或检查部分

<indexes>

<Engines.HistoryEngine.Storage>

您可能有一个仍然指向主数据库的设置。它可能包含在 /App_Config/ 中的包含文件之一中

于 2013-03-12T22:24:23.150 回答
1

我从 App_Config 目录中删除了文件“Sitecore.ContentSearch.Lucene.Index.Master.config”,这为我解决了。我试图设置 LaunchSitecore 端,使用 CM 和 CD 环境。

于 2014-04-11T00:37:43.890 回答