1

Scenario: The architecture of the web application consists of three app servers in a load balanced mode. The application is build using DXA 2.2 -SDL Tridion 9.1 . The most of the micro services including the discovery service is load balanced. The web.config in all three app servers pointing to the load balanced discovery service URL

The code based is deployed across app servers and in sync and the pages/PT/Component/CT/Schema/Category and keywords were deployed as per the dependencies .

There are some intermittent issue with discovery service capabilities in CMS and as a result this issue Error occurred when communicating with CD Discovery Service.

When browsing the Default.html page the following error Popped up

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() +1903
Sdl.Tridion.Api.Http.Client.HttpClient.Execute(IHttpClientRequest clientRequest) +87

[HttpClientException: Failed to get http response from 'https://prod-contentsvc.ccccc.com/cd/api' with request: HttpRequest: Path= Method=POST ContentType=application/json]
Sdl.Tridion.Api.Http.Client.HttpClient.Execute(IHttpClientRequest clientRequest) +1068
Sdl.Tridion.Api.GraphQL.Client.GraphQLClient.Execute(IGraphQLRequest graphQLrequest) +154

[GraphQLClientException: Failed to get http response from 'https://prod-contentsvc.ccccc.com/cd/api' with request: HttpRequest: Path= Method=POST ContentType=application/json ]
Sdl.Tridion.Api.GraphQL.Client.GraphQLClient.Execute(IGraphQLRequest graphQLrequest) +3420
Sdl.Tridion.Api.Client.ApiClient.GetPublicationMapping(ContentNamespace ns, String url) +66
Sdl.Web.Tridion.Caching.CacheProvider.CreateCacheValue(UInt32 hash, String key, String region, Func1 addFunction, IEnumerable1 dependencies) in C:\Rancher\workspace\stash\develop\net\build_webapp\Sdl.Web.Tridion\Providers\Caching\CacheProvider.cs:133 Sdl.Web.Tridion.Caching.CacheProvider.GetOrAdd(String key, String region, Func1 addFunction, IEnumerable1 dependencies) in C:\Rancher\workspace\stash\develop\net\build_webapp\Sdl.Web.Tridion\Providers\Caching\CacheProvider.cs:86 Sdl.Web.Tridion.GraphQLLocalizationResolver.ResolveLocalization(Uri url) in C:\Rancher\workspace\stash\develop\net\build_webapp\Sdl.Web.Tridion\Resolvers\Localization\GraphQLLocalizationResolver.cs:34 Sdl.Web.Mvc.Configuration.WebRequestContext.get_Localization() in C:\Rancher\workspace\stash\develop\net\build_webapp\Sdl.Web.Mvc\Configuration\WebRequestContext.cs:28 Sdl.Web.Mvc.Statics.StaticContentModule.BeginRequest(Object sender, EventArgs e) in C:\Rancher\workspace\stash\develop\net\build_webapp\Sdl.Web.Mvc\Statics\StaticContentModule.cs:85 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +152 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +231 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +94

Note: Pages were published and able to find in the database

Ask What is the solution to this issue?

  • Looks like your Content Service isn't working. Have you begun to debug it separately, say using Postman for example? – Neil Jul 7 at 13:25
  • Did you register the Content Service with its Load Balancer URL too? – Rick Pannekoek Jul 7 at 17:46
  • Try to validate to ensure your request correctly goes to a web app servers, and then try to validate from each web app server try to access the load-balanced discovery endpoint and content service endpoint to ensure necessary the firewall ports are open. – Velmurugan Jul 7 at 18:18
  • 1
    A question, I can see content service getting called https, Is that microservices are configured end to end https setup as expected? or Is it a rever proxy HTTPs to HTTP re-direction setup for microservices? – Velmurugan Jul 7 at 18:23
  • It seems a load balancer issue, Our infra team is working on this. It is HTTPS to HTTP re-direction for now – sachin jain Jul 8 at 6:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.