3

Our webpage loads fine when configuring our discovery service to directly hit our content service using the host:port of the server it's installed on.

When we update the discovery to hit our content service via our load-balanced endpoint we get the following error:

Unable to get response from OData service
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.getEntity(DefaultODataClient.java:69)
    at com.sdl.web.content.client.ContentClient.lambda$getEntityFromDataStore$1(ContentClient.java:259)
    at com.sdl.web.content.client.ContentClient$RetryBlock.execute(ContentClient.java:471)
    at com.sdl.web.content.client.ContentClient.getEntityFromDataStore(ContentClient.java:261)
    at com.sdl.web.content.client.ContentClient.getEntity(ContentClient.java:188)
    at com.sdl.web.api.linking.ComponentLinkImpl.getLink(ComponentLinkImpl.java:87)
    at com.sdl.web.api.linking.ComponentLinkImpl.getLink(ComponentLinkImpl.java:71)
    at com.tridion.linking.ComponentLink.getLink(ComponentLink.java:34)
    at com.sdl.web.content.tags.ComponentLinkHandler.getLink(ComponentLinkHandler.java:107)
    at com.sdl.web.content.tags.LinkBaseHandler.doStartTag(LinkBaseHandler.java:28)

Why are component links treated differently when going through our load balancer, and how can we fix this?

1 Answer 1

4

When hitting the Content service directly the response passes only through tomcat. When hitting it via the load-balancer it passes through Apache too.

In our Content service start.sh we already define:

-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true

That's why it works directly.

To fix it via the load balancer we also need to allow encoded slashes in Apache, which can be achieved by adding the following to the Apache httpd.conf file:

AllowEncodedSlashes On

Your Answer

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

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