I installed Content Delivery services by following quickinstall.sh command. Enviroment is Linux and Java.

./quickinstall.sh --all -s /home/user/Content\ Delivery/roles --license /home/user/cd_licenses.xml

Then modifed Discovery Service's cd_storage_conf.xml, added 'TokenServiceUrl' attribute according to this post. Error with Discovery service and discovery_registration.jar

Also I modified storage setting to my DB setting.

<ConfigRepository ServiceUri="http://10.0.x.xx:8082/discovery.svc"
        <Role Name="TokenServiceCapability" Url="http://10.0.x.x:8082/token.svc"/>

But error occured when doing following command. I put 'discovery-registration.jar' in Discovery Service's config directory

java -jar discovery-registration.jar update

[root@ip-10-0-1-98 config]# java -jar discovery-registration.jar update
2016-06-08 05:20:18,412 INFO  Main - Registration tool is run with following parameters:
2016-06-08 05:20:18,415 INFO  Main - Configuration file:         cd_storage_conf.xml
2016-06-08 05:20:18,416 INFO  Main - The Command is:             update
2016-06-08 05:20:18,417 INFO  RegistrationTool - Reading configuration from file: 'cd_storage_conf.xml'
2016-06-08 05:20:18,494 INFO  ODataClientProvider - Creating OData client
2016-06-08 05:20:19,388 INFO  ODataClientProvider - Successfully created OData client
2016-06-08 05:20:19,388 INFO  ODataClientProvider - Creating token provider for OAuth enabled OData client
2016-06-08 05:20:19,774 INFO  DefaultDiscoveryClient - Capability: class com.sdl.web.discovery.datalayer.model.TokenServiceCapability not found.
2016-06-08 05:20:19,776 INFO  ODataClientProvider - Creating token provider using TokenServiceUrl from configuration file
2016-06-08 05:20:19,869 INFO  ODataClientProvider - Successfully created token provider for OAuth enabled OData client
2016-06-08 05:20:19,869 INFO  UpdateCommand - Updating Capabilities in the discovery-service...
Exception in thread "main" 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)
        at com.sdl.web.client.impl.DefaultOAuthClient.doFetchOAuthToken(DefaultOAuthClient.java:100)
        at com.sdl.web.client.impl.DefaultOAuthClient.getToken(DefaultOAuthClient.java:79)
        at com.sdl.web.client.impl.OAuthTokenProvider.getToken(OAuthTokenProvider.java:70)
        at com.sdl.web.discovery.registration.ODataClientProvider.provideClient(ODataClientProvider.java:129)
        at com.sdl.web.discovery.registration.command.AbstractCommand.getCapabilitiesFromService(AbstractCommand.java:33)
        at com.sdl.web.discovery.registration.command.AbstractCommand.lambda$getExistingCapabilities$2(AbstractCommand.java:65)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
        at com.sdl.web.discovery.registration.command.AbstractCommand.getExistingCapabilities(AbstractCommand.java:67)
        at com.sdl.web.discovery.registration.command.UpdateCommand.performCommand(UpdateCommand.java:46)
        at com.sdl.web.discovery.registration.RegistrationTool.performCommand(RegistrationTool.java:62)
        at com.sdl.web.discovery.registration.Main.main(Main.java:36)
Caused by: com.sdl.odata.client.api.exception.ODataClientException: Unable to process response from OData service.
        at com.sdl.odata.client.caller.BasicEndpointCaller.getResponse(BasicEndpointCaller.java:224)
        at com.sdl.odata.client.caller.BasicEndpointCaller.sendRequest(BasicEndpointCaller.java:145)
        at com.sdl.odata.client.caller.BasicEndpointCaller.doPostEntity(BasicEndpointCaller.java:105)
        at com.sdl.web.client.impl.DefaultOAuthClient.obtainTokenResult(DefaultOAuthClient.java:115)
        ... 17 more
Caused by: java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
        at java.net.SocketInputStream.read(SocketInputStream.java:170)
        at java.net.SocketInputStream.read(SocketInputStream.java:141)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
        at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
        at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:704)
        at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1536)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
        at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
        at com.sdl.odata.client.caller.BasicEndpointCaller.getResponse(BasicEndpointCaller.java:204)
        ... 20 more

'discovery.svc' and 'token.svc' url returns following each result. I think this means Discovery Service is runnning normally.




SDL Web OAuth 2.0 Token Servlet.

Why does 'discovery-registration.jar' command fail?

Is there any required configuration?


  • I'm not sure if it matters, but did you restart the discovery service after changing the configuration? – Peter Kjaer Jun 8 '16 at 13:00
  • Yes, I did. Also, if CliendId written in cd_storage_conf.xml is wrong, this command returns {"error":"Access Denied: Incorrect credentials."} quickly, so the service seems working. Only when CliendId and ClientSecret are correct, this error occurs after 30 seconds. – Hirokazu Shikata Jun 8 '16 at 13:23
  • which version of CD are you using ? And is this issue in unix platform ? – vinayknl Jun 8 '16 at 13:45
  • I'm using SDL Web 8.1.1, OS is Linux and Java is 1.8.0_91. – Hirokazu Shikata Jun 8 '16 at 13:56
  • 1
    The problem was fixed by applying hotfix CD_8.1.1.1957! But I coudn't find it on Tridion World Web site at this time. I got it from SDL FTP site. – Hirokazu Shikata Jun 10 '16 at 9:29

I was having a similar issue in a Windows environment with SDL Web 8.1.1. What got me past the error was removing these two attributes from the ConfigRepository element in the cd_storage_conf.xml I used to run the discovery update:

ClientId="registration" ClientSecret="encrypted:xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxX"

Since I am not using OAuth, I guess having those attributes in the conf tricked the update into thinking it needed to retrieve an OAuth token, which caused issues since OAuth is not enabled.

| improve this answer | |

There was an issue due to SecureRandom in unix platforms which caused timeouts when generating OAuth token. This was fixed as a hotfix and available in latest 8.1.1 hotfix release. Applying hotfix should fix this issue.

| improve this answer | |
  • which patch did you applied, can you tell me the name_version? – Raj Kumar Jul 13 '16 at 7:42
  • 1
    Hirokazu Shikata mentioned in his comment that after using CD_8.1.1.1957 it is fixed. – vinayknl Jul 13 '16 at 8:07

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.