Content Management and Capture

 View Only
Expand all | Collapse all

com.ibm.mm.sdk.common.DKException: Connection timed out , in ICM 8.6

  • 1.  com.ibm.mm.sdk.common.DKException: Connection timed out , in ICM 8.6

    Posted Mon August 14, 2023 11:32 AM

    Hello 

    I am trying to retrieve documents (using DKDDO retrieve(DKConstant.DK_CM_CONTENT_YES);) from ICM 8.6 and getting connection timed out error as below (service specific data masked).  Just wondering if anyone has run into similar issues and what was the timeout value increased to mitigate this issue.

    ------------

     com.ibm.mm.sdk.common.DKException: Connection timed out: connect URL : [http://<server>:9081/icmrm/ICMResourceManager/filename.tif?order=retrieve&item-id=A1001001XXXXXXXX&version=1&collection=COLLECTION_MAIN&libname=xxxxxX&update-date=2021-08-25+13 A25 A35.687529000&token=ADUA.xxxxxxU2_xxxO9_Vzcxxxxxxxxx.yOVyeIvfxxxxx_Q;&content-length=0&content-type=image Ftiff]
        at com.ibm.mm.sdk.common.DKLobICM.getHTTPGetResponse(DKLobICM.java:6754)
        at com.ibm.mm.sdk.common.DKLobICM.retrieve(DKLobICM.java:6966)
        at com.ibm.mm.sdk.common.DKLobICM.retrieve(DKLobICM.java:7594)
        at com.ibm.mm.sdk.server.PRetrieveCollItemICM.retrievePartsResourceContent(PRetrieveCollItemICM.java:1440)
        at com.ibm.mm.sdk.server.PRetrieveCollItemICM.retrieveItem(PRetrieveCollItemICM.java:315)
        at com.ibm.mm.sdk.server.DKDatastoreICM.retrieveObject(DKDatastoreICM.java:7539)
        at com.ibm.mm.sdk.common.DKDDO.retrieve(DKDDO.java:745)



    ------------------------------
    Apurva Ramesh Mistry
    ------------------------------


  • 2.  RE: com.ibm.mm.sdk.common.DKException: Connection timed out , in ICM 8.6

    Posted Thu August 17, 2023 02:44 PM

    Hi Apurva,

    This sort of a timeout usually means a connectivity issue.   So, potentially a network or firewall issue or incorrect port or host name.  It could also be that the system cannot keep up with the number of requests.  Here are some questions and suggestions for trouble shooting this issue:

    1) Does the timeout happen on every retrieve?  If yes, likely a network or firewall issue.

    2) Is the system heavily loaded when the timeouts happen?  If so, it could be the RM is under powered for the load.  Increasing resources available to the RM may help.

    3) If during heavy load, what do you have the timeout set to currently?  If the value is low, you could consider increasing this to handle heavy load.  Typically the connection should take much less than a second to establish, but this depends very much on your environment.

    4) From the CM API client machine can you access RM app from a browser using http://<server>:9081/icmrm/snoop ?  If not, also suggests a network or firewall issue.  If no browser on the system, you could also use curl for this test.

    If you need additional help trouble shooting this issue, I would suggest opening a support case.  Our support team can get traces from you for the issue and look into this in more detail...



    ------------------------------
    Randy Richardt
    ------------------------------



  • 3.  RE: com.ibm.mm.sdk.common.DKException: Connection timed out , in ICM 8.6

    Posted Fri August 18, 2023 02:44 PM

    Hello Randy 

    Thank you very much for the detail response.   As you suspected (and we confirmed) that the server is behind firewall and having issues even after opening the port 9081.  http://<server>:9081/icmrm/snoop also returns Connection timed out. 

    There are few options we are trying

    1. Create a ssh tunnel session and use localhost map to server and port 9081.  After this http://localhost:9081/icmrm/snoop worked!  So I updated the cmbicmsrvs.ini file in my app to change ICMHOSTNAME=localhost property, and tried using ssh tunnel option.   This worked to connect to database on 50000,  but when executing the retrieve(..) call above, it fails and exception shows its trying same URL and port (http://<server>:9081/icmrm/ICMResourceManager/filename.tif?.....)
      ).       
    2. Install local cert and  access using HTTPS 9444

    But both require modifying the server name and/or port in code before making the ddoDocument.retrieve(DKConstant.DK_CM_CONTENT_YES);  call.  Do you know if there is a way modify the server name (to localhost) and/or port using CM8 API before call the DKDDO retrieve(...) call ? 



    ------------------------------
    Apurva Ramesh Mistry
    ------------------------------



  • 4.  RE: com.ibm.mm.sdk.common.DKException: Connection timed out , in ICM 8.6

    Posted Tue August 22, 2023 12:38 PM

    Hi Apurva,

    There is no way to modify the host name or port at the API level.  The host name and port are stored in the CM configuration so they can be provided consistently to all users.  There could also be multiple RMs, and having the server provide this info ensures that content is always accessed from the correct RM server.

    For mapping of host name you may be able to update your hosts file to map locally from the RM host to how you want it accessed locally.  This would need to be done on all client systems, so it may get cumbersome and hard to maintain depending on your environment. 

    The host name in the CM ini file is just for the libary server (database), it does not apply to the RMs.  So, the behavior you are seeing makes sense.

    I am not sure how using https on port 9444 solves the problem?  Id this port already open in the firewall?  If so, you should not need to use host/port mapping as the RM can be configured to accept HTTP and HTTPS.  You would just need to configure the CM API to use HTTPS for retrieval.



    ------------------------------
    Randy Richardt
    ------------------------------