4

My Web 8 Content Deployer capability is not registered with the Discovery service (error from transport logs) and I'm trying to read the registered capabilities, but getting an error. I'm using this command:

java -jar discovery-registration.jar read

Error:

2016-04-15 01:11:26,445 INFO  Main - Registration tool is run with following parameters:
2016-04-15 01:11:26,461 INFO  Main - Configuration file:     cd_storage_conf.xml
2016-04-15 01:11:26,461 INFO  Main - The Command is:         read
2016-04-15 01:11:26,461 INFO  RegistrationTool - Reading configuration from file: 'cd_storage_conf.xml'
2016-04-15 01:11:26,601 INFO  ODataClientProvider - Creating OData client
2016-04-15 01:11:28,305 INFO  ODataClientProvider - Successfully created OData client
2016-04-15 01:11:28,320 INFO  ODataClientProvider - Creating token provider for OAuth enabled OData client
2016-04-15 01:11:28,508 INFO  DefaultDiscoveryClient - Capability: class com.sdl.web.discovery.datalayer.model.TokenServiceCapability not found.
2016-04-15 01:11:28,508 INFO  ODataClientProvider - Creating token provider using TokenServiceUrl from configuration file

Exception in thread "main" java.lang.RuntimeException: com.sdl.delivery.configuration.ConfigurationException: The TokenServiceUrl
is missing from ConfigurationRepository element
        at com.sdl.web.discovery.registration.ODataClientProvider.init(ODataClientProvider.java:61)
        at com.sdl.web.discovery.registration.ODataClientProvider.<init>(ODataClientProvider.java:51)
        at com.sdl.web.discovery.registration.RegistrationTool.<init>(RegistrationTool.java:46)
        at com.sdl.web.discovery.registration.Main.main(Main.java:35)
Caused by: com.sdl.delivery.configuration.ConfigurationException: The TokenServiceUrl is missing from ConfigurationRepository elem
ent
        at com.sdl.web.discovery.registration.ODataClientProvider.createTokenProvider(ODataClientProvider.java:99)
        at com.sdl.web.discovery.registration.ODataClientProvider.init(ODataClientProvider.java:58)
        ... 3 more

Discovery cd_storage conf:

  <ConfigRepository ServiceUri="http://localhost:8082/discovery.svc"
                      ConnectionTimeout="40000"
                      CacheEnabled="true"
                      CacheExpirationDuration="600"
                      ServiceMonitorPollDuration="10"
                      ClientId="registration"
                      ClientSecret="encrypted:HzfQh9wYwAKShDxCm4DnnBnysAz9PtbDMFXMbPszSVY=">
        <Roles>
            <Role Name="TokenServiceCapability" Url="http://localhost:8082/token.svc"/>

        </Roles>
    </ConfigRepository>
  • It looks like your token service capability is also not registered yet and you have Oauth enabled. So the tool firstly tries to get token from token service in order to read other capabilities, but can not get it... – Stanislav Maryenko Apr 15 '16 at 6:10
  • where we can find this file discovery-registration.jar – Velmurugan Apr 29 '16 at 19:18
4

Please check my Question (and answer) here

The trick is to add TokenServiceUrl (TokenServiceUrl="http://10.177.4.83:8082/token.svc") as it somehow gets deleted when you do a quickinstall:

<ConfigRepository ServiceUri="http://10.177.4.83:8082/discovery.svc"
                  ConnectionTimeout="40000"
                  CacheEnabled="true"
                  CacheExpirationDuration="600"
                  ServiceMonitorPollDuration="10"
                  ClientId="registration"
                  ClientSecret="encrypted:HzfQh9wYwAKShDxCm4DnnBnysAz9PtbDMFXMbPszSVY="
                  TokenServiceUrl="http://10.177.4.83:8082/token.svc">
    <Roles>

        <Role Name="TokenServiceCapability" Url="http://10.177.4.83:8082/token.svc"/>
    </Roles>
</ConfigRepository>

Then run the discovery registration again.

  • Looks like 8.5's quickinstall still has the same defect :( – Nuno Linhares Dec 22 '16 at 22:50
  • All of the shipped 8.5 cd_storage_conf.xml files include the TokenService Url properties. I've also confirmed that running quickinstall.ps1 does not remove it. – Bengineer Dec 23 '16 at 14:28

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.