0

I have installed sitecore commerce and now in storefront, When i am trying to navigate to the product list page, i get the following exception

Message: An error occured while trying to contact the Commerce Service. Error code BadGateway An error occured while trying to contact the Commerce Service. Error code BadRequest Source: Sitecore.Commerce.Engine.Connect+

Any ideas?

2
  • What version of XC, you are using? And check defaultEnvironment Sitecore.Commerce.Engine.Connect.config Aug 24, 2020 at 14:39
  • It maybe due to the incorrect DB connection string setting. Can you please put up a copy of the log? Aug 25, 2020 at 4:23

1 Answer 1

2

In all the sitecore 9 and above versions, this error happens when the sitecore instance is not able to find out the correct instance of commerce engine.

The storefront will get the configuration from ShopsService URL and communicate with the corresponding commerce engines.

Here are 2 steps you must check when this happens

  1. Go to showconfig.aspx and find the ShopsService and commerceOpsServiceUrl should point to https://localhost:5000. There might have been some override config files which is overwriting these values which you can find in showconfig url.
  2. Check to see if commerce engine metadata specified in shopsServiceUrl is accessable. For example shopsServiceUrl https://localhost:5000/CommerceOps/$metadata#Commands/$entity will need to be validated)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.