1

We are using DXA 2.0 CTP. After changing BaseURL for Website in Topology Manager we are getting this error

WARN - No matching Localization found for URL 'http://xxxxxxx.com/'. Sending HTTP 404 (Not Found) response. 2017-12-19 16:54:30,402 [9] ERROR - Failed to execute query Sdl.Web.Delivery.Service.ServiceQueryException: Failed to execute query ---> Microsoft.OData.Client.DataServiceQueryException: An error occurred while processing this request. ---> Microsoft.OData.Client.DataServiceClientException: {"error":{"code":"4000","message":"Not possible to marshall single entity stream JSON: "}} at Microsoft.OData.Client.QueryResult.ExecuteQuery() at Microsoft.OData.Client.DataServiceRequest.Execute[TElement](DataServiceContext context, QueryComponents queryComponents) --- End of inner exception stack trace --- 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.DataServiceContext.Execute[TElement](Uri requestUri) at Sdl.Web.Delivery.Service.ODataV4Service.<>c__DisplayClass19_11.b__1() at Sdl.Web.Delivery.Caching.CacheHandlers.DefaultMemCache.DefaultMemCacheHandler1.SetOrGetExisting(String key, String region, Func1 valueFactory, CacheItemPolicy cacheItemPolicy) at Sdl.Web.Delivery.Service.ODataV4Service.<>c__DisplayClass19_01.<Execute>b__0() --- End of inner exception stack trace --- at Sdl.Web.Delivery.Service.AbstractODataService.HandleHttpResponseCode(Exception e, Int32 statusCode) at Sdl.Web.Delivery.Service.ODataV4Service.<>c__DisplayClass19_01.b__0() at Sdl.Web.Delivery.Service.Utils.PerformRetry[T](Func1 block, Int32 retryCount) at Sdl.Web.Delivery.Service.Utils.Retry[T](Func1 block, Int32 retryCount, Boolean locking) at Sdl.Web.Delivery.Dynamic.DynamicMappingsRetrieverImpl.GetPublicationMapping(String url) at Tridion.ContentDelivery.DynamicContent.DynamicMappingsRetriever.GetPublicationMapping(String url) at Sdl.Web.Tridion.CdApiLocalizationResolver.ResolveLocalization(Uri url) in C:\Jenkins\workspace\DXAuto\stash\develop\net\build_webapp\Sdl.Web.Tridion\CdApiLocalizationResolver.cs:line 66 at Sdl.Web.Mvc.Configuration.WebRequestContext.get_Localization() in C:\Jenkins\workspace\DXAuto\stash\develop\net\build_webapp\Sdl.Web.Mvc\Configuration\WebRequestContext.cs:line 25 at Sdl.Web.Mvc.Statics.StaticContentModule.BeginRequest(Object sender, EventArgs e) in C:\Jenkins\workspace\DXAuto\stash\develop\net\build_webapp\Sdl.Web.Mvc\Statics\StaticContentModule.cs:line 51

After changing the BaseUrl I have run this cmd on CMS server

Sync-TtmCdEnvironment -Id CdEnvironment3

and also republished all content but it did not solve the issue.

EDITS

I have dropped Discovery database and created a new database and run these commands:

java -jar discovery-registration.jar update

Sync-TtmCdEnvironment -Id CdEnvironment3

But it did not work

When I switch back to old BaseURL it starts to work.

1

IMHO and based on my own experience, changing certain values of the topology and synchronizing with "Sync-TtmCdEnvironment" is not totally succesfull.

I usually find more convenient to regenerate the full discovery database with:

  • Ensure the topology configuration is ok
  • Empty the tables of the discovery service (truncate or similar). Or create a new Data Store DB.
  • Start the Discovery Service
  • Run the java -jar discovery-registration.jar update to update the registered microservices
  • Run the Sync-TtmCdEnvironment -Id Cd... to update the topology configuration to the database

  • Restart all the applications connected to that Discovery, as the mappings may be cached

This takes no more than 10 minutes, and usually is a better option, than to struggle with the matching localization error.

  • i followed your steps but it did not work i m still facing same issue but when i switch back to old BaseURL it start work. – Abdul Qadir Dec 20 '17 at 7:32
  • Is the same discovery database? or a new one. Have you changed the discovery database reference? Can you try a "Get-TtmWebsote" to see the values configured? – Raúl Escudero Dec 20 '17 at 8:23
  • The issue get resolved when i restart the content service .i think the PublicationMapping get cached on server. – Abdul Qadir Dec 20 '17 at 9:01
  • added this last step – Raúl Escudero Dec 20 '17 at 10:21
0

The issue get resolved when I restart the content service. I think the PublicationMapping gets cached on the server.

  • But after regenerating the discovery database... – Raúl Escudero Dec 20 '17 at 9:34
  • Raul it is not required to regenerate discovery database after changing the BaseURL just run Sync-TtmCdEnvironment -Id Cd... command on CMS server and restart content service that's it. – Abdul Qadir Dec 20 '17 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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