Skip to content

Instantly share code, notes, and snippets.

@stevetemple
Created August 16, 2018 13:15
Show Gist options
  • Save stevetemple/68146c66d0dfa73974a4517d80fe20dd to your computer and use it in GitHub Desktop.
Save stevetemple/68146c66d0dfa73974a4517d80fe20dd to your computer and use it in GitHub Desktop.
YSOD AzureExamine
Server Error in '/' Application.
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:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[WebException: The remote server returned an error: (404) Not Found.]
System.Net.HttpWebRequest.GetResponse() +42042265
Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync(RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:677
[StorageException: The remote server returned an error: (404) Not Found.]
Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync(RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:604
Examine.AzureDirectory.AzureDirectory.OpenInput(String name) in C:\projects\examine\src\Examine.AzureDirectory\AzureDirectory.cs:300
[FileNotFoundException: segments_11]
Lucene.Net.Index.FindSegmentsFile.Run(IndexCommit commit) +1635
Lucene.Net.Index.SegmentInfos.Read(Directory directory) +81
Lucene.Net.Index.IndexWriter.Init(Directory d, Analyzer a, Boolean create, Boolean closeDir, IndexDeletionPolicy deletionPolicy, Boolean autoCommit, Int32 maxFieldLength, IndexingChain indexingChain, IndexCommit commit) +476
Lucene.Net.Index.IndexWriter..ctor(Directory d, Analyzer a, Boolean create, MaxFieldLength mfl) +644
Examine.LuceneEngine.Providers.LuceneIndexer.WriterFactory(Directory d) in C:\projects\examine-qvx04\src\Examine\LuceneEngine\Providers\LuceneIndexer.cs:1882
System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) +80
Examine.LuceneEngine.Providers.LuceneIndexer.EnsureIndex(Boolean forceOverwrite) in C:\projects\examine-qvx04\src\Examine\LuceneEngine\Providers\LuceneIndexer.cs:674
Examine.LuceneEngine.Providers.LuceneIndexer.RebuildIndex() in C:\projects\examine-qvx04\src\Examine\LuceneEngine\Providers\LuceneIndexer.cs:765
UmbracoExamine.BaseUmbracoIndexer.RebuildIndex() +69
Umbraco.Web.ExamineStartup.Complete() +194
Umbraco.Web.WebBootManager.Complete(Action`1 afterComplete) +162
Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e) +361
[HttpException (0x80004005): segments_11]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +526
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +185
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +420
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +369
[HttpException (0x80004005): segments_11]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +534
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +113
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +718
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2623.0
@Shazwazza
Copy link

@stevetemple I've made some updates and updated the docs here too https://github.com/Shazwazza/Examine/wiki/Examine-with-Azure-Directory-(Blob-Storage)

Not sure if this will affect the issue you are seeing above since i think that might have something to do with Umbraco itself.

Both Examine and Examine.AzureDirectory have been updated and there's now also a required ReadOnlyAzureDirectoryFactory to be applied to your front-end servers.

I've also updated this milestone: https://github.com/Shazwazza/Examine/milestone/19?closed=1

@jacerqueiro
Copy link

stevetemple did you manage to get it working ?

I'm having a very similar problem only on the replica server ReadOnlyAzureDirectoryFactory when the App is starting.

An unhandled exception occurred System.IO.FileNotFoundException: segments_a7 ---> Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (404) Not Found. ---> System.Net.WebException: The remote server returned an error: (404) Not Found.

Although the segment segments_a7 mentioned in the error message doesn't exist in the blob storage container the master server doesn't have any problem.

I'm testing with:

  • Umbraco 7.15.6
  • Examine 0.1.90
  • Examine.AzureDirectory 0.1.90

Thanks in advance for any info or help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment