You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Subhadip Bagui <i....@gmail.com> on 2015/09/01 13:45:56 UTC

ec2 authorization issue after upgrading to 1.9.1

Hi,

I'm getting the below error while authenticating with ec2 for any a
particular region. Please let me know why  the issue is occurring.


01-09-2015 15:55:06,616  WARN [http-bio-9091-exec-4]
com.aricent.aricloud.service.impl.NodeManagementServiceImpl 7576 -
org.jclouds.rest.AuthorizationException: POST
http://ec2.ap-southeast-1.amazonaws.com/ HTTP/1.1 -> HTTP/1.1 401
Unauthorized
org.jclouds.rest.AuthorizationException: POST
http://ec2.ap-southeast-1.amazonaws.com/ HTTP/1.1 -> HTTP/1.1 401
Unauthorized
at
org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.refineException(ParseAWSErrorFromXmlContent.java:122)
at
org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.handleError(ParseAWSErrorFromXmlContent.java:89)
at
org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)
at
org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:136)
at
org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:105)
at
org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
at
org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
at
org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)


Regards,
Subhadip

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

Re: ec2 authorization issue after upgrading to 1.9.1

Posted by Andrew Phillips <an...@apache.org>.
> After upgrading to 1.9.1 it's starts happening. Any idea ?

What was the previous version you were using? Were there any other 
changes you made to your setup, e.g. the JVM type of version?

This is not something we've had anyone else report so far, so at this 
point it seems more likely to be an interplay between jclouds and other 
parts of the environment.

Regards

ap

Re: ec2 authorization issue after upgrading to 1.9.1

Posted by Andrew Phillips <an...@apache.org>.
[moving this to user@...]

> What is the correct procedure to pass certificate for every public
> clouds through jclouds? if I have to ship the application to any
> remote machine ?

In terms of trusting certificates, jclouds doesn't behave any 
differently than any other Java application. The first question for me 
would be why the certificate is being rejected in the first place - the 
public cloud providers should all have certificates that are signed by 
trusted CAs, and so should be accepted by the JVM without any changes.

Are they endpoints you're connecting to using self-signed certs, or is 
there any other obvious reason (hostname mismatches, expired certs etc.) 
why they would be rejected? Or are the JVMs you're running on using a 
different set of trusted CAs?

Regards

ap

Re: ec2 authorization issue after upgrading to 1.9.1

Posted by Andrew Phillips <an...@apache.org>.
[moving this to user@...]

> What is the correct procedure to pass certificate for every public
> clouds through jclouds? if I have to ship the application to any
> remote machine ?

In terms of trusting certificates, jclouds doesn't behave any 
differently than any other Java application. The first question for me 
would be why the certificate is being rejected in the first place - the 
public cloud providers should all have certificates that are signed by 
trusted CAs, and so should be accepted by the JVM without any changes.

Are they endpoints you're connecting to using self-signed certs, or is 
there any other obvious reason (hostname mismatches, expired certs etc.) 
why they would be rejected? Or are the JVMs you're running on using a 
different set of trusted CAs?

Regards

ap

Re: ec2 authorization issue after upgrading to 1.9.1

Posted by Subhadip Bagui <i....@gmail.com>.
Hi,

Please suggest how to resolve the certificate issue.

I have created new certificate in java on path
{JAVA_HOME}/jre/lib/security/ . That didnt help.

Has to pass Constants.PROPERTY_TRUST_ALL_CERTS to make it work.

What is the correct procedure to pass certificate for every public clouds
through jclouds? if I have to ship the application to any remote machine ?


Regards,
Subhadip

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

On Fri, Sep 4, 2015 at 4:48 PM, Subhadip Bagui <i....@gmail.com> wrote:

> Hi,
>
> My server time was not synchronized with current time. Thats why the
> request was failing for aws. After updating the time the same is working
> fine.
>
>
> I'm having some different issue now. From my local when I'm trying to
> connect to any public cloud I'm getting the below issue. Please let me know
> how to overcome that.
>
> sun.security.validator.ValidatorException: PKIX path building failed:
> sun.security.provider.certpath.SunCertPathBuilderException: unable to find
> valid certification path to requested target connecting to POST
> https://accounts.google.com/o/oauth2/token HTTP/1.1 connecting to GET
> https://www.googleapis.com/compute/v1/projects/611861444111 HTTP/1.1
>
>
>
> Regards,
> Subhadip
>
>
> -------------------------------------------------------------------------------------------------------------------
>
> On Tue, Sep 1, 2015 at 8:17 PM, Subhadip Bagui <i....@gmail.com> wrote:
>
>> Hi Andrew,
>>
>> This is happening while I'm trying to authenticate with particular
>> endpoint for a region.
>>
>> I didn't check with version 1.9.0. Will check and let u know
>>
>> Regards,
>> Subhadip
>>
>>
>> -------------------------------------------------------------------------------------------------------------------
>>
>> On Tue, Sep 1, 2015 at 7:26 PM, Andrew Phillips <an...@apache.org>
>> wrote:
>>
>>> Hi Subhadip
>>>
>>> I'm getting the below error while authenticating with ec2 for any a
>>>> particular region.
>>>>
>>>
>>> Just to confirm: if you use 1.9.0, you do *not* get this error?
>>>
>>> Regards
>>>
>>> ap
>>>
>>
>>
>

Re: ec2 authorization issue after upgrading to 1.9.1

Posted by Subhadip Bagui <i....@gmail.com>.
Hi,

My server time was not synchronized with current time. Thats why the
request was failing for aws. After updating the time the same is working
fine.


I'm having some different issue now. From my local when I'm trying to
connect to any public cloud I'm getting the below issue. Please let me know
how to overcome that.

sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target connecting to POST
https://accounts.google.com/o/oauth2/token HTTP/1.1 connecting to GET
https://www.googleapis.com/compute/v1/projects/611861444111 HTTP/1.1



Regards,
Subhadip

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

On Tue, Sep 1, 2015 at 8:17 PM, Subhadip Bagui <i....@gmail.com> wrote:

> Hi Andrew,
>
> This is happening while I'm trying to authenticate with particular
> endpoint for a region.
>
> I didn't check with version 1.9.0. Will check and let u know
>
> Regards,
> Subhadip
>
>
> -------------------------------------------------------------------------------------------------------------------
>
> On Tue, Sep 1, 2015 at 7:26 PM, Andrew Phillips <an...@apache.org>
> wrote:
>
>> Hi Subhadip
>>
>> I'm getting the below error while authenticating with ec2 for any a
>>> particular region.
>>>
>>
>> Just to confirm: if you use 1.9.0, you do *not* get this error?
>>
>> Regards
>>
>> ap
>>
>
>

Re: ec2 authorization issue after upgrading to 1.9.1

Posted by Subhadip Bagui <i....@gmail.com>.
Hi Andrew,

This is happening while I'm trying to authenticate with particular endpoint
for a region.

I didn't check with version 1.9.0. Will check and let u know

Regards,
Subhadip

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

On Tue, Sep 1, 2015 at 7:26 PM, Andrew Phillips <an...@apache.org> wrote:

> Hi Subhadip
>
> I'm getting the below error while authenticating with ec2 for any a
>> particular region.
>>
>
> Just to confirm: if you use 1.9.0, you do *not* get this error?
>
> Regards
>
> ap
>

Re: ec2 authorization issue after upgrading to 1.9.1

Posted by Andrew Phillips <an...@apache.org>.
Hi Subhadip

> I'm getting the below error while authenticating with ec2 for any a
> particular region.

Just to confirm: if you use 1.9.0, you do *not* get this error?

Regards

ap