Minions not working on the production environment

Hi Folks,

Hope everyone is doing well. Our Sitecore Commerce (XC) version was 9.0.2 and we had set up our production on scaled environment, in which we had a separate VM for minions. As we know the Minions role is an instance of the Commerce Engine that runs independently and supports asynchronous processing or we can say Minions are the workers performing background tasks. OOTB XC provides minions like Indexing minion, order minion, purgecarts minions.

Ok, so now the issue we faced in our production is that our Order indexing were not working as well as we created some custom minions, so no one was working. Then this was issue for us and urgent as it is production. So, we decided to check minion logs so, we didn’t see any error there, also we didn’t find logs for orders index like – Incremental Index List OrdersIndex (just taking the example of orders index only), so now it was more complicated for us, how we can see what’s going on, so we decided to Run IncrementalIndex Minion – Orders in postman, so when we hit it from postman we saw an error in minion logs related

ERROR SolrContextCommand.DoesIndexExist.Error: Message=The remote name could not be resolved: 'solr-xdb.xyz.com'|Trace=   at SolrNet.Impl.SolrConnection.Get(String relativeUrl, IEnumerable`1 parameters)
   at SolrNet.Impl.SolrCoreAdmin.Status(String coreName)
   at Sitecore.Commerce.Plugin.Search.Solr.SolrContextCommand.<DoesIndexExist>d__5.MoveNext()
SolrNet.Exceptions.SolrConnectionException: The remote name could not be resolved: 'solr-xdb.xyz.com' ---> System.Net.WebException: The remote name could not be resolved: 'solr-xdb.xyz.com'
   at System.Net.HttpWebRequest.GetResponse()
   at HttpWebAdapters.Adapters.HttpWebRequestAdapter.GetResponse()
   at SolrNet.Impl.SolrConnection.GetResponse(IHttpWebRequest request)
   at SolrNet.Impl.SolrConnection.Get(String relativeUrl, IEnumerable`1 parameters)
   --- End of inner exception stack trace ---
   at SolrNet.Impl.SolrConnection.Get(String relativeUrl, IEnumerable`1 parameters)
   at SolrNet.Impl.SolrCoreAdmin.Status(String coreName)
   at Sitecore.Commerce.Plugin.Search.Solr.SolrContextCommand.<DoesIndexExist>d__5.MoveNext()

Then we ran this solr url in browser and it was not working, so we decided to check solr host url entry in Host file (C:\Windows\System32\drivers\etc) and it was missing. After adding this solr is working on this environment and we hit Run IncrementalIndex Minion – Orders again from the postman this time it worked fine, we could see OrdersScope index in solr dashboard with the updated number.

But the issue remained the same, minions were not running automatically, and now there was no error in logs as well. Then we checked our json files again under wwwroot (C:\inetpub\wwwroot\CommerceAuthoring_Sc9\wwwroot) and after checking all the json we found the culprit, that was in config.json, EnvironmentName was set wrong there, it was set to xyzAuthoring, so we changed it to xyzMinions. After doing this change we recycled app pool for minions wesbite in IIS and monitored it for some time, after this we could see logs for IncrementalIndexMinion like below –

INFO IncrementalIndexMinion-Incremental Index List OrdersIndex: Count:1

Don’t forget to recycle app pool or IISReset to the minions website.

And, that’s it, thisโ€™s how I figured out minions issue in my case.

Happy Coding ๐Ÿ™‚

Commerce Catalogs are not showing for selection in Sitecore

Hi Folks,

Hope all are doing good in this time. OK, so directly wanted to come on topic. We have upgraded our Sitecore XP and XC to Sitecore 9.3, everything looks good, Sitecore was loading perfectly, we could add items, delete items etc. Then we noticed one thing. When we wanted to see if catalogs were coming for selection then we noticed it was showing blank like below image –

So, this is issue now. So first, I checked if Bizfix was working or not. So, I opened Sitecore and on Sitecore launchpad clicked on Business Tool button below –

So, bizfix were loading for me, that means there is no issue on this side. After this I went to Bizfix website under inetpub (C:\inetpub\wwwroot\SitecoreBizFx\assets) and checked config.json there, if urls were correct there. In my case these were not correct. So, I corrected those but issue was same for me.

{
  "EnvironmentName": "HabitatAuthoring",
  "EngineUri": "https://authapiurl:5000",
  "IdentityServerUri": "https://identityserverurl:5050",
  "BizFxUri": "https://bizfixurl:4200",
  "Language": "en",
  "Currency": "USD",
  "ShopName": "CommerceEngineDefaultStorefront",
  "LanguageCookieName": "selectedLanguage",
  "EnvironmentCookieName": "selectedEnvironment",
  "AutoCompleteTimeout_ms": 300
}

Then issue is definitely from Sitecore side, so, I decided to check shops, identity server urls. I opened /sitecore/showconfig.aspx and searched for shopsServiceUrl and sitecoreIdentityServerUrl, so these were the culprit, these were wrong. So I set it to right Urls and after this reloaded my Sitecore and saw the Catalogs item and now I could see the catalogs listing there.

That’s all, that’s how I figured out catalogs listing issue in my case.

Happy coding ๐Ÿ™‚