Umbraco V6.1.3 Lucene索引损坏 [英] Umbraco V6.1.3 Lucene Index Corruption

查看:66
本文介绍了Umbraco V6.1.3 Lucene索引损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只需将Umbraco V6.1.1站点升级到V6.1.3.在我的工作站上一切顺利.删除所有文件后,将文件复制到Web服务器,并对数据库执行相同的操作.设置所有目录权限并运行该站点.网站(即MVC)运行BUT时遇到两个我无法理解的问题,非常感谢您的帮助.

Just upgraded an Umbraco V6.1.1 site to V6.1.3. All went well on my workstation. Copied the files up to the web server after deleting all that was there, did the same with the database. Set all the directory permissions and ran the site. Site (which is MVC) runs BUT with two issues which I can't fathom and would really appreciate some help with.

一页错误和过去读取的EOF"错误.这是它试图运行的视图.错误出现在以粗体显示的链接上.

One page errors with a Read Past EOF error. This is the view it's trying to run. The error is on link in Bold.

@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>

堆栈跟踪为

[IOException: read past EOF]
   Lucene.Net.Index.FindSegmentsFile.Run(IndexCommit commit) +2040
   Lucene.Net.Index.DirectoryReader.Open(Directory directory, IndexDeletionPolicy deletionPolicy, IndexCommit commit, Boolean readOnly, Int32 termInfosIndexDivisor) +57
   Lucene.Net.Search.IndexSearcher..ctor(Directory path, Boolean readOnly) +29
   Examine.LuceneEngine.Providers.LuceneSearcher.ValidateSearcher(Boolean forceReopen) +136

另一个(我认为相关问题)在CMS中,当打开开发人员"部分时,我收到一个JavaScript警报,其中包含与Lucene有关的巨大错误消息

The other (I think related issue) is in the CMS, when opening the Developer Section, I get a javascript alert with a huge error message in it relating to 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)"}}}

曾经尝试过Umbraco论坛,但没有回复.如果不费吹灰之力,我当然仍然需要知道.

Have tried the Umbraco forum but have had no replies. If it's a no-brainer, I still need to know of course.

任何建议将不胜感激.

推荐答案

我将备份索引(它们位于app_data \ temp \ ....中),然后删除它们并重新启动应用程序池.

I'd back up the indexes (they are in app_data\temp\....), and delete them and restart the app pool.

Umbraco将在下次启动时重建它们(对于HUGE数据库可能需要5-10分钟的时间-150k节点).

Umbraco will rebuild them (can take 5-10 mins for a HUGE database - 150k nodes) on next start up.

它可能是损坏的索引(在这种情况下,请抓住备份并使用Luke,看看它是否损坏),或者可能是索引的版本已更改-结果相同.

It might be a corrupt index (in which case, grab the backup and use Luke on it, see if it is broken), or possibly that the version of the index changed - which is the same result.

https://code.google.com/p/luke/

这篇关于Umbraco V6.1.3 Lucene索引损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