Re: error while running JCloudsNove.java

2018-06-20 Thread jayshankar nair
 Hi,
I am getting compilation errors. What is the header file for KeystoneProperties.
error: package org.jclouds.openstack.keystone does not exist  import 
org.jclouds.openstack.keystone.*;  ^JCloudsNova.java:22: error: cannot find 
symboloverrides.put(KeystoneProperties.KEYSTONE_VERSION, "3");              ^  
symbol:   variable KeystoneProperties  location: class 
JCloudsNovaJCloudsNova.java:23: error: cannot find 
symboloverrides.put(KeystoneProperties.SCOPE, "domain:default");              ^ 
 symbol:   variable KeystoneProperties  location: class 
JCloudsNovaJCloudsNova.java:55: error: cannot find symbol   
.overrides(overrides)              ^  symbol:   variable overrides  location: 
class JCloudsNova4 errors
Is there a link where i can download v3 jcloud examples.
Thanks,Jayshankar

On Thursday, June 21, 2018, 11:05:09 AM GMT+5:30, Ignasi Barrera 
 wrote:  
 
 This helps, thanks.
It looks like your program is trying to connect to a Keystone V2 endpoint, but 
your environment uses the newer Keystone V3.
You need to configure the context to use V3 as detailed 
here:https://jclouds.apache.org/guides/openstack/#keystone

Could you change the context creation accordingly and see if it works?

I.

On Thu, Jun 21, 2018, 07:00 jayshankar nair  wrote:

 Hello Ignasi/Andrea, I am still facing problem while running jCloudsNova.java. 
I am able to run openstack cli command.Openstack version
  
 openstack --versionopenstack 3.15.0
openstack endpoint 
list+--+---+--+--+-+---++|
 ID                               | Region    | Service Name | Service Type | 
Enabled | Interface | URL                                            
|+--+---+--+--+-+---++|
 00055fa2240248bf9e693a1d446c7c59 | RegionOne | gnocchi      | metric       | 
True    | public    | http://192.168.0.12:8041                       || 
0289010ada1446469e2ff14de09ff780 | RegionOne | aodh         | alarming     | 
True    | public    | http://192.168.0.12:8042                       || 
09e23e6226b7415eaf17a5bf4d33eeb8 | RegionOne | ceilometer   | metering     | 
True    | internal  | http://192.168.0.12:8777                       || 
0b574bc23cc54bd8a1266ed858a2e87f | RegionOne | neutron      | network      | 
True    | admin     | http://192.168.0.12:9696                       || 
128768ce20c44b8998a949c6e73c3eb2 | RegionOne | swift        | object-store | 
True    | admin     | http://192.168.0.12:8080/v1/AUTH_%(tenant_id)s || 
13782b29b3a04325be59c9c36d24622f | RegionOne | placement    | placement    | 
True    | public    | http://192.168.0.12:8778/placement             || 
160ef2bc67534bc19b47df8328fdcf16 | RegionOne | ceilometer   | metering     | 
True    | admin     | http://192.168.0.12:8777                       || 
19b9b5d72f4540f183c4ab574d3efd71 | RegionOne | cinderv3     | volumev3     | 
True    | admin     | http://192.168.0.12:8776/v3/%(tenant_id)s      || 
1ded29d260604e9b9cf14706fa558a21 | RegionOne | cinderv3     | volumev3     | 
True    | internal  | http://192.168.0.12:8776/v3/%(tenant_id)s      || 
26698f851ccc44b99d1f3601b9917d9b | RegionOne | keystone     | identity     | 
True    | admin     | http://192.168.0.12:35357/v3                   || 
2bea479cb5ea4d128ce9e7f8009be760 | RegionOne | nova         | compute      | 
True    | admin     | http://192.168.0.12:8774/v2.1/%(tenant_id)s    || 
3066119a6c9147fa8e4626725c3a34ad | RegionOne | neutron      | network      | 
True    | public    | http://192.168.0.12:9696                       || 
3912bdc1f8cd4014bb9bfc8292c9ee7c | RegionOne | glance       | image        | 
True    | internal  | http://192.168.0.12:9292                       || 
4243ebf7df0f46fbb062b828d7147ca4 | RegionOne | neutron      | network      | 
True    | internal  | http://192.168.0.12:9696                       || 
491809ebcf99486bb050f3dd7c54e91e | RegionOne | swift        | object-store | 
True    | internal  | http://192.168.0.12:8080/v1/AUTH_%(tenant_id)s || 
59c73f5064b7494faa5ca3b389403746 | RegionOne | cinderv2     | volumev2     | 
True    | public    | http://192.168.0.12:8776/v2/%(tenant_id)s      || 
59d32fdf1d01465bbfeb30291cf3edb0 | RegionOne | swift        | object-store | 
True    | public    | http://192.168.0.12:8080/v1/AUTH_%(tenant_id)s || 
6b5f1f96bef1441fa16947e3d2578732 | RegionOne | cinder       | volume       | 
True    | admin     | http://192.168.0.12:8776/v1/%(tenant_id)s      || 
724aafb2db954e3e867f841f790fb8b7 | RegionOne | keystone     | identity     | 
True    | internal  | http://192.168.0.12:5000/v3                    || 
7b149ecd13ed4278bc45e106b1d7fcf2 | RegionOne | glance       | image        | 
True    | public    | http://192.168.0.12:9292                       || 
7d093993eeb34acdb9c7c1afe9c77144 | RegionOne | gl

