You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jclouds.apache.org by Jai M <ja...@gmail.com> on 2013/08/01 00:02:49 UTC

Terremark eCloud

Hi,

  I am trying jclouds with Terremark eCloud service with the sample code on
the web page. However the first login call is failing with following error

org.jclouds.rest.AuthorizationException: request: POST
https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8/loginHTTP/1.1
failed with response: HTTP/1.1 401 Unauthorized

at
org.jclouds.trmk.vcloud_0_8.handlers.ParseTerremarkVCloudErrorFromHttpResponse.handleError(
ParseTerremarkVCloudErrorFromHttpResponse.java:73)
~[trmk-common-1.6.0.jar:1.6.0]

at org.jclouds.http.handlers.DelegatingErrorHandler.handleError(
DelegatingErrorHandler.java:69) ~[jclouds-core-1.6.0.jar:1.6.0]

at org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(
BaseHttpCommandExecutorService.java:182) ~[jclouds-core-1.6.0.jar:1.6.0]

at org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(
BaseHttpCommandExecutorService.java:152) ~[jclouds-core-1.6.0.jar:1.6.0]

at org.jclouds.rest.internal.InvokeSyncToAsyncHttpMethod.invoke(
InvokeSyncToAsyncHttpMethod.java:133) ~[jclouds-core-1.6.0.jar:1.6.0]

at org.jclouds.rest.internal.InvokeSyncToAsyncHttpMethod.apply(
InvokeSyncToAsyncHttpMethod.java:99) ~[jclouds-core-1.6.0.jar:1.6.0]

at org.jclouds.rest.internal.InvokeSyncToAsyncHttpMethod.apply(
InvokeSyncToAsyncHttpMethod.java:60) ~[jclouds-core-1.6.0.jar:1.6.0]

at org.jclouds.rest.internal.DelegatesToInvocationFunction.handle(
DelegatesToInvocationFunction.java:159) ~[jclouds-core-1.6.0.jar:1.6.0]

at org.jclouds.rest.internal.DelegatesToInvocationFunction.invoke(
DelegatesToInvocationFunction.java:126) ~[jclouds-core-1.6.0.jar:1.6.0]

at $Proxy87.login(Unknown Source) ~[na:na]

at
org.jclouds.trmk.vcloud_0_8.config.TerremarkVCloudRestClientModule$22.get(
TerremarkVCloudRestClientModule.java:488) ~[trmk-common-1.6.0.jar:1.6.0]

at
org.jclouds.trmk.vcloud_0_8.config.TerremarkVCloudRestClientModule$22.get(
TerremarkVCloudRestClientModule.java:484) ~[trmk-common-1.6.0.jar:1.6.0]

I am using the right Access key and Private Key (for API user) in the
ContextBuilder. For provider string I am using "trmk-ecloud".

Has the api specification on Terremark deprecated the one used on jclouds ?
Also the stack trace shows that the code path for this login is through
vCloudExpress implementation. Is this intentional ? Any help on this
is appreciated.

Rgds

Jai

Re: Terremark eCloud

Posted by Andrew Phillips <an...@apache.org>.
>      Any proposals to get around the Login issue ?

If the curl request does not work, then jclouds is evidently  
generating the an incomplete or incorrect login request. The  
credentials themselves seem to be correct, but that unfortunately  
doesn't give us the HTTP call we need.

Our first step will have to be to find the appropriate HTTP login  
request before seeing what would need to be done in jclouds to make it  
send the same request.

ap

Re: Terremark eCloud

Posted by Jai M <ja...@gmail.com>.
Hi Andrew,

     Any proposals to get around the Login issue ?

Rgds
Jai


On Wed, Jul 31, 2013 at 5:21 PM, Jai M <ja...@gmail.com> wrote:

