top of page
  • Hina Garg

Error: Secure communication with the Commerce Engine is not possible - Sitecore XC 9.3

Hello Everyone,


In this blog post, I am going to highlight an important point that should be kept in mind while trying to connect Sitecore XP with Sitecore XC. The value of "EncryptionProtectionType" in cofig.json at wwwroot\wwwroot for all commerce roles should be equal to the value of "<clientsecrethash>" at Sitecore.Commerce.Engine.Connect.config and <ClientSecret1> at identity\wwwroot\Config\production\Sitecore.Commerce.IdentityServer.Host.xml otherwise you might get following error while trying to build indexes for master or web db's in Sitecore XP.


Error:


22356 15:08:48 ERROR Error connecting to https://identity.xyz/.well-known/openid-configuration: An error occurred while sending the request.
15228 15:08:48 ERROR The Sitecore Identity Server URL is invalid or missing from your configuration, secure communication with the Commerce Engine is not possible.
15228 15:08:48 ERROR Exception Status Code: 401; Unauthorized                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     on GetValue:https://dcac-sitecore-rg-378580-minions.azurewebsites.net/commerceops/RunMinion
15228 15:08:48 ERROR An error occurred while processing this request.
Exception: Microsoft.OData.Client.DataServiceQueryException
Message: An error occurred while processing this request.
Source: Microsoft.OData.Client
   at Microsoft.OData.Client.DataServiceRequest.Execute[TElement](DataServiceContext context, QueryComponents queryComponents)
   at Microsoft.OData.Client.DataServiceContext.InnerSynchExecute[TElement](Uri requestUri, String httpMethod, Nullable`1 singleResult, OperationParameter[] operationParameters)
   at Microsoft.OData.Client.DataServiceActionQuerySingle`1.GetValue()
   at Sitecore.Commerce.ServiceProxy.Proxy.GetValue[T](DataServiceActionQuerySingle`1 query)
   at Sitecore.Commerce.Engine.Connect.Search.Strategies.CommerceEngineIntervalAsynchronousStrategy.IndexItems()
   at Sitecore.Commerce.Engine.Connect.Search.Strategies.CommerceIntervalAsynchronousStrategy.Run()
   at Sitecore.ContentSearch.Maintenance.OperationMonitor.ExecuteActions(ConcurrentQueue`1 actions, String groupName)

Solution:


"EncryptionProtectionType" at config.json for all commerce roles = <clientsecrethash> at \App_Config\Include\Y.Commerce.Engine\Sitecore.Commerce.Engine.Connect.config = <ClientSecret1> at identity\wwwroot\Config\production\Sitecore.Commerce.IdentityServer.Host.xml

89 views0 comments
bottom of page