Skip to main content
added the image where the exception happens
Source Link
Payam
  • 263
  • 1
  • 6

Line 199 in ModelServiceClient.cs is where the timeout exception happens.

enter image description here

Line 199 in ModelServiceClient.cs is where the timeout exception happens.

enter image description here

added 488 characters in body
Source Link
Payam
  • 263
  • 1
  • 6

I further investigated this issue and found out that the cause of error is ModelServiceClient.cs in PerformRequest method. For reasons that are unknown to me, the request times out on request.GetResponse(). The same request can be made on PostMan or browser and the JSON formatted data returns as expected.

enter image description here

  1. What isWhy the root cause of this exceptionrequest times out on request.GetResponse()? How can I resolve it(it is probably an infrastructure issue, what is that?)
  2. How can I customize the category keyword navigation to add customized fields and publishing them as JSON?
  1. What is the root cause of this exception? How can I resolve it?
  2. How can I customize the category keyword navigation to add customized fields and publishing them as JSON?

I further investigated this issue and found out that the cause of error is ModelServiceClient.cs in PerformRequest method. For reasons that are unknown to me, the request times out on request.GetResponse(). The same request can be made on PostMan or browser and the JSON formatted data returns as expected.

enter image description here

  1. Why the request times out on request.GetResponse()? (it is probably an infrastructure issue, what is that?)
  2. How can I customize the category keyword navigation to add customized fields and publishing them as JSON?
added more lines from the log that is DEBUG mode.
Source Link
Payam
  • 263
  • 1
  • 6
    2018-07-20 09:47:30,826 [9] DEBUG - No value cached for key 'GetNavigationModel:17' in region 'Navigation_Dynamic'.
2018-07-20 09:47:48,988 [9] ERROR - DXA Model Service returned an unexpected response for URL 'http://webcmsnd.[domainName].org:8998/':
DXA Model Service returned an unexpected response from request 'http://webcmsnd.[domainName].org:8998/api/navigation/17' of . 
2018-07-20 09:47:49,337 [9] ERROR - DXA Model Service returned an unexpected response.
Sdl.Web.Common.DxaException: DXA Model Service returned an unexpected response. ---> Sdl.Web.ModelService.ModelServiceException: DXA Model Service returned an unexpected response from request 'http://webcmsnd.[domainName].org:8998/api/navigation/17' of . ---> System.ArgumentNullException: Value cannot be null.
Parameter name: value
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Sdl.Web.ModelService.ModelServiceClient.PerformRequest[T](IModelServiceRequest request)
   --- End of inner exception stack trace ---
   at Sdl.Web.ModelService.ModelServiceClient.PerformRequest[T](IModelServiceRequest request)
   at Sdl.Web.Tridion.ModelService.DefaultModelServiceProvider.GetSitemapItem(Localization localization)
   --- End of inner exception stack trace ---
   at Sdl.Web.Tridion.ModelService.DefaultModelServiceProvider.GetSitemapItem(Localization localization)
   at Sdl.Web.Tridion.Navigation.ModelServiceImpl.DynamicNavigationProvider.<>c__DisplayClass2_0.<GetNavigationModel>b__0()
   at Sdl.Web.Tridion.Caching.CacheProvider.GetOrAdd[T](String key, String region, Func`1 addFunction, IEnumerable`1 dependencies)
   at Sdl.Web.Tridion.Navigation.ModelServiceImpl.DynamicNavigationProvider.GetNavigationModel(Localization localization)
   at Sdl.Web.Tridion.Navigation.ModelServiceImpl.DynamicNavigationProvider.GetBreadcrumbNavigationLinks(String requestUrlPath, Localization localization)
   at Sdl.Web.Tridion.Navigation.DynamicNavigationProvider.GetBreadcrumbNavigationLinks(String requestUrlPath, Localization localization)
   at Sdl.Web.Mvc.Controllers.NavigationController.Navigation(EntityModel entity, String navType, Int32 containerSize)
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
   at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.<BeginInvokeAction>b__1c()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
