Fetching Certificate fails in dry run build


I am trying to read a certificate from www.amazontrust.com/repository/AmazonRootCA1.pem via creating a URL and opening a inputStream. Local builds succesfully passes but on Dry Run build it gives exception [junit] Caused by: java.net.UnknownHostException: www.amazontrust.com What can be done to avoid this error or cam we hardcode the CA in our code directly

asked 2 years ago245 views
1 Answer


UnknownHostException indicates that the IP address of a hostname could not be determined. It can happen because of a typo in the hostname. Another possible reason for UnknownHostException is DNS propagation delay or DNS misconfiguration.

Here's the below link for details regarding the UnknownHostexceptionerror and its various reasons and steps to resolving the same. All the steps are mentioned in details for you to perform & check on what end the issue is.

Link- https://aws.amazon.com/premiumsupport/knowledge-center/route-53-fix-unknownhostexception-error/ -- [1]

Hope this helps. I would request you to click Accept answer if it did.

profile pictureAWS
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions