I am trying to add an environment to the Topology Manager using the Add-TtmCdEnvironment command. It seems to connect to the Discovery Service, but an error is thrown. In the Discovery Service log I see a connection being accepted but no apparent errors. The command aborts with the following error:

Add-TtmCdEnvironment -Id PreviewEnvironment -EnvironmentPurpose Preview -DiscoveryEndpointUrl http:/
/myhostname/discovery.svc -AuthenticationType OAuth -ClientId cmuser -ClientSecret CMUserP@ssw0rd
Add-TtmCdEnvironment : Unable to save item of type 'CdEnvironmentData' with id 'PreviewEnvironment'.
One or more errors occurred.
An error occurred while communicating with CD Discovery Service 'http://myhostname/discovery.svc' in CD
Environment 'PreviewEnvironment'.
One or more errors occurred.
Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
At line:1 char:1
+ Add-TtmCdEnvironment -Id PreviewEnvironment -EnvironmentPurpose Preview -Discove ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Tridion.Topolog...ironmentCommand:AddCdEnvironmentCommand) [Add-TtmCdEnvi
   ronment], DataServiceException
    + FullyQualifiedErrorId : Tridion.TopologyManager.Automation.AddCdEnvironmentCommand
  • To check that, could you please provide cd_storage_conf.xml settings for you Discovery service. We need to check Discovery and Token capabilities URIs
    – user1745
    Dec 7 '15 at 9:36

Unless you've specifically changed the port from the default (which is supported), you need to include :8082 in the URL to the Discovery Service.

This could just be something you removed when posting this question, of course. It does seem to be getting back an unusual response, which would happen if it's actually trying to connect to your website instead of the Discovery Service :)

  • As Peter mentioned confirm that the port on the hostname is correct. Try using any rest client to connect to the discovery svc url. If that is fine try using '/' at the end of the discovery svc url 'myhostname/discovery.svc'
    – Likhan
    Dec 5 '15 at 18:56
  • The Discovery Service is running on port 80, and I see in the log the request being handled. And no errors appear in the log. Dec 5 '15 at 19:40
  • The error seems like is originating from the discovery svc. Enable debug logging in the svc and see what is happening. Also did you already try '/' suffixing the url.
    – Likhan
    Dec 6 '15 at 10:52
  • Can you take a look at the event log in the machine where your Topology Manager is running and see the associated event log, which should provide detailed callstack.
    – Likhan
    Dec 7 '15 at 9:21
  • Peter nailed it on the head with his remark about the usual response. The URL of the token service was still pointing to localhost on port 80 and on the content manager server from which I was executing the command, the CME is running on that address :D Dec 8 '15 at 21:17

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.