November Happy Hour will be moved to Thursday December 5th.

Exception when starting website

Vote:
 

Hi,

When starting my local site I get the following exception: 

[WebException: The remote server returned an error: (503) Server Unavailable.]
   System.Net.HttpWebRequest.GetResponse() +1743
   EPiServer.Find.Connection.JsonRequest.GetResponseStream() +287
   EPiServer.Find.Api.Command.GetResponse(IJsonRequest request) +109

[ServiceException: The remote server returned an error: (503) Server Unavailable.
ProcessClusterEventTimeoutException[failed to process cluster event (put-mapping [NestedDummyObject$$nested]) within 30s]]
   EPiServer.Find.Api.Command.GetResponse(IJsonRequest request) +679
   EPiServer.Find.Api.PutMappingCommand.Execute() +258
   EPiServer.Find.ClientConventions.NestedConventions.AddNestedType(Type declaringType, String name) +516
   System.Collections.Generic.List`1.ForEach(Action`1 action) +13856095
   EPiServer.Find.Commerce.CatalogContentClientConventions.ApplyNestedConventions(NestedConventions nestedConventions) +298
   EPiServer.Find.Commerce.CatalogContentClientConventions.ApplyConventions(IClientConventions clientConventions) +81
   EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key) +56
   EPiServer.Framework.Initialization.Internal.ModuleNode.ConfigureContainer(ServiceConfigurationContext context) +150
   EPiServer.Framework.Initialization.InitializationEngine.ConfigureContainer(HostType hostType) +386
   EPiServer.Framework.Initialization.InitializationEngine.ExecuteTransition(Boolean continueTransitions) +115
   EPiServer.Framework.Initialization.InitializationModule.EngineExecute(HostType hostType, Action`1 engineAction) +293
   EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +230
   EPiServer.Global..ctor() +104
   Valtech.Company.Web.EPiServerApplication..ctor() +43
   ASP.global_asax..ctor() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\d7c1bc4c\fac016f3\App_global.asax.0.cs:0

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +138
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +105
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1499
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +191
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +27
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +82
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +300
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +343

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +539
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +125
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +731

I'm starting to think that Find is down at the moment. I have no way of knowing what the cause is and I can't try/catch this error so other developers can continue.

Hope someone can help me out!

/Mark

#174612
Jan 31, 2017 16:28
Vote:
 

Hi,

yes, this happens because the find index is unreachable. Commerce is updating the nested query setup, and that setup is stored as part of the index. If the index happens to be down at the moment the application starts you get this exception. We are aware that this is not ideal and we will try to come up with a way to handle this.

Can you get the application to run after this initial exception, or does it get stuck in this state? If you can get it running, I think nested queries will still work as expected since the conventions were probably written to to the index before and have not changed since.

#174613
Jan 31, 2017 19:45
Vote:
 

If you are setting up new site, check following settings in your web.config<episerver.find serviceUrl="XXX" defaultIndex="XXX" />
Another possibility is that Index has been expired.

#174614
Jan 31, 2017 22:02
Vote:
 

Hi Magnus,

We where not able to run after this exception. It's thrown somewhere on initialization in Episerver and we can't catch it (I think). So we where stuck in this state for more than 2,5 hours.

I've also contacted support as this is (not ideal ;) as you put it. We've had intermittent hick-ups but they've lasted mere minutes.

So I'm hoping Episerver can do something so we can at least run the website and log the error. 


@K Khan: I created a new index but this directs to the same server so I got the same error. 

#174644
Feb 01, 2017 13:24
Vote:
 

Which version of EPiServer.Find.Commerce are you on?

#174650
Feb 01, 2017 13:42
Vote:
 

I have suspects on this line "ProcessClusterEventTimeoutException[failed to process cluster event (put-mapping [NestedDummyObject$$nested]) within 30s]]

So it seems to me as a server problem. Perhaps you can somehow switch to another server to test if it works?

#174651
Feb 01, 2017 13:53
Vote:
 

Hi Quan,

When creating a new index we're always assigned to the same one. But when deploying the code to another envirnonment that runs on another Find index (payed version) it works. So it does seem to be a server issue indeed. 
I've asked the Find team to provide help in at least catching this error so we can continue or indeed provide another server as 2,5 hours * 4 developers is a long time to be down :(

Thanks for your input!

/Mark

#174655
Feb 01, 2017 15:07
Vote:
 

Hi Magnus,

The Find version is 9.6.2.

I have been able to circumvent the problem by a hack, adding an interceptor, see  Gist.

Problem was/is that these exceptions were thrown before we were able to catch exceptions, at initialization.

Now the exceptions can be catched, because the interceptor handles the exceptions thrown at initialization.

I think it should not be necessary though, to do something like this. When Find is down, the initializable modules should not throw errors we can't handle, becuase on a production environment it would not be very pretty ;)

#174960
Feb 08, 2017 15:47
Vote:
 

Find.Commerce 9.7.2 contains a bug fix - COM-2912 which will catch the exception and display a nice(r) error message in case it can't not reach Find services for some reasons. So when you upgrade you won't need to add that interceptor anymore :) 

#174961
Feb 08, 2017 15:51
Vote:
 

Ah OK, cool. Thnx for the info :)

#174962
Feb 08, 2017 15:53
Vote:
 

Hi.

I've had this problem on and off for a half year now when using episerver find developer licenses.

I don't want to intercept it, because that doesn't solve the root cause, that the find server actually is unavailable. 

I'm constantly stuck at work when developing because episerver find is unavailable, and I just patiently have to wait for it to go up again until I can continue to work again.

I don't want to disable find or silently swallow the errors when this is happening because our project is heavily dependent on find to work.

Is there any work done in order to fix this? It's been down for me for an hour now, trying to generate new developer find indexes but those returns 401 unauthorized.

Thanks

/Martin

#208458
Oct 24, 2019 13:15
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.