Open akuryan opened 8 years ago
The reason of the error is because the index-rebuilding operation has been run under the extranet\Anonymous
user, which does not have access right to read the Lock
field value.
The interesting part that it happened for Sitecore legacy search indexes based on the Sitecore.Search
API. Most likely you are using the new Sitecore.ContentSearch
API. If yes, it makes sense to rebuild only new indexes and completely disable the legacy one, which is going to be removed in Sitecore 8.X.
If you confirm you are not using the legacy indexes, I will disable the code which rebuilds them and release an update for the NuGet package.
I supposed previously that in Sitecore 7.2 legacy indexes is already disabled by default. And, as far as I see - we do not use legacy indexes
Unfortunately, the legacy indexes are on and running even in Sitecore XP 8.1.
Let me disable rebuilding of the legacy index and release a new package. For the meantime, you can perform the following steps to disable them in your Sitecore solution. I presume it should fix the above error.
Web.config
file, set the Indexing.UpdateInterval
setting to the 00:00:00
value. In the Web.config
file, remove the system
index definition with entire <indexes>
section under the \configuration\sitecore\search\configuration
element:
<search>
...
<configuration type="Sitecore.Search.SearchConfiguration, Sitecore.Kernel" singleInstance="true">
<indexes hint="list:AddIndex">
<index id="system" type="Sitecore.Search.Index, Sitecore.Kernel">
...
</index>
</indexes>
</configuration>
</search>
\Data\Indexing\__system
directory that belongs to legacy Sitecore Search API.
12876 08:59:22 ERROR Attempted to load invalid xml. Exception: System.Xml.XmlException Message: Data at the root level is invalid. Line 1, position 1. Source: System.Xml at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at System.Xml.XmlDocument.LoadXml(String xml) at Sitecore.Xml.XmlUtil.LoadXml(String xml)
12876 08:59:22 ERROR First 200 characters: extranet\Anonymous 12876 08:59:22 ERROR Call stack: at Sitecore.MainUtil.GetCallStack() at Sitecore.Xml.XmlUtil.LoadXml(String xml) at Sitecore.Data.Locking.ItemLocking.GetLockField() at Sitecore.Data.Locking.ItemLocking.HasLock() at Sitecore.Search.Crawlers.DatabaseCrawler.AddSpecialFields(Document document, Item item) at Sitecore.Search.Crawlers.DatabaseCrawler.IndexVersion(Item item, Item latestVersion, IndexUpdateContext context) at Sitecore.Search.Crawlers.DatabaseCrawler.AddItem(Item item, IndexUpdateContext context) at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context) at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context) at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context) at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context) at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context) at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context) at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context) at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context) at Sitecore.Search.Index.Rebuild() at Sitecore.Azure.Startup.SearchIndexRebuilder.<>cDisplayClass5.b 4()
at System.Threading.Tasks.Task.Execute()
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.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()