What parameters does Jclouds need to use listNodes() ?

2018-06-20 Thread archieprad
Hi All,
Just trying to understand the internals of Jclouds computeService. So lets just 
say i have an access key and secret key. Is there anything else Jclouds needs 
such as session token that needs to be authenticated ?

Cheers
Archana


Re: error while running JCloudsNove.java

2018-06-20 Thread Ignasi Barrera
This helps, thanks.

It looks like your program is trying to connect to a Keystone V2 endpoint,
but your environment uses the newer Keystone V3.

You need to configure the context to use V3 as detailed here:
https://jclouds.apache.org/guides/openstack/#keystone

Could you change the context creation accordingly and see if it works?


I.


On Thu, Jun 21, 2018, 07:00 jayshankar nair  wrote:

> Hello Ignasi/Andrea,
>
> I am still facing problem while running jCloudsNova.java. I am able to run
> openstack cli command.
> Openstack version
>
>
>  openstack --version
> openstack 3.15.0
>
> openstack endpoint list
>
> +--+---+--+--+-+---++
> | ID   | Region| Service Name | Service
> Type | Enabled | Interface | URL
> |
>
> +--+---+--+--+-+---++
> | 00055fa2240248bf9e693a1d446c7c59 | RegionOne | gnocchi  | metric
>| True| public| http://192.168.0.12:8041
>  |
> | 0289010ada1446469e2ff14de09ff780 | RegionOne | aodh | alarming
>| True| public| http://192.168.0.12:8042
>  |
> | 09e23e6226b7415eaf17a5bf4d33eeb8 | RegionOne | ceilometer   | metering
>| True| internal  | http://192.168.0.12:8777
>  |
> | 0b574bc23cc54bd8a1266ed858a2e87f | RegionOne | neutron  | network
>   | True| admin | http://192.168.0.12:9696   |
> | 128768ce20c44b8998a949c6e73c3eb2 | RegionOne | swift|
> object-store | True| admin |
> http://192.168.0.12:8080/v1/AUTH_%(tenant_id)s |
> | 13782b29b3a04325be59c9c36d24622f | RegionOne | placement| placement
>   | True| public| http://192.168.0.12:8778/placement |
> | 160ef2bc67534bc19b47df8328fdcf16 | RegionOne | ceilometer   | metering
>| True| admin | http://192.168.0.12:8777
>  |
> | 19b9b5d72f4540f183c4ab574d3efd71 | RegionOne | cinderv3 | volumev3
>| True| admin | http://192.168.0.12:8776/v3/%(tenant_id)s
> |
> | 1ded29d260604e9b9cf14706fa558a21 | RegionOne | cinderv3 | volumev3
>| True| internal  | http://192.168.0.12:8776/v3/%(tenant_id)s
> |
> | 26698f851ccc44b99d1f3601b9917d9b | RegionOne | keystone | identity
>| True| admin | http://192.168.0.12:35357/v3
>  |
> | 2bea479cb5ea4d128ce9e7f8009be760 | RegionOne | nova | compute
>   | True| admin | http://192.168.0.12:8774/v2.1/%(tenant_id)s|
> | 3066119a6c9147fa8e4626725c3a34ad | RegionOne | neutron  | network
>   | True| public| http://192.168.0.12:9696   |
> | 3912bdc1f8cd4014bb9bfc8292c9ee7c | RegionOne | glance   | image
>   | True| internal  | http://192.168.0.12:9292   |
> | 4243ebf7df0f46fbb062b828d7147ca4 | RegionOne | neutron  | network
>   | True| internal  | http://192.168.0.12:9696   |
> | 491809ebcf99486bb050f3dd7c54e91e | RegionOne | swift|
> object-store | True| internal  |
> http://192.168.0.12:8080/v1/AUTH_%(tenant_id)s |
> | 59c73f5064b7494faa5ca3b389403746 | RegionOne | cinderv2 | volumev2
>| True| public| http://192.168.0.12:8776/v2/%(tenant_id)s
> |
> | 59d32fdf1d01465bbfeb30291cf3edb0 | RegionOne | swift|
> object-store | True| public|
> http://192.168.0.12:8080/v1/AUTH_%(tenant_id)s |
> | 6b5f1f96bef1441fa16947e3d2578732 | RegionOne | cinder   | volume
>| True| admin | http://192.168.0.12:8776/v1/%(tenant_id)s
> |
> | 724aafb2db954e3e867f841f790fb8b7 | RegionOne | keystone | identity
>| True| internal  | http://192.168.0.12:5000/v3
> |
> | 7b149ecd13ed4278bc45e106b1d7fcf2 | RegionOne | glance   | image
>   | True| public| http://192.168.0.12:9292   |
> | 7d093993eeb34acdb9c7c1afe9c77144 | RegionOne | glance   | image
>   | True| admin | http://192.168.0.12:9292   |
> | 88431c7c2f67409fb0fc41fe68ec3ead | RegionOne | gnocchi  | metric
>| True| internal  | http://192.168.0.12:8041
>  |
> | 8bef913a13f642e58458e9b098faa320 | RegionOne | keystone | identity
>| True| public| http://192.168.0.12:5000/v3
> |
> | 99acbe33c97b4ca382d92a6d661adb44 | RegionOne | placement| placement
>   | True| internal  | http://192.168.0.12:8778/placement |
> | a3913c23488e456caee2dd66c8e584bf | RegionOne | gnocchi  | metric
>| True| admin | http://192.168.0.12:8041
>  |
> | addbbfdb56a244eba884e3995a548b16 | RegionOne | cinderv2 | volumev2
>| True| admin | http://192.168.0.12:8776/v2/%(tenant_id)s
> |
> | babb14683847492eb3129535bda12f78 | RegionOne | nova | compute
>   | True| internal  | http://192.168.0.12:8774/v2.1/%(tenant_id)s|
> | bc01b0a1074646f1aa534fa5f36

