azure-contrib / AzureDirectory

A Lucene Directory Provider for Azure Blob Storage
Microsoft Public License
77 stars 57 forks source link

The remote server returned an error: (404) Not Found. at blob.FetchAttributes(); #22

Open jbreuer opened 8 years ago

jbreuer commented 8 years ago

Hello,

The error message is the same as in #20, but now the error happens at another line.

blob.FetchAttributes();

Here is the stack trace:

The remote server returned an error: (404) Not Found.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.WebException: The remote server returned an error: (404) Not Found.

Source Error:

Line 250: { Line 251: var blob = _blobContainer.GetBlockBlobReference(_rootFolder + name); Line 252: blob.FetchAttributes(); Line 253: return new AzureIndexInput(this, blob); Line 254: }

Source File: d:\data\inetpub\new-heroes\Sources\Project.Web.Core\ExamineAzure\AzureDirectory.cs Line: 252

Stack Trace:

[WebException: The remote server returned an error: (404) Not Found.] System.Net.HttpWebRequest.GetResponse() +1740 Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync(RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) +1123

[StorageException: The remote server returned an error: (404) Not Found.] Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync(RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) +2644 Examine.Directory.AzureDirectory.AzureDirectory.OpenInput(String name) in d:\data\inetpub\new-heroes\Sources\Project.Web.Core\ExamineAzure\AzureDirectory.cs:252

[FileNotFoundException: segments_3] Lucene.Net.Index.FindSegmentsFile.Run(IndexCommit commit) +1494 Lucene.Net.Index.DirectoryReader.Open(Directory directory, IndexDeletionPolicy deletionPolicy, IndexCommit commit, Boolean readOnly, Int32 termInfosIndexDivisor) +87 UmbracoExamine.UmbracoExamineSearcher.OpenNewReader() +67 Examine.LuceneEngine.Providers.LuceneSearcher.ValidateSearcher(Boolean forceReopen) in X:\Projects\Examine\Examine\Projects\Examine\LuceneEngine\Providers\LuceneSearcher.cs:288

I hope it's just as easy to fix as the last time ;-).

I've also reported it here: https://our.umbraco.org/forum/extending-umbraco-and-using-the-api/78818-using-azuredirectory-with-examine#comment-252215

richorama commented 8 years ago

I'm wondering if this is the correct behaviour. The blob does not exist, therefore a FileNotFoundException is thrown.

jbreuer commented 8 years ago

It might have been an error with Examine. A new beta is out with the following fixes. Now trying it: https://github.com/Shazwazza/Examine/commit/92456aae5c2981c793c4a597333b1cecf05f6f74