4

Following the instructions here to setup SDL Web 8.5 on a single server but when I run the Add-TtmCdEnvironment command I get the following:

Add-TtmCdEnvironment : Unable to save item of type 'CdEnvironmentData' with id 'SampleCD
One or more errors occurred.
An error occurred while communicating with CD Discovery Service 'http://localhost:8082/d
Environment 'SampleCD'.
One or more errors occurred.
The TokenServiceCapability is not configured in the Content Discovery Service http://loc
At line:1 char:1
+ Add-TtmCdEnvironment -Id SampleCD -EnvironmentPurpose "Staging" -Disc ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Tridion.Topolog...ironmentCommand:AddCdEnvi
   ronment], DataServiceException
    + FullyQualifiedErrorId : Tridion.TopologyManager.Automation.AddCdEnvironmentCommand

I found another answer but as a quick test I enabled DEBUG log level to see if anything appeared in the logs.

In my cd_odata log I see this:

2017-03-02 15:39:18,736 INFO  AkkaConfiguration - Creating actor system
2017-03-02 15:39:25,378 DEBUG ODataEdmRegistryImpl - registerClasses: classes=[class com.sdl.web.discovery.datalayer.model.ConfigurationItem, class com.sdl.web.discovery.datalayer.model.ConfigurationValue, class com.sdl.web.discovery.datalayer.model.Environment, class com.sdl.web.discovery.datalayer.model.PreviewWebServiceCapability, class com.sdl.web.discovery.datalayer.model.ContentServiceCapability, class com.sdl.web.discovery.datalayer.model.DestinationURL, class com.sdl.web.discovery.datalayer.model.DeployerCapability, class com.sdl.web.discovery.datalayer.model.WebCapability, class com.sdl.web.discovery.datalayer.model.AudienceManagerCapability, class com.sdl.web.discovery.datalayer.model.AudienceManagerSynchronizationCapability, class com.sdl.web.discovery.datalayer.model.SmartTargetManagementCapability, class com.sdl.web.discovery.datalayer.model.SmartTargetQueryCapability, class com.sdl.web.discovery.datalayer.model.ContextServiceCapability, class com.sdl.web.discovery.datalayer.model.ContextualImageDeliveryCapability, class com.sdl.web.discovery.datalayer.model.UGCCommunityServiceCapability, class com.sdl.web.discovery.datalayer.model.UGCModerationServiceCapability, class com.sdl.web.discovery.datalayer.model.WebApplication, class com.sdl.web.discovery.datalayer.model.PublicationMapping, class com.sdl.web.discovery.datalayer.model.BaseURL, class com.sdl.web.discovery.datalayer.model.KeyValuePair, class com.sdl.web.discovery.datalayer.model.AudienceManagerSynchronizationTarget, class com.sdl.web.discovery.datalayer.model.AudienceManagerTarget, class com.sdl.web.discovery.datalayer.model.UGCCommunityServiceTarget, class com.sdl.web.discovery.datalayer.model.UGCModerationServiceTarget, class com.sdl.web.discovery.datalayer.model.functions.GetExtensionPropertyForHostFunction, class com.sdl.web.discovery.datalayer.model.functions.GetBuildVersionFunction, class com.sdl.web.discovery.datalayer.model.functions.GetBuildVersionFunctionImport, class com.sdl.web.discovery.datalayer.model.actions.SetExtensionProperty, class com.sdl.web.discovery.datalayer.model.actions.ResetServiceAction, class com.sdl.web.discovery.datalayer.model.actions.ResetServiceActionImport, class com.sdl.web.discovery.datalayer.model.TokenServiceCapability, class com.sdl.web.discovery.datalayer.model.ContentKeyValuePair, class com.sdl.web.discovery.datalayer.model.DeployerKeyValuePair, class com.sdl.web.discovery.datalayer.model.PreviewWebKeyValuePair, class com.sdl.web.discovery.datalayer.model.WebKeyValuePair]
2017-03-02 15:39:27,155 INFO  ODataServiceConfiguration - Initializing OData service routing
2017-03-02 15:40:06,437 DEBUG ODataServiceImpl - Handling request: GET http://localhost:8082/discovery.svc/TokenServiceCapabilities?$top=1
2017-03-02 15:40:06,484 INFO  ODataEdmRegistryImpl - Building EntityDataModel
2017-03-02 15:40:06,530 DEBUG AnnotationEntitySetFactory - Creating EntitySet named: ConfigurationItems for entity type: Tridion.WebDelivery.Configuration.ConfigurationItem
2017-03-02 15:40:06,530 DEBUG AnnotationEntitySetFactory - Creating EntitySet named: ConfigurationValues for entity type: Tridion.WebDelivery.Configuration.ConfigurationValue
2017-03-02 15:40:06,530 DEBUG AnnotationSingletonFactory - Creating Singleton named: Environment for entity type: Tridion.WebDelivery.Platform.Environment
2017-03-02 15:40:06,546 DEBUG AnnotationEntitySetFactory - Creating EntitySet named: PreviewWebServiceCapabilities for entity type: Tridion.WebDelivery.Platform.PreviewWebServiceCapability
2017-03-02 15:40:06,546 DEBUG AnnotationEntitySetFactory - Creating EntitySet named: ContentServiceCapabilities for entity type: Tridion.WebDelivery.Platform.ContentServiceCapability
2017-03-02 15:40:06,546 DEBUG AnnotationEntitySetFactory - Creating EntitySet named: DeployerCapabilities for entity type: Tridion.WebDelivery.Platform.DeployerCapability
2017-03-02 15:40:06,546 DEBUG AnnotationEntitySetFactory - Creating EntitySet named: WebCapabilities for entity type: Tridion.WebDelivery.Platform.WebCapability
2017-03-02 15:40:06,562 DEBUG AnnotationEntitySetFactory - Creating EntitySet named: AudienceManagerCapabilities for entity type: Tridion.WebDelivery.Platform.AudienceManagerCapability
2017-03-02 15:40:06,562 DEBUG AnnotationEntitySetFactory - Creating EntitySet named: AudienceManagerSynchronizationCapabilities for entity type: Tridion.WebDelivery.Platform.AudienceManagerSynchronizationCapability
2017-03-02 15:40:06,562 DEBUG AnnotationEntitySetFactory - Creating EntitySet named: SmartTargetManagementCapabilities for entity type: Tridion.WebDelivery.Platform.SmartTargetManagementCapability
2017-03-02 15:40:06,562 DEBUG AnnotationEntitySetFactory - Creating EntitySet named: SmartTargetQueryCapabilities for entity type: Tridion.WebDelivery.Platform.SmartTargetQueryCapability
2017-03-02 15:40:06,562 DEBUG AnnotationEntitySetFactory - Creating EntitySet named: ContextServiceCapabilities for entity type: Tridion.WebDelivery.Platform.ContextServiceCapability
2017-03-02 15:40:06,562 DEBUG AnnotationEntitySetFactory - Creating EntitySet named: ContextualImageDeliveryCapabilities for entity type: Tridion.WebDelivery.Platform.ContextualImageDeliveryCapability
2017-03-02 15:40:06,562 DEBUG AnnotationEntitySetFactory - Creating EntitySet named: UGCCommunityServiceCapabilities for entity type: Tridion.WebDelivery.Platform.UGCCommunityServiceCapability
2017-03-02 15:40:06,562 DEBUG AnnotationEntitySetFactory - Creating EntitySet named: UGCModerationServiceCapabilities for entity type: Tridion.WebDelivery.Platform.UGCModerationServiceCapability
2017-03-02 15:40:06,562 DEBUG AnnotationEntitySetFactory - Creating EntitySet named: WebApplications for entity type: Tridion.WebDelivery.Platform.WebApplication
2017-03-02 15:40:06,562 DEBUG AnnotationEntitySetFactory - Creating EntitySet named: PublicationMappings for entity type: Tridion.WebDelivery.Platform.PublicationMapping
2017-03-02 15:40:06,562 DEBUG AnnotationEntitySetFactory - Creating EntitySet named: AudienceManagerSynchronizationTargets for entity type: Tridion.WebDelivery.Platform.AudienceManagerSynchronizationTarget
2017-03-02 15:40:06,577 DEBUG AnnotationEntitySetFactory - Creating EntitySet named: AudienceManagerTargets for entity type: Tridion.WebDelivery.Platform.AudienceManagerTarget
2017-03-02 15:40:06,577 DEBUG AnnotationEntitySetFactory - Creating EntitySet named: UGCCommunityServiceTargets for entity type: Tridion.WebDelivery.Platform.UGCCommunityServiceTarget
2017-03-02 15:40:06,577 DEBUG AnnotationEntitySetFactory - Creating EntitySet named: UGCModerationServiceTargets for entity type: Tridion.WebDelivery.Platform.UGCModerationServiceTarget
2017-03-02 15:40:06,577 DEBUG AnnotationEntitySetFactory - Creating EntitySet named: TokenServiceCapabilities for entity type: Tridion.WebDelivery.Platform.TokenServiceCapability
2017-03-02 15:40:06,655 DEBUG ODataParserImpl - Parsing URI: http://localhost:8082/discovery.svc/TokenServiceCapabilities?$top=1
2017-03-02 15:40:06,812 DEBUG ODataParserImpl - Parse result: ODataUri(http://localhost:8082/discovery.svc,ResourcePathUri(EntitySetPath(TokenServiceCapabilities,None),List(TopOption(1))))
2017-03-02 15:40:07,280 DEBUG AbstractRenderer - Target type is Tridion.WebDelivery.Platform.TokenServiceCapability and is it collection true
2017-03-02 15:40:07,296 DEBUG AtomRenderer - Renderer score is 31
2017-03-02 15:40:07,296 DEBUG AbstractRenderer - Target type is Tridion.WebDelivery.Platform.TokenServiceCapability and is it collection true
2017-03-02 15:40:07,296 DEBUG AbstractJsonRenderer - Renderer score is 100
2017-03-02 15:40:07,296 DEBUG JsonRenderer - Renderer score is 100
2017-03-02 15:40:07,296 DEBUG JsonServiceDocumentRenderer - Score of JSON service document renderer is 0
2017-03-02 15:40:07,296 DEBUG AbstractRenderer - Target type is Tridion.WebDelivery.Platform.TokenServiceCapability and is it collection true
2017-03-02 15:40:07,296 DEBUG PrimitiveRenderer - Renderer score is 0
2017-03-02 15:40:07,296 DEBUG XMLServiceDocumentRenderer - Score of XML service document renderer is 0
2017-03-02 15:40:07,296 DEBUG AbstractRenderer - Target type is Tridion.WebDelivery.Platform.TokenServiceCapability and is it collection true
2017-03-02 15:40:07,312 DEBUG JsonRenderer - Start rendering entity(es) for request: GET http://localhost:8082/discovery.svc/TokenServiceCapabilities?$top=1
2017-03-02 15:40:07,327 DEBUG JsonRenderer - End rendering entity(es) for request: GET http://localhost:8082/discovery.svc/TokenServiceCapabilities?$top=1
2017-03-02 15:40:07,343 DEBUG ODataServiceImpl - Request completed in 906

Which suggests to me my Token Service is running OK?

I stuck http://localhost:8082/discovery.svc/TokenServiceCapabilities?$top=1 in a browser and got:

    <?xml version="1.0" encoding="UTF-8"?><feed xmlns:metadata="http://docs.oasis-open.org/odata/ns/metadata" xmlns:data="http://docs.oasis-open.org/odata/ns/data" xmlns="http://www.w3.org/2005/Atom" metadata:context="http://localhost:8082/discovery.svc/$metadata#TokenServiceCapabilities" xml:base="http://localhost:8082/discovery.svc">
<id>http://localhost:8082/discovery.svc/TokenServiceCapabilities</id>
<title></title>
<updated>2017-03-02T15:47:36.883Z</updated>
<link rel="self" title="TokenServiceCapabilities" href="TokenServiceCapabilities"></link>
</feed>

Yet I still cant add my CD environment in Topology Manager.

Can anyone advise?

3

Appears you need to register the TokenServiceCapability capability in the Discovery service. This answer helped.

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.