4

I installed SDL Web 8, and DXA 1.4 Java version in it. I set up DXA by following documentation, and finally it's able to publish a page. But publishing failed at Transporting phase.

Transporter output following error log.

2016-06-07 12:21:31,591 ERROR TransportService - Unable to establish transport to destination.
com.tridion.transport.TransportException: Unable to retrieve destination metadata
    at com.tridion.transport.DestinationController.<init>(DestinationController.java:116) ~[cd_transport.jar:8.1.1-1008]
    at com.tridion.transport.DestinationControllerFactory.getDestinationController(DestinationControllerFactory.java:41) ~[cd_transport.jar:8.1.1-1008]
    at com.tridion.transport.model.transaction.context.TransactionProcessor.createOrLoadTransaction(TransactionProcessor.java:134) ~[cd_transport.jar:8.1.1-1008]
    at com.tridion.transport.model.transaction.context.TransactionProcessor.<init>(TransactionProcessor.java:48) ~[cd_transport.jar:8.1.1-1008]
    at com.tridion.transport.TransportService.handleTransaction(TransportService.java:252) ~[cd_transport.jar:8.1.1-1008]
Caused by: com.sdl.web.client.ClientException: Unable to obtain OAuth token from discovery service. Probably Discovery service is not up and running.
    at com.sdl.web.client.impl.DefaultOAuthClient.obtainTokenResult(DefaultOAuthClient.java:129) ~[discovery-client-lightweight.jar:8.1.1-1009]
    at com.sdl.web.client.impl.DefaultOAuthClient.doFetchOAuthToken(DefaultOAuthClient.java:100) ~[discovery-client-lightweight.jar:8.1.1-1009]
    at com.sdl.web.client.impl.DefaultOAuthClient.getToken(DefaultOAuthClient.java:79) ~[discovery-client-lightweight.jar:8.1.1-1009]
    at com.sdl.web.client.impl.OAuthTokenProvider.getToken(OAuthTokenProvider.java:70) ~[discovery-client-lightweight.jar:8.1.1-1009]
    at com.tridion.transport.connection.connectors.DiscoveryServiceTransportConnector.setHeaders(DiscoveryServiceTransportConnector.java:209) ~[cd_transport.jar:8.1.1-1008]
    at com.tridion.transport.connection.connectors.BaseHTTPSTransportConnector.retrieveFileIfPresent(BaseHTTPSTransportConnector.java:214) ~[cd_transport.jar:8.1.1-1008]
    at com.tridion.transport.connection.connectors.DiscoveryServiceTransportConnector.retrieveFileIfPresent(DiscoveryServiceTransportConnector.java:125) ~[cd_transport.jar:8.1.1-1008]
    at com.tridion.transport.connection.connectors.TransportPoolConnector.retrieveFileIfPresent(TransportPoolConnector.java:80) ~[cd_transport.jar:8.1.1-1008]
    at com.tridion.transport.workers.EndpointMetaWorker.getMetadata(EndpointMetaWorker.java:54) ~[cd_transport.jar:8.1.1-1008]
    at com.tridion.transport.workers.EndpointMetaWorker.getMetadata(EndpointMetaWorker.java:36) ~[cd_transport.jar:8.1.1-1008]
    at com.tridion.transport.DestinationController.<init>(DestinationController.java:108) ~[cd_transport.jar:8.1.1-1008]
    ... 4 common frames omitted

It seems to be transporter failed to connect to Discovery Service. I checked CD Environment by PowerShell.

PS C:\Users\Administrator> Get-TtmCdEnvironment


EnvironmentPurpose   : Staging
DiscoveryEndpointUrl : http://10.0.x.xx:8082/discovery.svc
Credentials          : "AuthenticationType":"OAuth", "ClientId":"registration", "ClientSecret":"********"
IsOffline            : False
ScopedRepositoryKeys : {DxaSiteType, DxaExampleSite}
Id                   : CdEnvironment2
ExtensionProperties  : {}

And I request Discovery Endpoint URL 'http://10.0.x.xx:8082/discovery.svc' on browser, following string appears. I think this means the Discovery Service is running.

{"error":"invalid_grant"}

And cd_storage_conf.xml's ConfigRepository of the Discovery Service is following. I added 'TokenServiceUrl' attribute according to this post: Error with Discovery service and discovery_registration.jar Also 'ClientId' and 'ClientSecret' are same as CD Environment.

    <ConfigRepository ServiceUri="http://10.0.1.98:8082/discovery.svc"
                      ConnectionTimeout="40000"
                      CacheEnabled="true"
                      CacheExpirationDuration="600"
                      ServiceMonitorPollDuration="10"
                      ClientId="registration"
                      ClientSecret="password"
TokenServiceUrl="http://10.0.1.98:8082/token.svc"
>
        <Roles>
            <Role Name="TokenServiceCapability" Url="http://10.0.1.98:8082/token.svc"/>
            <Role Name="DeployerCapability" Url="http://10.0.1.98:8084/httpupload">
                <Property Name="undo.enabled" Value="false"/>
                <Property Name="encoding" Value="UTF-8"/>
            </Role>
        </Roles>
    </ConfigRepository>

Why does publishing fail?

Is something missing in configuration?

Regards,

4

Which ClientId and ClientSecret are you using in your OAuth credentials. The user registration has no permissions to publish content to the Content Deployer. If you are using the default users and their roles you need to use this user cmuser where the default password is CMUserP@ssw0rd. Please make sure you update these passwords.

You can find the default users and their passwords in the cd_ambient_conf.xml from your discovery service (config folder)

  • There were two different promblems. One is that I didn't install hotfix CD_8.1.1.1957, so Discovery Service wasn't installed properly. Another one is TtmCdEnvironmet's ClientId have to be 'cmuser' as mentioned. – Hirokazu Shikata Jun 10 '16 at 11:15

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.