0

We are using Tridion Sites 9.1 and DXA 2.2 We get the error "Unable to retrieve endpoint for Public Content API" when trying to query Content Service. There can be several reason for this. One we have seen is a network glitch or similar causing Discovery Service to stop working when Discovery Service for a short while can't communicate to the database. Discovery Service, Deployer Service, and Content Service "survive" this, and after a short, while they are back on track again.

However, the DXA Web Site seems to get stuck in a faulty state when this happens. I don't understand exactly what happens but it seams like it doesn't get a new token from Discovery Service and hence can't find Content Service. If we recycle the application pool everything works again.

Does anyone know about some sort of retry config on the DXA .Net Website, to force it to retry the connection to discovery service/token service after a while?

Saw there was a hotfix for DXA-sites using java that could be related? https://docs.rws.com/792149/853476/sdl-tridion-sites-9/hotfix-crq-17059

Any ideas?

Below is one of the exceptions we get.

Exception information:
Exception type: ApiClientException
Exception message: Unable to retrieve endpoint for Public Content Api
at Sdl.Web.Tridion.ApiClient.ApiClientFactory..ctor()
at Sdl.Web.Tridion.ApiClient.ApiClientFactory.<>c.<.cctor>b__18_0()
at System.Lazy`1.CreateValue()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Lazy`1.get_Value()
at Sdl.Web.Tridion.GraphQLLocalizationResolver.<>c_DisplayClass0_0.<ResolveLocalization>b_0()
at Sdl.Web.Tridion.Caching.CacheProvider.CreateCacheValue[T](UInt32 hash, String key, String region, Func`1 addFunction, IEnumerable`1 dependencies)
at Sdl.Web.Tridion.Caching.CacheProvider.GetOrAdd[T](String key, String region, Func`1 addFunction, IEnumerable`1 dependencies)
at Sdl.Web.Tridion.GraphQLLocalizationResolver.ResolveLocalization(Uri url)
at Sdl.Web.Mvc.Configuration.WebRequestContext.get_Localization()
at Sdl.Web.Mvc.Statics.StaticContentModule.BeginRequest(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Request information:
*Request URL: http://x.x.x.x:xxxx/healthcheck.html*
Request path: /healthcheck.html
User host address: y.y.y.y
User:
Is authenticated: False
Authentication Type:
Thread account name: xxx

Thread information:
Thread ID: 80
Thread account name: xxx
Is impersonating: False
Stack trace: at Sdl.Web.Tridion.ApiClient.ApiClientFactory..ctor()
at Sdl.Web.Tridion.ApiClient.ApiClientFactory.<>c.<.cctor>b__18_0()
at System.Lazy`1.CreateValue()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Lazy`1.get_Value()
at Sdl.Web.Tridion.GraphQLLocalizationResolver.<>c_DisplayClass0_0.<ResolveLocalization>b_0()
at Sdl.Web.Tridion.Caching.CacheProvider.CreateCacheValue[T](UInt32 hash, String key, String region, Func`1 addFunction, IEnumerable`1 dependencies)
at Sdl.Web.Tridion.Caching.CacheProvider.GetOrAdd[T](String key, String region, Func`1 addFunction, IEnumerable`1 dependencies)
at Sdl.Web.Tridion.GraphQLLocalizationResolver.ResolveLocalization(Uri url)
at Sdl.Web.Mvc.Configuration.WebRequestContext.get_Localization()
at Sdl.Web.Mvc.Statics.StaticContentModule.BeginRequest(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Custom event details:```

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.