Umbraco V6.1.3 Lucene索引损坏
刚刚将翁布拉科V6.1.1站点升级到V6.1.3。在我的工作站上一切顺利。删除所有文件后,将文件复制到web服务器,并对数据库执行相同操作。设置所有目录权限并运行站点。该网站(即MVC)正在运行,但有两个问题我无法理解,非常感谢您的帮助 一页错误,带有读取超过EOF错误。这是它试图运行的视图。错误以粗体显示在链接上Umbraco V6.1.3 Lucene索引损坏,lucene,umbraco,umbraco6,Lucene,Umbraco,Umbraco6,刚刚将翁布拉科V6.1.1站点升级到V6.1.3。在我的工作站上一切顺利。删除所有文件后,将文件复制到web服务器,并对数据库执行相同操作。设置所有目录权限并运行站点。该网站(即MVC)正在运行,但有两个问题我无法理解,非常感谢您的帮助 一页错误,带有读取超过EOF错误。这是它试图运行的视图。错误以粗体显示在链接上 @inherits Umbraco.Web.Mvc.UmbracoTemplatePage @{ Layout = "BasePage.cshtml"; }
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
Layout = "BasePage.cshtml";
}
<div class="row-fluid">
<div class="span12">
<h1>@Umbraco.Field("pageName")</h1>
@Umbraco.Field("pageText")
</div>
</div>
<div class="row-fluid">
<div class="span12">
@foreach (var page in Model.Content.Children) {
<section class="well">
<h3>@page.Name</h3>
@if(page.Children.Count() > 0) {
<ul>
**@foreach (var pub in page.Children) {**
<li><a href="@Umbraco.Media(pub.GetPropertyValue("publication")).Url" title="@pub.Name" target="_blank">@pub.Name</a></li>
}
</ul>
}
</section>
}
</div>
</div>
另一个(我认为是相关的问题)是在CMS中,当打开开发者部分时,我得到一个javascript警报,其中有一条与Lucene相关的巨大错误消息
error: {"Message":"An error has occurred.","ExceptionMessage":"The 'ObjectContent`1' type failed to serialize the response body for content type 'application/json; charset=utf-8'.","ExceptionType":"System.InvalidOperationException","StackTrace":null,"InnerException":{"Message":"An error has occurred.","ExceptionMessage":"Could not create an index searcher with the supplied lucene directory","ExceptionType":"System.ApplicationException","StackTrace":" at Examine.LuceneEngine.Providers.LuceneSearcher.ValidateSearcher(Boolean forceReopen)\r\n at Examine.LuceneEngine.Providers.LuceneSearcher.GetSearcher()\r\n at Umbraco.Web.Search.ExamineExtensions.GetIndexReaderForSearcher(BaseLuceneSearcher searcher)\r\n at Umbraco.Web.Search.ExamineExtensions.GetIndexDocumentCount(LuceneIndexer indexer)\r\n at Umbraco.Web.WebServices.ExamineManagementApiController.CreateModel(BaseIndexProvider indexer)\r\n at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()\r\n at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n at Newtonsoft.Json.Serialization.JsonArrayContract.CreateWrapper(Object list)\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value)\r\n at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value)\r\n at System.Net.Http.Formatting.JsonMediaTypeFormatter.<>c__DisplayClassd.<WriteToStreamAsync>b__c()\r\n at System.Threading.Tasks.TaskHelpers.RunSynchronously(Action action, CancellationToken token)","InnerException":{"Message":"An error has occurred.","ExceptionMessage":"read past EOF","ExceptionType":"System.IO.IOException","StackTrace":" at Lucene.Net.Index.SegmentInfos.FindSegmentsFile.Run(IndexCommit commit)\r\n at Lucene.Net.Index.DirectoryReader.Open(Directory directory, IndexDeletionPolicy deletionPolicy, IndexCommit commit, Boolean readOnly, Int32 termInfosIndexDivisor)\r\n at Lucene.Net.Search.IndexSearcher..ctor(Directory path, Boolean readOnly)\r\n at Examine.LuceneEngine.Providers.LuceneSearcher.ValidateSearcher(Boolean forceReopen)"}}}
错误:{“Message”:“发生了错误”,“ExceptionMessage”:“ObjectContent`1”类型未能序列化内容类型“application/json;charset=utf-8”的响应正文”,“ExceptionType”:“System.invalidooperationexception”,“StackTrace”:null,“InnerException”:{“Message”:“发生了错误”,“ExceptionMessage”:”无法使用提供的lucene目录创建索引搜索程序,在Examine.LuceneEngine.Providers.LuceneSearcher.ValidateSearcher(布尔强制重新打开)处的“System.ApplicationException”,“StackTrace:”在Examine.LuceneEngine.Providers.LuceneSearcher.GetSearcher()处的“ExceptionType:”系统.ApplicationException:“StackTrace:”\r\n在Umbraco.Web.Search.ExamineExtensions.GetIndexReaderForSearcher(BaseLuceneSearcher)上\r\n在Umbraco.Web.Search.ExamineExtensions.GetIndexDocumentCount(LuceneIndexer indexer)上\r\n在Umbraco.Web.WebServices.ExamineManagementController.CreateModel(BaseIndexProvider indexer)上\r\n位于System.Linq.Enumerable.WhereSelectEnumerableInterator`2.MoveNext()\r\n位于System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n位于System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n位于Newtonsoft.Json.Serialization.JsonArrayContract.CreateWrapper(对象列表)\r\n位于Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter编写器、对象值、JsonContract valueContract、JsonProperty成员、JsonContainerContract、JsonProperty containerProperty)\r\n位于Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter JsonWriter,对象值)\r\n位于Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter JsonWriter,对象值)\r\n位于System.Net.Http.Formatting.JsonMediaTypeFormatter.c\u DisplayClassd.b\u c()\r\n位于System.Threading.Tasks.TaskHelpers.RunSynchronously(操作,取消令牌)”,“InnerException”:{“消息”:在Lucene.Net.Index.SegmentInfos.FindSegmentsFile.Run(IndexCommit commit commit)\r\n在Lucene.Net.Index.DirectoryReader.Open上出现错误。“,”ExceptionMessage“:”读取超过EOF“,”ExceptionType“:”System.IO.IOException“,”StackTrace“:”(目录目录,IndexDeletePolicy deletionPolicy,IndexCommit提交,布尔只读,Int32 termInfosIndexDivisor)\r\n位于Lucene.Net.Search.IndexSearcher..ctor(目录路径,布尔只读)\r\n位于Examine.LuceneEngine.Providers.LuceneSearcher.ValidateSearcher(布尔强制重新打开)}
我尝试过翁布拉科论坛,但没有得到回复。如果这是一个不需要思考的问题,我当然还需要知道
任何建议都将不胜感激。我将备份索引(它们位于app_data\temp\..),删除它们并重新启动app池
Umbraco将在下一次启动时重建它们(对于一个庞大的数据库,可能需要5-10分钟-150k个节点)
它可能是一个损坏的索引(在这种情况下,抓取备份并对其使用Luke,看看它是否损坏),或者可能是索引的版本发生了更改,这是相同的结果
谢谢!删除TEMP/examiceIndexes目录的内容并重新启动应用程序池清除了这两个错误。这让我心头大扫除:)没问题。我遇到了类似的索引损坏问题:(也为我修复了类似的问题。
error: {"Message":"An error has occurred.","ExceptionMessage":"The 'ObjectContent`1' type failed to serialize the response body for content type 'application/json; charset=utf-8'.","ExceptionType":"System.InvalidOperationException","StackTrace":null,"InnerException":{"Message":"An error has occurred.","ExceptionMessage":"Could not create an index searcher with the supplied lucene directory","ExceptionType":"System.ApplicationException","StackTrace":" at Examine.LuceneEngine.Providers.LuceneSearcher.ValidateSearcher(Boolean forceReopen)\r\n at Examine.LuceneEngine.Providers.LuceneSearcher.GetSearcher()\r\n at Umbraco.Web.Search.ExamineExtensions.GetIndexReaderForSearcher(BaseLuceneSearcher searcher)\r\n at Umbraco.Web.Search.ExamineExtensions.GetIndexDocumentCount(LuceneIndexer indexer)\r\n at Umbraco.Web.WebServices.ExamineManagementApiController.CreateModel(BaseIndexProvider indexer)\r\n at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()\r\n at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n at Newtonsoft.Json.Serialization.JsonArrayContract.CreateWrapper(Object list)\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value)\r\n at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value)\r\n at System.Net.Http.Formatting.JsonMediaTypeFormatter.<>c__DisplayClassd.<WriteToStreamAsync>b__c()\r\n at System.Threading.Tasks.TaskHelpers.RunSynchronously(Action action, CancellationToken token)","InnerException":{"Message":"An error has occurred.","ExceptionMessage":"read past EOF","ExceptionType":"System.IO.IOException","StackTrace":" at Lucene.Net.Index.SegmentInfos.FindSegmentsFile.Run(IndexCommit commit)\r\n at Lucene.Net.Index.DirectoryReader.Open(Directory directory, IndexDeletionPolicy deletionPolicy, IndexCommit commit, Boolean readOnly, Int32 termInfosIndexDivisor)\r\n at Lucene.Net.Search.IndexSearcher..ctor(Directory path, Boolean readOnly)\r\n at Examine.LuceneEngine.Providers.LuceneSearcher.ValidateSearcher(Boolean forceReopen)"}}}