TransWikia.com

Error occurred when communicating with CD Discovery Service

Tridion Asked on September 30, 2021

I am getting the below mentioned error when Publishing the "Publish Setting" in a load balanced environment
enter image description here

Related Error might be the cause as well

enter image description here

DXA 2.2 With SDL Tridion 9.1 is the Setup for this implementation

Notes Update section
I am able to access the discovery service from both the CM Servers involved in the setup.

Error from the Event Viewer is mentioned below

An error occurred while communicating with CD Discovery Service ‘https://prod-discoverysvc.ccccc.com/discovery.svc’. One or more errors occurred.
The underlying connection was closed: An unexpected error occurred on a send.
The underlying connection was closed: An unexpected error occurred on a send.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
An error occurred while processing this request.
{"error":{"code":"","message":"One or more errors occurred.rnThe underlying connection was closed:

Queries: What is the exact cause and how to resolve the attached error

Note: I thought this link as the probable solution but it didn’t work https://gateway.sdl.com/communityknowledge?articleName=GUI-Error-Seen-During-Mapping

Traces:
An error occurred while rendering Page ‘default’ (tcm:162-91506-64)
An error occurred while communicating with CD Discovery Service ‘https://prod-discoverysvc.cccc.com/discovery.svc’. One or more errors occurred.
The underlying connection was closed: An unexpected error occurred on a send.
The underlying connection was closed: An unexpected error occurred on a send.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
An error occurred while processing this request.
{"error":{"code":"","message":"One or more errors occurred.rnThe underlying connection was closed: An unexpected error occurred on a send.rnThe underlying connection was closed: An unexpected error occurred on a send.rnUnable to read data from the transport connection: An existing connection was forcibly closed by the remote host.rnAn existing connection was forcibly closed by the remote host","lang":"en-US","exceptionDetails":{"typeName":"AggregateException","stackTrace":" at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)rn at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)rn at System.Collections.Concurrent.ConcurrentDictionary2.AddOrUpdate(TKey key, Func2 addValueFactory, Func3 updateValueFactory)rn at Tridion.TopologyManager.Connectors.ClientHelper.GetToken(CdEnvironmentData cdEnvironment, String resource)rn at System.Threading.Tasks.Task1.InnerInvoke()rn at System.Threading.Tasks.Task.Execute()rn--- End of stack trace from previous location where exception was thrown ---rn at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()rn at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)rn at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)rn at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult()rn at Tridion.TopologyManager.Connectors.CdDiscoveryServiceClient.d__6.MoveNext()rn— End of stack trace from previous location where exception was thrown —rn at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()rn at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)rn at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)rn at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult()rn at Tridion.TopologyManager.CdEnvironment.<GetCdOAuthToken>d__18.MoveNext()rn--- End of stack trace from previous location where exception was thrown ---rn at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()rn at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)rn at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)rn at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult()rn at Tridion.TopologyManager.Service.Controllers.CdEnvironmentsController.d__4.MoveNext()rn— End of stack trace from previous location where exception was thrown —rn at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()rn at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)rn at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)rn at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()rn at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__11.MoveNext()rn— End of stack trace from previous location where exception was thrown —rn at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()rn at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)rn at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)rn at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()rn at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()rn--- End of stack trace from previous location where exception was thrown ---rn at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()rn at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)rn at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)rn at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()rn at System.Web.Http.Controllers.ActionFilterResult.d__5.MoveNext()rn— End of stack trace from previous location where exception was thrown —rn at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()rn at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)rn at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)rn at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()rn at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()rn--- End of stack trace from previous location where exception was thrown ---rn at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()rn at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)rn at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)rn at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()rn at System.Web.Http.Controllers.ExceptionFilterResult.d__6.MoveNext()"}}}

Component: Templating
Errorcode: 0
User: NT AUTHORITYSYSTEM

StackTrace Information Details:
at Microsoft.OData.Client.QueryResult.ExecuteQuery()
at Microsoft.OData.Client.DataServiceRequest.Execute[TElement](DataServiceContext context, QueryComponents queryComponents)
at Microsoft.OData.Client.DataServiceRequest.Execute[TElement](DataServiceContext context, QueryComponents queryComponents)
at Microsoft.OData.Client.DataServiceContext.InnerSynchExecute[TElement](Uri requestUri, String httpMethod, Nullable1 singleResult, OperationParameter[] operationParameters) at Microsoft.OData.Client.DataServiceActionQuerySingle1.GetValue()
at Tridion.ContentManager.CmTopologyManagerClient.GetCdOAuthToken(CdEnvironmentData cdEnvironment, String resource, Boolean forceRefresh)
at Tridion.ContentManager.CdDiscoveryServiceClient.<>c__DisplayClass2_0.<.ctor>b__0(Object sender, SendingRequest2EventArgs args)
at System.EventHandler1.Invoke(Object sender, TEventArgs e) at Microsoft.OData.Client.ODataRequestMessageWrapper.FireSendingRequest2(Descriptor descriptor) at Microsoft.OData.Client.DataServiceRequest.CreateExecuteResult(Object source, DataServiceContext context, AsyncCallback callback, Object state, String method) at Microsoft.OData.Client.DataServiceRequest.Execute[TElement](DataServiceContext context, QueryComponents queryComponents) at Microsoft.OData.Client.DataServiceQuery1.GetEnumerator()
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
at Microsoft.OData.Client.DataServiceQueryProvider.ReturnSingleton[TElement](Expression expression)
at Tridion.WebDelivery.Configuration.TridionWebDiscovery.GetEnvironment(String expandList)
at Tridion.WebDelivery.Configuration.TridionWebDiscovery.GetPreviewWebServiceCapability()
at Tridion.ContentManager.CdDiscoveryServiceClient.GetPreviewWebServiceUri(Boolean throwExceptionForNoCapability)
at Tridion.ContentManager.CdDiscoveryServiceClient.GetPreviewWebServiceUri(Boolean throwExceptionForNoCapability)
at Tridion.ContentManager.CommunicationManagement.TargetType.IsPreviewCapable(Publication publication)
at Sdl.Web.Tridion.Templates.Common.TemplateBase.get_IsXpmEnabled()
at Sdl.Web.Tridion.Templates.R2.Templates.GeneratePageModel.Transform(Engine engine, Package package)
at Sdl.Web.Tridion.Templates.R2.Templates.GeneratePageModel.Transform(Engine engine, Package package)
at Tridion.ContentManager.Templating.Assembly.AssemblyMediator.Transform(Engine engine, Template template, Package package)
at Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.RunTemplate(Engine engine, Package package, String templateUri, String className)
at Tridion.Templating.CSharpTemplate.CSharpSourceTemplate.Transform(Engine __engine, Package __package)
at Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.Transform(Engine engine, Template template, Package package)
at Tridion.ContentManager.Templating.Engine.ExecuteTemplate(Template template, Package package)
at Tridion.ContentManager.Templating.Engine.InvokeTemplate(Package package, TemplateInvocation templateInvocation, Template template)
at Tridion.ContentManager.Templating.Compound.CompoundTemplateMediator.Transform(Engine engine, Template templateToTransform, Package package)
at Tridion.ContentManager.Templating.Engine.ExecuteTemplate(Template template, Package package)
at Tridion.ContentManager.Templating.Engine.InvokeTemplate(Package package, TemplateInvocation templateInvocation, Template template)
at Tridion.ContentManager.Templating.Compound.CompoundTemplateMediator.Transform(Engine engine, Template templateToTransform, Package package)
at Tridion.ContentManager.Templating.Engine.ExecuteTemplate(Template template, Package package)

2 Answers

maybe first check DB configuration in CD Discovery Service, and test DB is accessible from CD with port number and user account. also verify the CD Discovery Service endpoint is accessible https://prod-discoverysvc.ccccc.com/discovery.svc. username/password is correct with topology setup. if not please provide test and maybe try other checks.

Answered by Lucas Liu on September 30, 2021

Looks like the issue is having communication issue from CMS to discovery service. Please register the keystore on CM for discovery service and enable keystore entry on cd_transport_conf.xml Example : Under sender type: DiscoveryService Keystore : <Ketstore Path=“jrepathlibsecuritycacerts” Secret=changeit”

Hope this helps .

Answered by Anand NS on September 30, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP