Tuesday, August 7, 2012

Resolve socket timeout issue in UCM


If you receive "oracle.stellent.ridc.protocol.ProtocolException: java.net.SocketTimeoutException: Read timed out", when calling RIDC service from client application,

Set socket time out as shown below.


idcClient = manager.createClient("http://host:16200/cs/idcplg");
idcClient.getConfig ().setSocketTimeout (900000);  //in seconds
IdcContext userContext = new IdcContext("weblogic", "password");
 

3 comments:

  1. is there a way to increase socket timeout directly on ucm or config.cfg file?

    ReplyDelete
    Replies
    1. Currently I don't see any option available on Content Server to configure socket timeout. So far we have only flexibility to configure timeout on client end.

      Delete
  2. Hi Lakshmi,

    I am getting below error while uploading content in Oracle UCM using RIDC api :-

    Jan 19, 2015 3:37:31 PM oracle.stellent.ridc.common.log.impl.BaseLogSupport log
    WARNING: Bad socket detected, attempting retry [1]
    Jan 19, 2015 3:37:31 PM oracle.stellent.ridc.common.log.impl.BaseLogSupport log
    WARNING: Bad socket detected, attempting retry [2]
    oracle.stellent.ridc.protocol.ProtocolException: java.net.SocketTimeoutException: Read timed out
    at oracle.stellent.ridc.protocol.intradoc.HdaProtocol.readResponse(HdaProtocol.java:258)
    at oracle.stellent.ridc.IdcClient.sendRequest(IdcClient.java:184)
    at com.iffconet.ae.UcmInterface.getFieldNameAndCaption(UcmInterface.java:239)
    at com.iffconet.ae.UcmInterface.displayDirectoryContents(UcmInterface.java:108)
    at com.iffconet.ae.UcmInterface.displayDirectoryContents(UcmInterface.java:92)
    at com.iffconet.ae.UcmInterface.displayDirectoryContents(UcmInterface.java:92)
    at com.iffconet.ae.UcmInterface.main(UcmInterface.java:70)
    Caused by: java.net.SocketTimeoutException: Read timed out
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:129)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
    at oracle.stellent.ridc.common.util.StreamUtil.readRawLine(StreamUtil.java:227)
    at oracle.stellent.ridc.common.util.StreamUtil.readLine(StreamUtil.java:254)
    at oracle.stellent.ridc.protocol.intradoc.HdaProtocol.readHeaders(HdaProtocol.java:469)
    at oracle.stellent.ridc.protocol.intradoc.HdaProtocol.readResponse(HdaProtocol.java:216)
    ... 6 more

    Everything works fine till the time I am uploading content from one directory. But as soon as I change the directory programmatically, It shows the above mentioned error. However, irrespective of the error, content gets uploaded into the UCM but then it does take huge amount of time to upload.

    Any help will be highly appreciated.

    Thank you.

    ReplyDelete

Provide your thoughts !