2

While trying to update the Discovery Service registrations I am receiving the following error

enter image description here

I have one website "Website1" and currently one web application "Website1_RootWebApp" which has the ContextURL "/".

I added an original mapping "/ww/en/" and I am trying to add a second mapping, for another publication, to "/ww/fr/". However now I get this error, and even if I remove the "/ww/fr/" mapping the update will not work (same error).

I've been looking for references to DefaultWeb and DefaultEnvironment, and I can find one reference in /discovery.svc/Environment

Can anyone give some guidance?

2
  • can you check if <discovery url>/discovery.svc/WebCapabilities returns some result ?
    – vinayknl
    Commented Jun 13, 2016 at 14:27
  • It does. None are called Default, but I guess it took the first one to be the deafult. What I don't know is what the fix is Commented Jun 13, 2016 at 14:29

2 Answers 2

2

The problem turned out to be that I had the following in the Roles section of my Discovery Service Storage configuration

<Role Name="WebCapability">
   <Property Name="property1" Value="value1"/>
   <Property Name="property2" Value="value2"/>
</Role>

I'm not 100% sure why this is a problem, but commenting it out fixes the issue. Hopefully others can comment on the why?

1

It looks like there is already a WebCapability in discovery DB probably with id other than 'DefaultWeb'. Please check if your discovery DB contains any existing WebCapability.

If there is a WebCapability other than 'DefaultWeb', you can remove it by using sync command

  • Comment out WebCapability role in cd_storage_conf.xml
  • Run java -jar .\discovery-registration.jar sync command which will attempt to bring discovery DB capabilities in sync with what we have in configuration file.
  • After removing this, you can add it again by un-commenting the Role and running update/sync again.

This problem occurs when there is a WebCapability created from other than discovery registration tool (may be from old topology manager). Registration tool update looks for capability with DefaultWeb before trying to create one but since the id is different it tries to create and fails.

5
  • Thanks Vinayknl. Those steps worked, however now I can't add Mappings (which I could before). When I execute I get error "The related used by item doesn't exist in database" Website1_RootWebApp". When I look in the database Web Capabilities has gone. Commented Jun 13, 2016 at 15:27
  • Topology manager may be referencing WebCapability using old id. Can you try creating the Website/WebApplications again from TTM ?
    – vinayknl
    Commented Jun 13, 2016 at 15:44
  • Easier said than done, when things are published to it :) Commented Jun 13, 2016 at 15:53
  • My results in Tologogy and Discovery Service seem to match. I don't get what has gone wrong here. When I look at Website1 and Website1_RootWebApp, I see them reference CdEnvironment1. When I try to add a new Mapping it fails with error "The related used by item doesn't exist in database: Website1_RootWebApp" Commented Jun 13, 2016 at 15:57
  • 1
    It will be good to check if web applications with the specified id present in Discovery. Also, you can try sync command of Topology Manager so that discovery and ttm are in sync - "Sync-TtmCdEnvironment -Id CdEnvironment1'. Hope this fixes the issue with not able to find WebApp.
    – vinayknl
    Commented Jun 14, 2016 at 8:09

Your Answer

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

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