3

We're currently installing the SDL Web 8.5 content delivery microservices on a windows server. We installed a number of microservices using the quickinstall tool, and all services appear to be running as windows services.

However, when we try to run the discovery registration tool, we get an error

"Unable to get response from OData service: No Response."

Unfortunately, there are no errors in any of the log files, so i'm not sure where to begin to find a solution for this problem. Does anyone have any pointers to what may be wrong ?

This is the command and stack trace that we get :

D:\SDL\staging\discovery\config> java -jar .\discovery-registration.jar read


2017-08-08 14:02:56,271 INFO  Main - Registration tool is run with following parameters:
2017-08-08 14:02:56,275 INFO  Main - Configuration file:         cd_storage_conf.xml
2017-08-08 14:02:56,277 INFO  Main - The Command is:             read
2017-08-08 14:02:56,279 INFO  RegistrationTool - Reading configuration from file: 'cd_storage_conf.xml'
2017-08-08 14:02:56,505 INFO  ODataClientProvider - Creating OData client
2017-08-08 14:03:01,122 INFO  ODataClientProvider - Successfully created OData client
2017-08-08 14:03:01,123 INFO  ODataClientProvider - Creating token provider for OAuth enabled OData client
2017-08-08 14:03:01,124 INFO  ODataClientProvider - Using TokenServiceUrl http://localhost:8082/token.svc from configuration file.
2017-08-08 14:03:01,261 INFO  ODataClientProvider - Created token provider using TokenServiceUrl from configuration file.
2017-08-08 14:03:01,262 INFO  ODataClientProvider - Successfully created token provider for OAuth enabled OData client
2017-08-08 14:03:01,263 INFO  ReadCommand - Reading all existing Capabilities from discovery-service...
Exception in thread "main" 
com.sdl.odata.client.api.exception.ODataClientHttpError: Unable to get response from OData service: No Response.
    at com.sdl.odata.client.util.ODataClientUtils.buildException(ODataClientUtils.java:93)
    at com.sdl.odata.client.caller.BasicEndpointCaller.getResponse(BasicEndpointCaller.java:199)
    at com.sdl.odata.client.caller.BasicEndpointCaller.callEndpoint(BasicEndpointCaller.java:82)
    at com.sdl.odata.client.DefaultODataClient.getODataResponse(DefaultODataClient.java:141)
    at com.sdl.odata.client.DefaultODataClient.getEntities(DefaultODataClient.java:109)
    at com.sdl.web.discovery.registration.SecuredODataClient.getEntities(SecuredODataClient.java:52)
    at com.sdl.web.discovery.registration.command.AbstractCommand.getCapabilitiesFromService(AbstractCommand.java:34)
    at com.sdl.web.discovery.registration.command.ReadCommand.lambda$performCommand$0(ReadCommand.java:29)
    at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
    at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
    at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
    at java.util.stream.ReferencePipeline.collect(Unknown Source)
    at com.sdl.web.discovery.registration.command.ReadCommand.performCommand(ReadCommand.java:31)
    at com.sdl.web.discovery.registration.RegistrationTool.performCommand(RegistrationTool.java:62)
    at com.sdl.web.discovery.registration.Main.main(Main.java:36)
  • 2
    Have you verified that the Discovery Service URL in cd_storage_conf.xml is correct and that the service is responding at said URL? – Peter Kjaer Aug 8 '17 at 14:46
  • The service is running, and when I connect to the url that's specified in cd_storage_conf.xml (localhost:8082/disovery.svc) via a browser, i get "{"error":"invalid_grant"}", so it does seem to be running – Harald Hoffelinck Aug 8 '17 at 14:51
  • hmm, it looks like something is wrong with my discovery service. I disabled the oauth security in cd_ambient_conf, and now I get a 'whitelabel error page from Spring Boot'. in the logs, I now can see this warning: WARN PageNotFound - No mapping found for HTTP request with URI [/disovery.svc] in DispatcherServlet with name 'dispatcherServlet' – Harald Hoffelinck Aug 8 '17 at 15:01
  • ok, the error appears to be very stupid. Looks like there was a typo in /disovery.svc that we missed, it should be /discovery – Harald Hoffelinck Aug 8 '17 at 15:41
  • 1
    I don't think the error is that stupid, if the URL was incorrect then it would indeed be unable to get response from OData service. Maybe good to answer your question yourself and accept that answer so it is closed/solved properly. – Bart Koopman Aug 9 '17 at 11:05
1

Please double-check that the Discovery Service URL in cd_storage_conf.xml is correct and that the service is responding at that URL.

You can do a quick check of this in your browser (to see if the service is listening) -- but if the service is secured with OAuth, you are probably better off doing that in a tool like Postman where you can specify the credentials in the headers.

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.