Re: error while running JCloudsNove.java

2018-06-20 Thread jayshankar nair
 Hello Ignasi/Andrea, I am still facing problem while running jCloudsNova.java. 
I am able to run openstack cli command.Openstack version
  
 openstack --versionopenstack 3.15.0
openstack endpoint 
list+--+---+--+--+-+---++|
 ID                               | Region    | Service Name | Service Type | 
Enabled | Interface | URL                                            
|+--+---+--+--+-+---++|
 00055fa2240248bf9e693a1d446c7c59 | RegionOne | gnocchi      | metric       | 
True    | public    | http://192.168.0.12:8041                       || 
0289010ada1446469e2ff14de09ff780 | RegionOne | aodh         | alarming     | 
True    | public    | http://192.168.0.12:8042                       || 
09e23e6226b7415eaf17a5bf4d33eeb8 | RegionOne | ceilometer   | metering     | 
True    | internal  | http://192.168.0.12:8777                       || 
0b574bc23cc54bd8a1266ed858a2e87f | RegionOne | neutron      | network      | 
True    | admin     | http://192.168.0.12:9696                       || 
128768ce20c44b8998a949c6e73c3eb2 | RegionOne | swift        | object-store | 
True    | admin     | http://192.168.0.12:8080/v1/AUTH_%(tenant_id)s || 
13782b29b3a04325be59c9c36d24622f | RegionOne | placement    | placement    | 
True    | public    | http://192.168.0.12:8778/placement             || 
160ef2bc67534bc19b47df8328fdcf16 | RegionOne | ceilometer   | metering     | 
True    | admin     | http://192.168.0.12:8777                       || 
19b9b5d72f4540f183c4ab574d3efd71 | RegionOne | cinderv3     | volumev3     | 
True    | admin     | http://192.168.0.12:8776/v3/%(tenant_id)s      || 
1ded29d260604e9b9cf14706fa558a21 | RegionOne | cinderv3     | volumev3     | 
True    | internal  | http://192.168.0.12:8776/v3/%(tenant_id)s      || 
26698f851ccc44b99d1f3601b9917d9b | RegionOne | keystone     | identity     | 
True    | admin     | http://192.168.0.12:35357/v3                   || 
2bea479cb5ea4d128ce9e7f8009be760 | RegionOne | nova         | compute      | 
True    | admin     | http://192.168.0.12:8774/v2.1/%(tenant_id)s    || 
3066119a6c9147fa8e4626725c3a34ad | RegionOne | neutron      | network      | 
True    | public    | http://192.168.0.12:9696                       || 
3912bdc1f8cd4014bb9bfc8292c9ee7c | RegionOne | glance       | image        | 
True    | internal  | http://192.168.0.12:9292                       || 
4243ebf7df0f46fbb062b828d7147ca4 | RegionOne | neutron      | network      | 
True    | internal  | http://192.168.0.12:9696                       || 
491809ebcf99486bb050f3dd7c54e91e | RegionOne | swift        | object-store | 
True    | internal  | http://192.168.0.12:8080/v1/AUTH_%(tenant_id)s || 
59c73f5064b7494faa5ca3b389403746 | RegionOne | cinderv2     | volumev2     | 
True    | public    | http://192.168.0.12:8776/v2/%(tenant_id)s      || 
59d32fdf1d01465bbfeb30291cf3edb0 | RegionOne | swift        | object-store | 
True    | public    | http://192.168.0.12:8080/v1/AUTH_%(tenant_id)s || 
6b5f1f96bef1441fa16947e3d2578732 | RegionOne | cinder       | volume       | 
True    | admin     | http://192.168.0.12:8776/v1/%(tenant_id)s      || 
724aafb2db954e3e867f841f790fb8b7 | RegionOne | keystone     | identity     | 
True    | internal  | http://192.168.0.12:5000/v3                    || 
7b149ecd13ed4278bc45e106b1d7fcf2 | RegionOne | glance       | image        | 
True    | public    | http://192.168.0.12:9292                       || 
7d093993eeb34acdb9c7c1afe9c77144 | RegionOne | glance       | image        | 
True    | admin     | http://192.168.0.12:9292                       || 
88431c7c2f67409fb0fc41fe68ec3ead | RegionOne | gnocchi      | metric       | 
True    | internal  | http://192.168.0.12:8041                       || 
8bef913a13f642e58458e9b098faa320 | RegionOne | keystone     | identity     | 
True    | public    | http://192.168.0.12:5000/v3                    || 
99acbe33c97b4ca382d92a6d661adb44 | RegionOne | placement    | placement    | 
True    | internal  | http://192.168.0.12:8778/placement             || 
a3913c23488e456caee2dd66c8e584bf | RegionOne | gnocchi      | metric       | 
True    | admin     | http://192.168.0.12:8041                       || 
addbbfdb56a244eba884e3995a548b16 | RegionOne | cinderv2     | volumev2     | 
True    | admin     | http://192.168.0.12:8776/v2/%(tenant_id)s      || 
babb14683847492eb3129535bda12f78 | RegionOne | nova         | compute      | 
True    | internal  | http://192.168.0.12:8774/v2.1/%(tenant_id)s    || 
bc01b0a1074646f1aa534fa5f366189e | RegionOne | aodh         | alarming     | 
True    | admin     | http://192.168.0.12:8042                       || 
c3f429a1a1bb4eef9feb9c792e8aa45c | RegionOne | placement    | placement    | 
True    | admin     | http://192.168.0

