Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to execute HTTP request #833

Closed
nikolaitn opened this issue Sep 1, 2016 · 9 comments
Closed

Unable to execute HTTP request #833

nikolaitn opened this issue Sep 1, 2016 · 9 comments

Comments

@nikolaitn
Copy link

Hi,
I am using the latest java AWS SDK 1.11.30.

When I try to execute a request, for example whether a specified bucket exists,
I receive the following exception which happens from time to time and
for certain regions:
com.amazonaws.AmazonClientException: Unable to execute HTTP request: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:724)
at com.amazonaws.http.AmazonHttpClient.doExecute(AmazonHttpClient.java:466)
at com.amazonaws.http.AmazonHttpClient.executeWithTimer(AmazonHttpClient.java:427)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:376)
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4039)
at com.amazonaws.services.s3.AmazonS3Client.headBucket(AmazonS3Client.java:1234)
at com.amazonaws.services.s3.AmazonS3Client.doesBucketExist(AmazonS3Client.java:1191)

Regions that I do not observe this issue are US located. Issue occurs with EU and Asia regions.
Regards

@shorea
Copy link
Contributor

shorea commented Sep 1, 2016

What version of Java are you using? Sounds like you have outdated certs installed that can't validate newer regions.

Are you seeing the issue consistently for those regions or just periodically?

@nikolaitn
Copy link
Author

nikolaitn commented Sep 2, 2016

Hi,
I am using java 1.8.0_92. I thought it might be certs related. This happens randomly for the problematic regions. I am executing the code on VM with suse linux.

When run the same code on my Win machine with same Java version I do not observe the issue.
Do you think it will be a good idea to switch to Rest calls using java or any other suggestions.
Is there any way to see endpoint java versions? Except for the cacerts, could anything else be the problem related to java version?

One other question, is there any example in java that I can use trying to tunnel all aws calls through Socks and HTTP Proxies?

Thanks

@nikolaitn
Copy link
Author

Hi,
This happens randomly, for mentioned regions EU and Asia, no matter what is the Java version. It happens on Win and Linux, but only to VM lab machines. On my computer is ok. I am not sure, is some routing, TTL etc. not sure. I have copied cacerts file from my comp to the java versions on the VMs, even imported manually the certificate der file, from the console site, same result.

Please let me know if you have some info about those proxies.

Thanks

@duddns
Copy link

duddns commented Sep 21, 2016

Hi @nikolaitn
I had a similar problem, I resolved to see http://stackoverflow.com/a/30699960
(AWS EC2 + Ubuntu 14.04 + Open JDK 8 + AWS SDK Java)

@yzhong52
Copy link

FYI, I ran into this issue when I have Charles proxy enabled...

@AllysonYuShiong
Copy link

@yzhong52 May I know how do you solve it with Charles Proxy enabled? Need this very much. Thanks.

@yzhong52
Copy link

yzhong52 commented May 5, 2018

@AllysonYuShiong You probably have a different problem. I had this issue when I have Charles proxy enabled. It works after I close it.

@AllysonYuShiong
Copy link

@yzhong52 thanks for reply. I need to restart my machine in order for it to work. I need to use charles proxy to capture the traffic so I must have charles proxy turned on. I tried cacerts and use us-west-2 region still it doesn't work with charles proxy.

@adtoniq
Copy link

adtoniq commented Feb 26, 2019

FYI, I ran into this issue when I have Charles proxy enabled...

I had the exact same issue with the Fiddler proxy enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants