For a deeper look into our DataScope Select REST API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted

SocketException while processing response from Refinitiv

Last week we have received a lot of socket exceptions. The issue is instead of sending success (200 return code) or failure response (202 or other return code), Refinitiv throwed SocketException.

Can you please let us know the reason for the socket exception instead of proper response?

The socket is not closed from our end.

Stacktrace is given below. We use Java for our programming.

---------------------------------------------------------------------------------------------------------------------------------------: org.springframework.web.client.ResourceAccessException: I/O error on POST request for "https://hosted.datascopeapi.reuters.com/RestApi/v1/Authentication/RequestToken":Unexpected end of file from server; nested exception is java.net.SocketException: Unexpected end of file from server
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:580) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:530) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:330) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at com.eurex.bia.refinitiv.service.impl.RefinitivServiceImpl.fetchInstrumentPrice(RefinitivServiceImpl.java:101) [classes:]
at com.eurex.bia.refinitiv.listener.RefinitivAdhocListener.processAdhocPriceRequest(RefinitivAdhocListener.java:72) [classes:]
at com.eurex.bia.refinitiv.listener.RefinitivAdhocListener$$FastClassBySpringCGLIB$$53f7677f.invoke(<generated>) [spring-core-4.1.6.RELEASE.jar:]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) [spring-core-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:717) [spring-aop-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) [spring-tx-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) [spring-tx-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) [spring-tx-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653) [spring-aop-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at com.eurex.bia.refinitiv.listener.RefinitivAdhocListener$$EnhancerBySpringCGLIB$$7ca48134.processAdhocPriceRequest(<generated>) [spring-core-4.1.6.RELEASE.jar:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_222]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_222]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_222]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_222]
at org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:408) [camel-core-2.15.1.redhat-621084.jar:2.15.1.redhat-621084]
at org.apache.camel.component.bean.MethodInfo$1.doProceed(MethodInfo.java:279) [camel-core-2.15.1.redhat-621084.jar:2.15.1.redhat-621084]
at org.apache.camel.component.bean.MethodInfo$1.proceed(MethodInfo.java:252) [camel-core-2.15.1.redhat-621084.jar:2.15.1.redhat-621084]
at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:171) [camel-core-2.15.1.redhat-621084.jar:2.15.1.redhat-621084]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109) [camel-core-2.15.1.redhat-621084.jar:2.15.1.redhat-621084]
at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:68) [camel-core-2.15.1.redhat-621084.jar:2.15.1.redhat-621084]
at org.apache.camel.component.bean.BeanProducer.process(BeanProducer.java:38) [camel-core-2.15.1.redhat-621084.jar:2.15.1.redhat-621084]
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:139) [camel-core-2.15.1.redhat-621084.jar:2.15.1.redhat-621084]
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77) [camel-core-2.15.1.redhat-621084.jar:2.15.1.redhat-621084]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:448) [camel-core-2.15.1.redhat-621084.jar:2.15.1.redhat-621084]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) [camel-core-2.15.1.redhat-621084.jar:2.15.1.redhat-621084]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:121) [camel-core-2.15.1.redhat-621084.jar:2.15.1.redhat-621084]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:83) [camel-core-2.15.1.redhat-621084.jar:2.15.1.redhat-621084]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) [camel-core-2.15.1.redhat-621084.jar:2.15.1.redhat-621084]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109) [camel-core-2.15.1.redhat-621084.jar:2.15.1.redhat-621084]
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87) [camel-core-2.15.1.redhat-621084.jar:2.15.1.redhat-621084]
at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103) [camel-jms-2.15.1.redhat-621084.jar:2.15.1.redhat-621084]
at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:699) [spring-jms-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:637) [spring-jms-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:605) [spring-jms-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:308) [spring-jms-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:246) [spring-jms-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1144) [spring-jms-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1136) [spring-jms-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1033) [spring-jms-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_222]
Caused by: java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:851) [rt.jar:1.8.0_222]
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:678) [rt.jar:1.8.0_222]
at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2061) [rt.jar:1.8.0_222]
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183) [rt.jar:1.8.0_222]
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:167) [rt.jar:1.8.0_222]
at org.springframework.http.client.SimpleBufferingClientHttpRequest.executeInternal(SimpleBufferingClientHttpRequest.java:81) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:569) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
... 46 more

dss-rest-apidatascope-selectdss
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
32.2k 40 11 19

Hello @pradeep.balasubramanian,

As you say this happened last week, I am surmising that it is not reproducible now, is this the case, or you can still reproduce this?

The first place to look at if you suspect an outage of a service is My Refinitiv Service Alerts and if the outage is already reported, it will be reflected. If an outage is in progress, you may not be able to get neither 200 nor 202 status, but whatever error handling your app is designed to provide will be what you observe. This appears to be what was happening.

Please note that if the service alert info you are reading is not fully clear, you are not sure if what you are observing is related to the specific service alert, one option is to call Refinitiv Helpdesk to find out more.

However, let me discuss the possibility that it is not what was happening.

Looks like the failure happened during the token request that appears to be deep in custom code, Spring framework, a couple of other things.

HTTP rest request and response are handled by the custom Java code. We do not provide DSS REST Java SDK that would handle interaction. The REST request response interaction is handled by your custom application. As an option, we have DSS REST Java examples that only handle the minimal interaction that is required by the request, no other functionality is involved.

In my opinion, in the absence of an outage, the best way to troubleshoot this is to run a simple DSS REST Java example at the time when your app is experiencing the failure. This approach is likely to yield more info. And if you reproduce it, please let us know, we will take a look on our side as well and try to help.

To summarize, if you see something like this, first, check for known outages. If proven not to be a temporary outage, try to reproduce by running a simple example. If you see it reproduced, then next, design the appropriate handling in your production-strength custom code. And if you don't see it, look for the issue in the custom app that is causing the behavior.

Hope this helps.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.