2018-07-20 09:53:35,466 [9] DEBUG - No value cached for key 'GetNavigationModel:17' in region 'Navigation_Dynamic'.
2018-07-20 09:53:52,372 [9] ERROR - DXA Model Service returned an unexpected response for URL 'http://webcmsnd.[domainName].org:8998/':
DXA Model Service returned an unexpected response from request 'http://webcmsnd.[domainName].org:8998/api/navigation/17' of . 
2018-07-20 09:47:49,337 [9] ERROR - DXA Model Service returned an unexpected response.
Sdl.Web.Common.DxaException: DXA Model Service returned an unexpected response. ---> Sdl.Web.ModelService.ModelServiceException: DXA Model Service returned an unexpected response from request 'http://webcmsnd.[domainName].org:8998/api/navigation/17' of . ---> System.ArgumentNullException: Value cannot be null.
Parameter name: value
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Sdl.Web.ModelService.ModelServiceClient.PerformRequest[T](IModelServiceRequest request)
   --- End of inner exception stack trace ---
   at Sdl.Web.ModelService.ModelServiceClient.PerformRequest[T](IModelServiceRequest request)
   at Sdl.Web.Tridion.ModelService.DefaultModelServiceProvider.GetSitemapItem(Localization localization)
   --- End of inner exception stack trace ---
   at Sdl.Web.Tridion.ModelService.DefaultModelServiceProvider.GetSitemapItem(Localization localization)
   at Sdl.Web.Tridion.Navigation.ModelServiceImpl.DynamicNavigationProvider.<>c__DisplayClass2_0.<GetNavigationModel>b__0()
   at Sdl.Web.Tridion.Caching.CacheProvider.GetOrAdd[T](String key, String region, Func`1 addFunction, IEnumerable`1 dependencies)
   at Sdl.Web.Tridion.Navigation.ModelServiceImpl.DynamicNavigationProvider.GetNavigationModel(Localization localization)
   at Sdl.Web.Tridion.Navigation.ModelServiceImpl.DynamicNavigationProvider.GetBreadcrumbNavigationLinks(String requestUrlPath, Localization localization)
   at Sdl.Web.Tridion.Navigation.DynamicNavigationProvider.GetBreadcrumbNavigationLinks(String requestUrlPath, Localization localization)
   at Sdl.Web.Mvc.Controllers.NavigationController.Navigation(EntityModel entity, String navType, Int32 containerSize)
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
   at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.<BeginInvokeAction>b__1c()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
    2018-07-20 09:47:30,826 [9] DEBUG - No value cached for key 'GetNavigationModel:17' in region 'Navigation_Dynamic'.
2018-07-20 09:47:48,988 [9] ERROR - DXA Model Service returned an unexpected response for URL 'http://webcmsnd.[domainName].org:8998/':
DXA Model Service returned an unexpected response from request 'http://webcmsnd.[domainName].org:8998/api/navigation/17' of . 
2018-07-20 09:47:49,337 [9] ERROR - DXA Model Service returned an unexpected response.
Sdl.Web.Common.DxaException: DXA Model Service returned an unexpected response. ---> Sdl.Web.ModelService.ModelServiceException: DXA Model Service returned an unexpected response from request 'http://webcmsnd.[domainName].org:8998/api/navigation/17' of . ---> System.ArgumentNullException: Value cannot be null.
Parameter name: value
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Sdl.Web.ModelService.ModelServiceClient.PerformRequest[T](IModelServiceRequest request)
   --- End of inner exception stack trace ---
   at Sdl.Web.ModelService.ModelServiceClient.PerformRequest[T](IModelServiceRequest request)
   at Sdl.Web.Tridion.ModelService.DefaultModelServiceProvider.GetSitemapItem(Localization localization)
   --- End of inner exception stack trace ---
   at Sdl.Web.Tridion.ModelService.DefaultModelServiceProvider.GetSitemapItem(Localization localization)
   at Sdl.Web.Tridion.Navigation.ModelServiceImpl.DynamicNavigationProvider.<>c__DisplayClass2_0.<GetNavigationModel>b__0()
   at Sdl.Web.Tridion.Caching.CacheProvider.GetOrAdd[T](String key, String region, Func`1 addFunction, IEnumerable`1 dependencies)
   at Sdl.Web.Tridion.Navigation.ModelServiceImpl.DynamicNavigationProvider.GetNavigationModel(Localization localization)
   at Sdl.Web.Tridion.Navigation.ModelServiceImpl.DynamicNavigationProvider.GetBreadcrumbNavigationLinks(String requestUrlPath, Localization localization)
   at Sdl.Web.Tridion.Navigation.DynamicNavigationProvider.GetBreadcrumbNavigationLinks(String requestUrlPath, Localization localization)
   at Sdl.Web.Mvc.Controllers.NavigationController.Navigation(EntityModel entity, String navType, Int32 containerSize)
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
   at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.<BeginInvokeAction>b__1c()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
2018-07-20 09:53:35,466 [9] DEBUG - No value cached for key 'GetNavigationModel:17' in region 'Navigation_Dynamic'.
2018-07-20 09:53:52,372 [9] ERROR - DXA Model Service returned an unexpected response for URL 'http://webcmsnd.[domainName].org:8998/':
DXA Model Service returned an unexpected response from request 'http://webcmsnd.[domainName].org:8998/api/navigation/17' of . 
edited tags
Link
Rick Pannekoek
  • 21.4k
  • 1
  • 18
  • 30
Loading
added 12 characters in body
Source Link
Velmurugan
  • 8.2k
  • 2
  • 15
  • 27
Loading
Source Link
Payam
  • 263
  • 1
  • 6
Loading