Re: Issue with jclouds computeService listNodes() ?

2018-06-20 Thread archieprad
Hi Ignasi,
So the function that does the authentication uses a context builder and 
generates a temporary access and secret key. I've read that perhaps Jclouds 
might not be sending the session token to access aws resources. Do you think 
that is what could be happening?

Cheers,
Archana


Re: Issue with jclouds computeService listNodes() ?

2018-06-20 Thread Ignasi Barrera
Hi Archana,

There is no explicit support to pass the IAM role based authentication when
creating the jclouds context. It has to be created with the access and
secret key.
I don't know the internals of the simian army, but if you have access to
the instance metadata you could query it to get the access keys and then
build the jclodus context.



On 20 June 2018 at 09:30, archiep...@gmail.com  wrote:

> Hi Andrea,
> Thanks for the reply. I am somewhat new ( learning today) to Jclouds. But
> after facing this issue for the past 2 days and reading some blog posts, a
> lot of places say it might be an IAM role issue. Here is the stacktrace:
>
> 2018-06-18 03:52:56.701 - WARN  ChaosInstance - [ChaosInstance.java:105]
> Error making SSH connection to instance
> org.jclouds.rest.AuthorizationException: POST https://ec2.us-east-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:132)
> at org.jclouds.http.internal.BaseHttpCommandExecutorService
> .invoke(BaseHttpCommandExecutorService.java:101)
> 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)
> at org.jclouds.reflect.FunctionalReflection$
> FunctionalInvocationHandler.handleInvocation(
> FunctionalReflection.java:117)
> at com.google.common.reflect.AbstractInvocationHandler.invoke(
> AbstractInvocationHandler.java:87)
> at com.sun.proxy.$Proxy174.describeRegions(Unknown Source)
> at org.jclouds.ec2.suppliers.DescribeRegionsForRegionURIs.get(
> DescribeRegionsForRegionURIs.java:50)
> at org.jclouds.ec2.suppliers.DescribeRegionsForRegionURIs.get(
> DescribeRegionsForRegionURIs.java:38)
> at org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOn
> AuthorizationExceptionSupplier$SetAndThrowAuthorizationExcept
> ionSupplierBackedLoader.load(MemoizedRetryOnTimeOutButNotOn
> AuthorizationExceptionSupplier.java:73)
> at org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOn
> AuthorizationExceptionSupplier$SetAndThrowAuthorizationExcept
> ionSupplierBackedLoader.load(MemoizedRetryOnTimeOutButNotOn
> AuthorizationExceptionSupplier.java:57)
> at com.google.common.cache.LocalCache$LoadingValueReference.
> loadFuture(LocalCache.java:3542)
> at com.google.common.cache.LocalCache$Segment.loadSync(
> LocalCache.java:2323)
> at com.google.common.cache.LocalCache$Segment.
> lockedGetOrLoad(LocalCache.java:2286)
> at com.google.common.cache.LocalCache$Segment.get(
> LocalCache.java:2201)
> at com.google.common.cache.LocalCache.get(LocalCache.java:3953)
> at com.google.common.cache.LocalCache.getOrLoad(
> LocalCache.java:3957)
> at com.google.common.cache.LocalCache$LocalLoadingCache.
> get(LocalCache.java:4875)
> at org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOn
> AuthorizationExceptionSupplier.get(MemoizedRetryOnTimeOutButNotOn
> AuthorizationExceptionSupplier.java:119)
> at org.jclouds.location.suppliers.derived.
> RegionIdsFromRegionIdToURIKeySet.get(RegionIdsFromRegionIdToURIKeyS
> et.java:45)
> at org.jclouds.location.suppliers.derived.
> RegionIdsFromRegionIdToURIKeySet.get(RegionIdsFromRegionIdToURIKeyS
> et.java:33)
> at com.google.common.base.Suppliers$SupplierComposition.
> get(Suppliers.java:68)
> at org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOn
> AuthorizationExceptionSupplier$SetAndThrowAuthorizationExcept
> ionSupplierBackedLoader.load(MemoizedRetryOnTimeOutButNotOn
> AuthorizationExceptionSupplier.java:73)
> at org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOn
> AuthorizationExceptionSupplier$SetAndThrowAuthorizationExcept
> ionSupplierBackedLoader.load(MemoizedRetryOnTimeOutButNotOn
> AuthorizationExceptionSupplier.java:57)
> at com.google.common.cache.LocalCache$LoadingValueReference.
> loadFuture(LocalCache.java:3542)
> at com.google.common.cache.LocalCache$Segment.loadSync(
> LocalCache.java:2323)
> at com.google.common.cache.LocalCache$Segment.
> lockedGetOrLoad(LocalCache.java:2286)
> at com.google.common.cache.LocalCache$Segment.get(
> LocalCache.java:2201)
> at com.google.common.cache.LocalCache.get(LocalCache.java:3953)
> at com.google.common.cache.LocalCache.getOrLoad(
> LocalCache.java:3957)
> at com.google.c

