REST API Error

Neeta1
Tera Contributor

Hi Experts, 

 

When I am executing REST API , getting below error.

This API was working fine previously and now sudden we are getting below error- 

 

"Request not sent to uri=<URL>  : org.apache.commons.httpclient.HttpException: Server certificate cached revoked Tue May 09 01:59:57 PDT 2023"

 

Could you please let us know how to fix this error ?

4 REPLIES 4

Amit Gujarathi
Giga Sage
Giga Sage

HI @Neeta1 ,

I trust you are doing great.

To fix the error you are encountering while executing the REST API, which states "Request not sent to uri=<URL>: org.apache.commons.httpclient.HttpException: Server certificate cached revoked," you can follow the steps below:

  1. Validate the Server Certificate: Make sure the server certificate being used by the API is valid and has not expired. Check the expiration date and ensure it is still valid. If the certificate has expired, you will need to obtain a new one.

  2. Clear Cached Certificates: Clear any cached certificates on the system or application that might be causing conflicts. Sometimes, cached certificates can become corrupted or revoked, leading to authentication issues. Clearing the cache will force the system to retrieve the latest certificate.

  3. Update Truststore: If the API is using a specific truststore to validate server certificates, ensure that the truststore is up to date. The truststore contains trusted root certificates used for authenticating servers. If the server's certificate is not included in the truststore, it can cause the "certificate revoked" error. Add the correct certificate to the truststore if necessary.

  4. Check Network Connectivity: Ensure that the network connectivity between the API client and the server hosting the API is stable. Network disruptions or firewall restrictions can sometimes cause communication issues and trigger certificate errors. Verify that there are no network-related problems impacting the API request.

  5. Test API with Other Tools: Attempt to execute the API using other tools or software, such as cURL or Postman, to isolate the issue. If the error persists across different tools, it indicates a problem with the API or server configuration. In such cases, consult with the server administrator or the team responsible for maintaining the API.


Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



@Amit Gujarathi 
It is not quite clear how you would actually perform "Clear Cached Certificates". The only approach so far I saw was restarting the node in question (via Case). Do you know of another approach?
Best
Daniel

 


If this answer was helpful, I would appreciate if you marked it as such - thanks!

Best
Daniel

Karan Chhabra6
Mega Sage
Mega Sage

Hi @Neeta1 ,

 

Please set this property to false and test again : com.glide.communications.httpclient.verify_revoked_certificate

Additionally, please refer to this KB Article as well, this property should be made false only in sub prod env's just to enable testing

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0851908

 

If my answer has helped with your question, please mark it as correct and helpful

 

Thanks!

 

Note that it is not advised to set com.glide.communications.httpclient.verify_revoked_certificate to false on a production instance.


If this answer was helpful, I would appreciate if you marked it as such - thanks!

Best
Daniel