> Yes Andrew, I get the same error.
>
> However, there is a cloud explorer link where I can try out the api's
> directly
> https://services.enterprisecloud.terremark.com/cloudapi/explorer
> On this page, on the top right hand side, there is a settings link. This
> launches a authentication dialog. On this dialog, if I specify the same
> credentials , I am able to login.
> On this dialog, I have to select "cloud API", Hash Algorithm and the
> version which are not actually passed while invoking from jclouds.
>
> Rgds
> Jai
>
>
>
>
> On Wed, Jul 31, 2013 at 4:29 PM, Andrew Phillips <an...@apache.org>wrote:
>
>> Here is the link to the gist with header & wire logging enabled.
>>> https://gist.github.com/**jaiganeshm/6126998<https://gist.github.com/jaiganeshm/6126998>
>>>
>>
>> If you POST to https://services.**enterprisecloud.terremark.com/**
>> api/v0.8b-ext2.8/login<https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8/login>using your credentials via basic auth, do you get the same error?
>>
>> ap
>>
>
>

Re: Terremark eCloud

Posted by Jai M <ja...@gmail.com>.
Yes Andrew, I get the same error.

However, there is a cloud explorer link where I can try out the api's
directly
https://services.enterprisecloud.terremark.com/cloudapi/explorer
On this page, on the top right hand side, there is a settings link. This
launches a authentication dialog. On this dialog, if I specify the same
credentials , I am able to login.
On this dialog, I have to select "cloud API", Hash Algorithm and the
version which are not actually passed while invoking from jclouds.

Rgds
Jai




On Wed, Jul 31, 2013 at 4:29 PM, Andrew Phillips <an...@apache.org> wrote:

> Here is the link to the gist with header & wire logging enabled.
>> https://gist.github.com/**jaiganeshm/6126998<https://gist.github.com/jaiganeshm/6126998>
>>
>
> If you POST to https://services.**enterprisecloud.terremark.com/**
> api/v0.8b-ext2.8/login<https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8/login>using your credentials via basic auth, do you get the same error?
>
> ap
>

Re: Terremark eCloud

Posted by Andrew Phillips <an...@apache.org>.
> Here is the link to the gist with header & wire logging enabled.
> https://gist.github.com/jaiganeshm/6126998

If you POST to  
https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8/login  
using your credentials via basic auth, do you get the same error?

ap

Re: Terremark eCloud

Posted by Jai M <ja...@gmail.com>.
Hi Andrew,

Here is the link to the gist with header & wire logging enabled.
https://gist.github.com/jaiganeshm/6126998

Thanks
Jai


On Wed, Jul 31, 2013 at 3:19 PM, Andrew Phillips <an...@apache.org> wrote:

> Has the api specification on Terremark deprecated the one used on jclouds ?
>> Also the stack trace shows that the code path for this login is through
>> vCloudExpress implementation. Is this intentional ?
>>
>
> Yes, this is intentional: the ECloud compute service is just a slight
> adapter layer on top of the VCloud service [1].
>
> Could you enable header and wire logging [2] and - after removing any
> credentials etc. - put those up as a Gist or Pastie?
>
> Thanks
>
> ap
>
> [1] https://github.com/jclouds/**jclouds/blob/master/providers/**
> trmk-ecloud/src/main/java/org/**jclouds/trmk/ecloud/compute/**config/**
> TerremarkECloudComputeServiceC**ontextModule.java<https://github.com/jclouds/jclouds/blob/master/providers/trmk-ecloud/src/main/java/org/jclouds/trmk/ecloud/compute/config/TerremarkECloudComputeServiceContextModule.java>
> [2] http://jclouds.incubator.**apache.org/documentation/**
> reference/jclouds-logging/<http://jclouds.incubator.apache.org/documentation/reference/jclouds-logging/>
>

Re: Terremark eCloud

Posted by Andrew Phillips <an...@apache.org>.
> Has the api specification on Terremark deprecated the one used on jclouds ?
> Also the stack trace shows that the code path for this login is through
> vCloudExpress implementation. Is this intentional ?

Yes, this is intentional: the ECloud compute service is just a slight  
adapter layer on top of the VCloud service [1].

Could you enable header and wire logging [2] and - after removing any  
credentials etc. - put those up as a Gist or Pastie?

Thanks

ap

[1]  
https://github.com/jclouds/jclouds/blob/master/providers/trmk-ecloud/src/main/java/org/jclouds/trmk/ecloud/compute/config/TerremarkECloudComputeServiceContextModule.java
[2]  
http://jclouds.incubator.apache.org/documentation/reference/jclouds-logging/