Re: error while running JCloudsNove.java

2018-06-20 Thread Ignasi Barrera
Hi Jayshankar,

jclouds supports OpenStack, in general. If you have an OpenStack cloud, you
should be able to connect jclouds to it.

This said, there are many OpenStack distributions that come with different
versions and configurations for the OpenStack Services. In order to connect
jclouds to it, you first need to understand the platform you are deploying.
How authentication is done, and which versions of the OpenStack Services
are exposed.

If you can do that research to know better your platform and can provide
that information on this list, I'm sure we'll be able to help you get it
working.



Regards,

I.


On 19 June 2018 at 12:18, Andrea Turli  wrote:

> Sorry not familiar with packstack, but glad you fixed the maven dependency
> issues.
>
>
>
> On Tue, Jun 19, 2018 at 12:01 PM jayshankar nair 
> wrote:
>
>> Hello,
>>
>> I have installed openstack using packstack --allinone. Is it possible for
>> jcloud to connect to packstack. How can i know the keystone endpoint and
>> version.
>>
>> Please let me know.
>>
>> Thanks,
>> Jayshankar
>>
>>
>> On Tuesday, June 19, 2018 2:51 PM, Andrea Turli 
>> wrote:
>>
>>
>> Please read carefully http://jclouds.apache.org/guides/openstack/
>>
>> Double check the keystone endpoint and make sure of the Keystone version
>> your provider is using.
>>
>> Best
>>
>> On Tue, Jun 19, 2018 at 11:15 AM jayshankar nair 
>> wrote:
>>
>> Hello,
>>
>> I am getting the following error while running JCloudsNova
>>
>> java -classpath ".:lib/*:/usr/local/jdk1.8.0_171/lib" JCloudsNova
>> 09:04:54.875 [main] DEBUG o.j.rest.internal.InvokeHttpMethod - >>
>> invoking V2AuthenticationApi.authenticatePassword
>> 09:04:54.878 [main] DEBUG o.j.h.i.JavaUrlHttpCommandExecutorService -
>> Sending request -263010527: POST http://192.168.0.12:5000/v2.0/tokens
>> HTTP/1.1
>> 09:04:54.878 [main] DEBUG jclouds.wire - >> "Sensitive data in payload,
>> use jclouds.wire.log.sensitive override to enable logging this data."
>> 09:04:54.878 [main] DEBUG jclouds.headers - >> POST
>> http://192.168.0.12:5000/v2.0/tokens HTTP/1.1
>> 09:04:54.878 [main] DEBUG jclouds.headers - >> Accept: application/json
>> 09:04:54.878 [main] DEBUG jclouds.headers - >> Content-Type:
>> application/json
>> 09:04:54.878 [main] DEBUG jclouds.headers - >> Content-Length: 94
>> 09:04:54.978 [main] DEBUG o.j.h.i.JavaUrlHttpCommandExecutorService -
>> Receiving response -263010527: HTTP/1.1 404 Not Found
>> 09:04:54.979 [main] DEBUG jclouds.headers - << HTTP/1.1 404 Not Found
>> 09:04:54.979 [main] DEBUG jclouds.headers - << Keep-Alive: timeout=15,
>> max=100
>> 09:04:54.979 [main] DEBUG jclouds.headers - << Server: Apache/2.4.6
>> (CentOS)
>> 09:04:54.979 [main] DEBUG jclouds.headers - << Connection: Keep-Alive
>> 09:04:54.979 [main] DEBUG jclouds.headers - << x-openstack-request-id:
>> req-50bbce32-c67b-4b18-90cd-fa0911f842a0
>> 09:04:54.979 [main] DEBUG jclouds.headers - << Vary: X-Auth-Token
>> 09:04:54.979 [main] DEBUG jclouds.headers - << Date: Tue, 19 Jun 2018
>> 03:34:54 GMT
>> 09:04:54.979 [main] DEBUG jclouds.headers - << Content-Type:
>> application/json
>> 09:04:54.979 [main] DEBUG jclouds.headers - << Content-Length: 133
>> 09:04:54.982 [main] DEBUG jclouds.wire - << "{"error": {"message": "(
>> http://192.168.0.12:5000/v2.0/tokens): The resource could not be
>> found.", "code": 404, "title": "Not Found"}}"
>> Exception in thread "main" org.jclouds.rest.ResourceNotFoundException:
>> {"error": {"message": "(http://192.168.0.12:5000/v2.0/tokens): The
>> resource could not be found.", "code": 404, "title": "Not Found"}}
>> at org.jclouds.openstack.nova.v2_0.handlers.NovaErrorHandler.
>> handleError(NovaErrorHandler.java:97)
>> at org.jclouds.http.handlers.DelegatingErrorHandler.handleError(
>> DelegatingErrorHandler.java:65)
>> at org.jclouds.http.internal.BaseHttpCommandExecutorService
>> .shouldContinue(BaseHttpCommandExecutorService.java:138)
>> at org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(
>> BaseHttpCommandExecutorService.java:107)
>> at org.jclouds.rest.internal.InvokeHttpMethod.invoke(
>> InvokeHttpMethod.java:91)
>> at org.jclouds.rest.internal.InvokeHttpMethod.apply(
>> InvokeHttpMethod.java:74)
>> at org.jclouds.rest.internal.InvokeHttpMethod.apply(
>> InvokeHttpMethod.java:45)
>> at org.jclouds.rest.internal.DelegatesToInvocationFunction.handle(
>> DelegatesToInvocationFunction.java:156)
>> at org.jclouds.rest.internal.DelegatesToInvocationFunction.invoke(
>> DelegatesToInvocationFunction.java:123)
>> at com.sun.proxy.$Proxy57.authenticatePassword(Unknown Source)
>> at org.jclouds.openstack.keystone.auth.functions.
>> AuthenticatePasswordCredentials.authenticate(
>> AuthenticatePasswordCredentials.java:48)
>> at org.jclouds.openstack.keystone.auth.functions.
>> BaseAuthenticator.apply(BaseAuthenticator.java:87)
>> at org.jclouds.openstack.keystone.auth.functions.
>> BaseAuthenticator.apply(BaseAuthenticator.java:38)
>> at com.google.

Re: Issue with jclouds computeService listNodes() ?

2018-06-20 Thread archieprad
Hi Andrea,
Thanks for the reply. I am somewhat new ( learning today) to Jclouds. But after 
facing this issue for the past 2 days and reading some blog posts, a lot of 
places say it might be an IAM role issue. Here is the stacktrace:

2018-06-18 03:52:56.701 - WARN  ChaosInstance - [ChaosInstance.java:105] Error 
making SSH connection to instance
org.jclouds.rest.AuthorizationException: POST 
https://ec2.us-east-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:132)
at 
org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:101)
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)
at 
org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
at 
com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
at com.sun.proxy.$Proxy174.describeRegions(Unknown Source)
at 
org.jclouds.ec2.suppliers.DescribeRegionsForRegionURIs.get(DescribeRegionsForRegionURIs.java:50)
at 
org.jclouds.ec2.suppliers.DescribeRegionsForRegionURIs.get(DescribeRegionsForRegionURIs.java:38)
at 
org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier$SetAndThrowAuthorizationExceptionSupplierBackedLoader.load(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:73)
at 
org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier$SetAndThrowAuthorizationExceptionSupplierBackedLoader.load(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:57)
at 
com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3542)
at 
com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2323)
at 
com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2286)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201)
at com.google.common.cache.LocalCache.get(LocalCache.java:3953)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3957)
at 
com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4875)
at 
org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.get(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:119)
at 
org.jclouds.location.suppliers.derived.RegionIdsFromRegionIdToURIKeySet.get(RegionIdsFromRegionIdToURIKeySet.java:45)
at 
org.jclouds.location.suppliers.derived.RegionIdsFromRegionIdToURIKeySet.get(RegionIdsFromRegionIdToURIKeySet.java:33)
at 
com.google.common.base.Suppliers$SupplierComposition.get(Suppliers.java:68)
at 
org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier$SetAndThrowAuthorizationExceptionSupplierBackedLoader.load(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:73)
at 
org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier$SetAndThrowAuthorizationExceptionSupplierBackedLoader.load(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:57)
at 
com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3542)
at 
com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2323)
at 
com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2286)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201)
at com.google.common.cache.LocalCache.get(LocalCache.java:3953)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3957)
at 
com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4875)
at 
org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.get(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:119)
at 
org.jclouds.aws.ec2.compute.strategy.AWSEC2ListNodesStrategy.pollRunningInstances(AWSEC2ListNodesStrategy.java:65)
at 
org.jclouds.ec2.compute.strategy.EC2ListNodesStrategy.listDetailsOnNodesMatching(EC2ListNodesStrategy.java:107)
at 
org.jclouds.ec2.compute.strategy.EC2ListNodesStrategy.listNodes(EC2ListNodesStrategy

Re: Issue with jclouds computeService listNodes() ?

2018-06-20 Thread Andrea Turli
Hi Archana,

I don't see any particular reason listNodes  would behave differently when
using IAM role vs Access Key and Secret Key - Once the Ec2Api is configured
to use org.jclouds.aws.domain.SessionCredentials everything should just
work.

Is listNodes the only failing one? Can you share the stacktrace of a
failing call?
Could you double check listAssignableLocations() or listImages() with the
same IAM role? if they work, can it be related to weird IAM permissions?

HTH,
Andrea

On Wed, Jun 20, 2018 at 8:01 AM archiep...@gmail.com 
wrote:

> Hi All,
> I am trying to SSH from one EC2 instance into another using netflix's
> simian army. I am using IAM role instead of Access key and Secret key.
> Wondering if there is an issue with calling listNodes() when using IAM
> role. Any insight on this, or any workaround on the issue is helpful.
>
> Cheers
> Archana
>