7

I'm trying to setup a web8 environment as per following doc and encountered following error while creating website through Add-TtmWebsite powershell cmdlet:

PS C:\Users\Administrator> Add-TtmWebsite -Id StagingWebsite -CdEnvironmentId CDServerFarm01 -BaseUrls "http://10.100.101.153:85/" 
Add-TtmWebsite : Unable to save item of type 'WebApplicationData' with id 'StagingWebsite_RootWebApp'.
One or more errors occurred.
An error occurred while communicating with CD Discovery Service 'http://localhost:8082/discovery.svc' in CD Environment
 'CDServerFarm01'.
An error occurred while processing this request.
Path 'http://localhost:8082/discovery.svc/WebApplications' is not allowed
At line:1 char:1
+ Add-TtmWebsite -Id StagingWebsite -CdEnvironmentId CDServerFarm01 -BaseUrls "htt ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Tridion.Topolog...dWebsiteCommand:AddWebsiteCommand) [Add-TtmWebsite], Da
   taServiceException
    + FullyQualifiedErrorId : Tridion.TopologyManager.Automation.AddWebsiteCommand

Not sure why its complaining "http://localhost:8082/discovery.svc/WebApplications" is not allowed? At the moment i see my discovery service is up and accessible. What could be the reason for this issue and how to mitigate it. Appreciate your inputs!

3
  • How did this got fixed, I am also getting the error while adding the website.. PS C:\SDL\web\discovery\config> Add-TtmWebsite -Id visitorsweb -CdEnvironmentId SampleCD -BaseUrls localhost:82 Add-TtmWebsite : Unable to save item of type 'WebApplicationData' with id 'visitorsweb_RootWebApp'. One or more errors occurred. An error occurred while communicating with CD Discovery Service 'localhost:8082/discovery.svc' in CD Environment 'SampleCD'. An error occurred while processing this request. Path 'localhost:8082/discovery.svc/WebCapabilities' is not allowed At line:1 char:1 +
    – Rafeeq
    May 4, 2016 at 9:57
  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question. - From Review
    – Hiren Kaku
    May 4, 2016 at 14:10
  • @Rafeeq, I converted your follow-up to a comment along with Hiren's note. Indeed this is better as a new question. May 5, 2016 at 15:32

3 Answers 3

9

The most likely reason is that you have specified the wrong credentials when creating the CD environment. It needs to be a user in the "cm" role.

Check the credentials by calling Get-TtmCdEnvironment and verify that you are using the "cmuser" client ID.

To correct the credentials, you can call Set-TtmCdEnvironment:

Set-TtmCdEnvironment -Id YourEnvironmentId -AuthenticationType OAuth -ClientId cmuser -ClientSecret YourSecretHere
4
  • Actually, the Add-TtmCdEnvironment command failed, so the CdEnvironment entity is not created and hence you can't use Set-TtmCdEnvironment yet, but you can just retry the Add-TtmCdEnvironment command with the additional parameters. Jan 19, 2016 at 18:51
  • Oh, wait... It's the Add-TtmWebsite command that failed. In that case, I don't think the problem lies in the credentials (otherwise the Add-TtmCdEnvironment command would have failed already). Jan 19, 2016 at 18:55
  • Thanks Peter, Rick for your inputs! Setting CdEnvironment with cmuser resolved the issue!!
    – ARRX
    Jan 20, 2016 at 12:44
  • @RickPannekoek I've seen it happen, when the credentials are valid but for a different user (registration or cduser). They can access the discovery service, but not the WebApplication path and such. Anyway, glad to hear it's fixed :) Jan 20, 2016 at 19:59
4

The problem here is probably that the WebCapability is not defined in you CD Environment's Discovery Service.

You probably didn't define any Capability yet; you first have to run the registration JAR in order to populate the Discovery Service's Capabilities from the cd_storage_conf.xml.

3

Fixed as below:

  • I ran command java -jar discovery-registration.jar read
  • I had only token service capabilities enabled,
  • I copied and updated All the roles from the installation configuration..
  • Run java -jar discovery-registration.jar Update

Then ran the command Add-TtmWebsite -Id visitorsweb -CdEnvironmentId SampleCD -BaseUrls http://localhost:82

Successfully created ..

Your Answer

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

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