2015-12-29 3 views
0

У нас есть sitecore 8.1, размещенный в Azure WEB-приложениях. Установка 1xCA и 2xCD и использование LUCENESitecore 8.1: Lucene.Net.Store.LockObtainFailedException

Мы заметили журнал ошибок, ниже которого я googled, но не смог получить решение.

ManagedPoolThread #12 2015:12:28 23:22:33 ERROR Exception 
Exception: System.Reflection.TargetInvocationException 
Message: Exception has been thrown by the target of an invocation. 
Source: mscorlib 
    at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 
    at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 
    at Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) 
    at Sitecore.Reflection.MethodInstance.Invoke() 
    at Sitecore.Jobs.JobRunner.RunMethod(JobArgs args) 
    at (Object , Object[]) 
    at Sitecore.Pipelines.PipelineMethod.Invoke(Object[] parameters) 
    at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) 
    at Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists) 
    at Sitecore.Jobs.Job.ThreadEntry(Object state) 

Nested Exception 

Exception: Lucene.Net.Store.LockObtainFailedException 
Message: Lock obtain timed out: [email protected]:\home\site\wwwroot\App_Data\data\indexes\sitecore_web_index\write.lock: System.IO.IOException: The process cannot access the file 'D:\home\site\wwwroot\App_Data\data\indexes\sitecore_web_index\write.lock' because it is being used by another process. 
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access) 
    at Lucene.Net.Store.NativeFSLock.Obtain() 
Source: Lucene.Net 
    at Lucene.Net.Store.Lock.Obtain(Int64 lockWaitTimeout) 
    at Sitecore.ContentSearch.LuceneProvider.DiagnosticLockFactory.DiagnosticLock.Obtain(Int64 lockWaitTimeout) 
    at Lucene.Net.Index.IndexWriter.Init(Directory d, Analyzer a, Boolean create, IndexDeletionPolicy deletionPolicy, Int32 maxFieldLength, IndexingChain indexingChain, IndexCommit commit) 
    at Lucene.Net.Index.IndexWriter..ctor(Directory d, Analyzer a, Boolean create, MaxFieldLength mfl) 
    at Sitecore.ContentSearch.LuceneProvider.Sharding.LuceneShard.CreateWriter(Directory directory, LuceneIndexMode mode) 
    at Sitecore.ContentSearch.LuceneProvider.Sharding.LuceneShard.CreateWriter(IProviderUpdateContext context, LuceneIndexMode mode) 
    at Sitecore.ContentSearch.LuceneProvider.LuceneIndex.CreateWriter(IProviderUpdateContext context, Shard shard, LuceneIndexMode mode) 
    at Sitecore.ContentSearch.LuceneProvider.LuceneUpdateContext.InitializeWriter(UpdateContextShardState shardState, LuceneIndexMode mode) 
    at Sitecore.ContentSearch.LuceneProvider.LuceneUpdateContext.InitializeWriters() 
    at Sitecore.ContentSearch.LuceneProvider.LuceneUpdateContext.EnsureInitializeWriters() 
    at Sitecore.ContentSearch.LuceneProvider.LuceneUpdateContext.UpdateDocument(Object itemToUpdate, Object criteriaForUpdate, IExecutionContext[] executionContexts) 
    at Sitecore.ContentSearch.LuceneProvider.LuceneUpdateContext.UpdateDocument(Object itemToUpdate, Object criteriaForUpdate, IExecutionContext executionContext) 
    at Sitecore.ContentSearch.LuceneProvider.LuceneIndexOperations.Update(IIndexable indexable, IProviderUpdateContext context, ProviderIndexConfiguration indexConfiguration) 
    at Sitecore.ContentSearch.SitecoreItemCrawler.UpdateItemVersion(IProviderUpdateContext context, Item version, IndexEntryOperationContext operationContext) 
    at Sitecore.ContentSearch.SitecoreItemCrawler.DoUpdate(IProviderUpdateContext context, SitecoreIndexableItem indexable, IndexEntryOperationContext operationContext) 
    at Sitecore.ContentSearch.SitecoreItemCrawler.Update(IProviderUpdateContext context, IIndexableUniqueId indexableUniqueId, IndexEntryOperationContext operationContext, IndexingOptions indexingOptions) 
    at Sitecore.ContentSearch.AbstractSearchIndex.PerformUpdate(IEnumerable`1 indexableInfo, IndexingOptions indexingOptions) 
    at Sitecore.ContentSearch.AbstractSearchIndex.Update(IEnumerable`1 indexableInfo) 

Nested Exception 

Exception: System.IO.IOException 
Message: The process cannot access the file 'D:\home\site\wwwroot\App_Data\data\indexes\sitecore_web_index\write.lock' because it is being used by another process. 
Source: mscorlib 
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access) 
    at Lucene.Net.Store.NativeFSLock.Obtain() 

Web Apps делает немного сложнее для отладки, поскольку мы не имеем доступа к IIS или журналов событий и т.д. Любые предложения будут оценены.

ответ

0

Что вы должны сделать, это перейти в это место и просто удалить файл write.lock. Если он используется другим процессом, то используйте что-то вроде fileunlocker, разблокируйте файл и затем удалите. Он делает это довольно много с git и lucene.

+0

Я сделал это, но вернулся снова. –

0

В Azure Web Apps у вас есть доступ к этим журналам и многим другим инструментам устранения неполадок. Перейдите к // <yourwebsitename> .scm.azurewebsites.net и изучите ваши варианты в инструменте Kudu. Особенно проверьте Инструменты | Опция меню поддержки. Сначала вам нужно включить ведение журнала в своем веб-приложении.