After some period of inactivity RCM-API based application fails at the function call XudaLDAPFetch() with return code 35 (XrcWRITEFAILURE)
Originally Published: 2012-11-29
Last Modified: 2023-10-06
Article Number
000048741
Applies To
RSA Certificate Manager API 6.8
Firewall between the host where RCM-API application is running and another host where the target RSA Certificate Manager is installed
Issue
After some period of inactivity, RCM-API based application fails at the function call XudaLDAPFetch() with return code 35 (XrcWRITEFAILURE)
If the RCM-API application is restarted, it starts working fine without any issues (until a period of inactivity lapses, such as 30 minutes)
Cause
XudaLDAPFetch would return XrcWRITEFAILURE if the underlying ldap fetch call returned LDAP_SERVER_DOWN; however, the  ldap fetch operation occurs AFTER getting a connection from the pool.  In the above scenario, the firewall dropped the RCM-API connection to RSA Certificate Manager Secure Directory Server after the configured timeout. In this situation RCM-API is unable to recover from such terminated connections.
Resolution
This issue, where idle connections were being dropped by firewall and the Xuda API was found to not be able to recover from such terminated connections (regardless of configuring  XresKEEPLDAPOPEN setting), has been fixed in RCM-API version 6.8 build 522 (as well as in version 6.9 build 551).  In build 522, this problem has been fixed by setting the socket's TCP KEEPALIVE option if XresKEEPLDAPOPEN is set to 1.  This would keep LDAP connection open for extended periods of time, even through state full firewalls.

Update the application using RCM-API 6.8 build 522 (or later) and set XresKEEPLDAPOPEN to 1.
Workaround
A web portal (java servlet) was developed using JNI in combination with RSA Certificate Manager API (C library). Certificate requests are sent to the web portal and are forwarded via the XUDA API to the CA.
Notes
CMAPI-188