jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Everett Toews <everett.to...@RACKSPACE.COM>
Subject Re: Problem connecting to openstack
Date Fri, 07 Feb 2014 14:15:41 GMT
Hi Shital,

Can you please enable logging in your app?

http://jclouds.apache.org/documentation/userguide/bug-report/#logs

Please only send us the output in a a gist<https://gist.github.com/> or paste<http://pastie.org/>.

Also, there’s really no need for you to do manual auth. Just auth normally as in

http://jclouds.apache.org/documentation/quickstart/openstack/

Thanks,
Everett


On Feb 6, 2014, at 10:29 PM, Shital Patil <shital.patil@gslab.com<mailto:shital.patil@gslab.com>>
wrote:

Really sorry if I have posted too much in last two replies, I felt it will help you to figure
out exact problem.
 Please have a look at those replies and kindly suggest solution to try.

Thank you


On Thu, Feb 6, 2014 at 10:11 AM, Shital Patil <shital.patil@gslab.com<mailto:shital.patil@gslab.com>>
wrote:
Hi,
Additional to details in my previous reply here is the output for manual authentication code
at http://blog.phymata.com/2013/06/17/jclouds-manual-authentication-with-openstack/  <http://blog.phymata.com/2013/06/17/jclouds-manual-authentication-with-openstack/>
that I could read successfully.

Output is-
Access{token=Token{id=MIIKiAYJKoZIhvcNAQcCoIIKeTCCCnUCAQExCTAHBgUrDgMCGjCCCWEGCSqGSIb3DQEHAaCCCVIEgglOeyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxNC0wMi0wNlQwNDozMDo1Mi43NjUyNTQiLCAiZXhwaXJlcyI6ICIyMDE0LTAyLTA3VDA0OjMwOjUyWiIsICJpZCI6ICJwbGFjZWhvbGRlciIsICJ0ZW5hbnQiOiB7ImRlc2NyaXB0aW9uIjogIiIsICJlbmFibGVkIjogdHJ1ZSwgImlkIjogIjhjOGI3YmVkMDE5NTRjNDBhOWRjMzVlODJmZTgxYjEwIiwgIm5hbWUiOiAiU2hpdGFsIFBhdGlsIn19LCAic2VydmljZUNhdGFsb2ciOiBbeyJlbmRwb2ludHMiOiBbeyJhZG1pblVS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name=Shital Patil, description=}}, user=User{id=8b953f04ca3f40248f16497a8685b695,
name=shital.patil, roles=[Role{name=_member_}, Role{name=Member}]}, serviceCatalog=[Service{type=compute,
name=nova, endpoints=[Endpoint{id=6149c25bc2954b41b1766fcd1117eb3f, region=RegionOne, publicURL=http://10.43.2.3:8774/v2/8c8b7bed01954c40a9dc35e82fe81b10,
internalURL=http://10.43.2.3:8774/v2/8c8b7bed01954c40a9dc35e82fe81b10, adminURL=http://10.43.2.3:8774/v2/8c8b7bed01954c40a9dc35e82fe81b10}]<http://10.43.2.3:8774/v2/8c8b7bed01954c40a9dc35e82fe81b10%7D%5D>},
Service{type=network, name=quantum, endpoints=[Endpoint{id=1e050ea2e99c4e24a763a22481002add,
region=RegionOne, publicURL=http://10.43.2.3:9696/, internalURL=http://10.43.2.3:9696/, adminURL=http://10.43.2.3:9696/}]<http://10.43.2.3:9696/%7D%5D>},
Service{type=image, name=glance, endpoints=[Endpoint{id=c90930778fdb4084a7c142491484fb07,
region=RegionOne, publicURL=http://10.43.2.15:9292/v2, internalURL=http://10.43.2.15:9292/v2,
adminURL=http://10.43.2.15:9292/v2}]<http://10.43.2.15:9292/v2%7D%5D>}, Service{type=volume,
name=cinder, endpoints=[Endpoint{id=1312aca71aab4a5ab2f1f9014c006289, region=RegionOne, publicURL=http://10.43.2.3:8776/v1/8c8b7bed01954c40a9dc35e82fe81b10,
internalURL=http://10.43.2.3:8776/v1/8c8b7bed01954c40a9dc35e82fe81b10, adminURL=http://10.43.2.3:8776/v1/8c8b7bed01954c40a9dc35e82fe81b10}]<http://10.43.2.3:8776/v1/8c8b7bed01954c40a9dc35e82fe81b10%7D%5D>},
Service{type=ec2, name=ec2, endpoints=[Endpoint{id=10bd0d9efea549a7a6c36ad039745a14, region=RegionOne,
publicURL=http://10.43.2.3:8773/services/Cloud, internalURL=http://10.43.2.3:8773/services/Cloud,
adminURL=http://10.43.2.3:8773/services/Admin}]<http://10.43.2.3:8773/services/Admin%7D%5D>},
Service{type=identity, name=keystone, endpoints=[Endpoint{id=0f0f3cd5070046b3a26f3be5361878e0,
region=RegionOne, publicURL=http://10.43.2.3:5000/v2.0, internalURL=http://10.43.2.3:5000/v2.0,
adminURL=http://10.43.2.3:35357/v2.0}]}<http://10.43.2.3:35357/v2.0%7D%5D%7D>]}
 User Name = shital.patil
 User ID = 8b953f04ca3f40248f16497a8685b695
 Tenant Name = Shital Patil
 Tenant ID = 8c8b7bed01954c40a9dc35e82fe81b10
 Token ID = MIIKiAYJKoZIhvcNAQcCoIIKeTCCCnUCAQExCTAHBgUrDgMCGjCCCWEGCSqGSIb3DQEHAaCCCVIEgglOeyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxNC0wMi0wNlQwNDozMDo1Mi43NjUyNTQiLCAiZXhwaXJlcyI6ICIyMDE0LTAyLTA3VDA0OjMwOjUyWiIsICJpZCI6ICJwbGFjZWhvbGRlciIsICJ0ZW5hbnQiOiB7ImRlc2NyaXB0aW9uIjogIiIsICJlbmFibGVkIjogdHJ1ZSwgImlkIjogIjhjOGI3YmVkMDE5NTRjNDBhOWRjMzVlODJmZTgxYjEwIiwgIm5hbWUiOiAiU2hpdGFsIFBhdGlsIn19LCAic2VydmljZUNhdGFsb2ciOiBbeyJlbmRwb2ludHMiOiBbeyJhZG1pblVSTCI6ICJodHRwOi8vMTAuNDMuMi4zOjg3NzQvdjIvOGM4YjdiZWQwMTk1NGM0MGE5ZGMzNWU4MmZlODFiMTAiLCAicmVnaW9uIjogIlJlZ2lvbk9uZSIsICJpbnRlcm5hbFVSTCI6ICJodHRwOi8vMTAuNDMuMi4zOjg3NzQvdjIvOGM4YjdiZWQwMTk1NGM0MGE5ZGMzNWU4MmZlODFiMTAiLCAiaWQiOiAiNjE0OWMyNWJjMjk1NGI0MWIxNzY2ZmNkMTExN2ViM2YiLCAicHVibGljVVJMIjogImh0dHA6Ly8xMC40My4yLjM6ODc3NC92Mi84YzhiN2JlZDAxOTU0YzQwYTl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AiOGI5NTNmMDRjYTNmNDAyNDhmMTY0OTdhODY4NWI2OTUiLCAicm9sZXMiOiBbeyJuYW1lIjogIl9tZW1iZXJfIn0sIHsibmFtZSI6ICJNZW1iZXIifV0sICJuYW1lIjogInNoaXRhbC5wYXRpbCJ9LCAibWV0YWRhdGEiOiB7ImlzX2FkbWluIjogMCwgInJvbGVzIjogWyI5ZmUyZmY5ZWU0Mzg0YjE4OTRhOTA4NzhkM2U5MmJhYiIsICIyOTNhYzZjNDYwMDY0Mzg5YWYyMDYzYWI0NjY5MWM3MSJdfX19MYH-MIH8AgEBMFwwVzELMAkGA1UEBhMCVVMxDjAMBgNVBAgTBVVuc2V0MQ4wDAYDVQQHEwVVbnNldDEOMAwGA1UEChMFVW5zZXQxGDAWBgNVBAMTD3d3dy5leGFtcGxlLmNvbQIBATAHBgUrDgMCGjANBgkqhkiG9w0BAQEFAASBgMsek5Rmn8ReOlWYI2kw0+XQyKLSbhn0+KTQ2pVA+51BwDZNRjmIa1+0pVr2rUaG-kcc40Oas7eq7+TQ72ZSkIAzQC8NeHPi0WbSu0RzddnvU2x5EvhTVJacK+QM708AYahJZSBnzjUkLGSNgZEC080G86Nrm6ORToZXtShiJ7KF
 Token Expires = Fri Feb 07 10:00:52 IST 2014
 Service = nova
 Endpoint = http://10.43.2.3:8774/v2/8c8b7bed01954c40a9dc35e82fe81b10
 Service = quantum
 Endpoint = http://10.43.2.3:9696/
 Service = glance
 Endpoint = http://10.43.2.15:9292/v2
 Service = cinder
 Endpoint = http://10.43.2.3:8776/v1/8c8b7bed01954c40a9dc35e82fe81b10
 Service = ec2
 Endpoint = http://10.43.2.3:8773/services/Cloud
 Service = keystone
 Endpoint = http://10.43.2.3:5000/v2.0



On Thu, Feb 6, 2014 at 9:57 AM, Shital Patil <shital.patil@gslab.com<mailto:shital.patil@gslab.com>>
wrote:

Hi,
I could run manual authentication code at http://blog.phymata.com/2013/06/17/jclouds-manual-authentication-with-openstack/
successfully but still failing to run list images code that we have been discussing.

I have already tried curl with tenant name and it works fine. You can see the output below

 curl -k -X 'POST' -v http://10.43.2.3:5000/v2.0/tokens -d'{"auth":{"passwordCredentials":{"username":
"shital.patil", "password":"shital123"}, "tenantName":"Shital Patil"}}' -H 'Content-type:
application/json'* About to connect() to 10.43.2.3 port 5000 (#0)
*   Trying 10.43.2.3... connected
> POST /v2.0/tokens HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4<http://1.2.3.4/>
libidn/1.23 librtmp/2.3
> Host: 10.43.2.3:5000<http://10.43.2.3:5000/>
> Accept: */*
> Content-type: application/json
> Content-Length: 114
>
* upload completely sent off: 114out of 114 bytes
< HTTP/1.1 200 OK
< Vary: X-Auth-Token
< Content-Type: application/json
< Content-Length: 5971
< Date: Thu, 06 Feb 2014 03:52:31 GMT
<
{"access": {"token": {"issued_at": "2014-02-06T03:52:31.201230", "expires": "2014-02-07T03:52:31Z",
"id": "MIIKiAYJKoZIhvcNAQcCoIIKeTCCCnUCAQExCTAHBgUrDgMCGjCCCWEGCSqGSIb3DQEHAaCCCVIEgglOeyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxNC0wMi0wNlQwMzo1MjozMS4yMDEyMzAiLCAiZXhwaXJlcyI6ICIyMDE0LTAyLTA3VDAzOjUyOjMxWiIsICJpZCI6ICJwbGFjZWhvbGRlciIsICJ0ZW5hbnQiOiB7ImRlc2NyaXB0aW9uIjogIiIsICJlbmFibGVkIjogdHJ1ZSwgImlkIjogIjhjOGI3YmVkMDE5NTRjNDBhOWRjMzVlODJmZTgxYjEwIiwgIm5hbWUiOiAiU2hpdGFsIFBhdGlsIn19LCAic2VydmljZUNhdGFsb2ciOiBbeyJlbmRwb2ludHMiOiBbeyJhZG1pblVSTCI6ICJodHRwOi8vMTAuNDMuMi4zOjg3NzQvdjIvOGM4YjdiZWQwMTk1NGM0MGE5ZGMzNWU4MmZ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ICIwZjBmM2NkNTA3MDA0NmIzYTI2ZjNiZTUzNjE4NzhlMCIsICJwdWJsaWNVUkwiOiAiaHR0cDovLzEwLjQzLjIuMzo1MDAwL3YyLjAifV0sICJlbmRwb2ludHNfbGlua3MiOiBbXSwgInR5cGUiOiAiaWRlbnRpdHkiLCAibmFtZSI6ICJrZXlzdG9uZSJ9XSwgInVzZXIiOiB7InVzZXJuYW1lIjogInNoaXRhbC5wYXRpbCIsICJyb2xlc19saW5rcyI6IFtdLCAiaWQiOiAiOGI5NTNmMDRjYTNmNDAyNDhmMTY0OTdhODY4NWI2OTUiLCAicm9sZXMiOiBbeyJuYW1lIjogIl9tZW1iZXJfIn0sIHsibmFtZSI6ICJNZW1iZXIifV0sICJuYW1lIjogInNoaXRhbC5wYXRpbCJ9LCAibWV0YWRhdGEiOiB7ImlzX2FkbWluIjogMCwgInJvbGVzIjogWyI5ZmUyZmY5ZWU0Mzg0YjE4OTRhOTA4NzhkM2U5MmJhYiIsICIyOTNhYzZjNDYwMDY0Mzg5YWYyMDYzYWI0NjY5MWM3MSJdfX19MYH-MIH8AgEBMFwwVzELMAkGA1UEBhMCVVMxDjAMBgNVBAgTBVVuc2V0MQ4wDAYDVQQHEwVVbnNldDEOMAwGA1UEChMFVW5zZXQxGDAWBgNVBAMTD3d3dy5leGFtcGxlLmNvbQIBATAHBgUrDgMCGjANBgkqhkiG9w0BAQEFAASBgA-6aHdUJXEo4PaHjR2EpAxGWslTvf4HmVLvdoGh8A2QxxQKMdIwYOHbjWBGbGbBjyWnFKUubVj9PihZ6ShJ1zztzvrOC2TWbei5co38+9xnLDs7uJwF24JuOlMsixXoL9UEUC5L2MUtRAJc9XmluAMegPOYnGiQWUhNTsSAtko8",
"tenant": {"description": "", "enabled": true, "id": "8c8b7bed01954c40a9dc35e82fe81b10", "name":
"Shital Patil"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://10.43.2.3:8774/v2/8c8b7bed01954c40a9dc35e82fe81b10",
"region": "RegionOne", "internalURL": "http://10.43.2.3:8774/v2/8c8b7bed01954c40a9dc35e82fe81b10",
"id": "6149c25bc2954b41b1766fcd1117eb3f", "publicURL": "http://10.43.2.3:8774/v2/8c8b7bed01954c40a9dc35e82fe81b10"}],
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://10.43.2.3:9696/",
"region": "RegionOne", "internalURL": "http://10.43.2.3:9696/", "id": "1e050ea2e99c4e24a763a22481002add",
"publicURL": "http://10.43.2.3:9696/"}], "endpoints_links": [], "type": "network", "name":
"quantum"}, {"endpoints": [{"adminURL": "http://10.43.2.15:9292/v2", "region": "RegionOne",
"internalURL": "http://10.43.2.15:9292/v2", "id": "c90930778fdb4084a7c142491484fb07", "publicURL":
"http://10.43.2.15:9292/v2"}], "endpoints_links": [], "type": "image", "name": "glance"},
{"endpoints": [{"adminURL": "http://10.43.2.3:8776/v1/8c8b7bed01954c40a9dc35e82fe81b10", "region":
"RegionOne", "internalURL": "http://10.43.2.3:8776/v1/8c8b7bed01954c40a9dc35e82fe81b10", "id":
"1312aca71aab4a5ab2f1f9014c006289", "publicURL": "http://10.43.2.3:8776/v1/8c8b7bed01954c40a9dc35e82fe81b10"}],
"endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints":* Connection #0 to
host 10.43.2.3 left intact

* Closing connection #0
 [{"adminURL": "http://10.43.2.3:8773/services/Admin", "region": "RegionOne", "internalURL":
"http://10.43.2.3:8773/services/Cloud", "id": "10bd0d9efea549a7a6c36ad039745a14", "publicURL":
"http://10.43.2.3:8773/services/Cloud"}], "endpoints_links": [], "type": "ec2", "name": "ec2"},
{"endpoints": [{"adminURL": "http://10.43.2.3:35357/v2.0", "region": "RegionOne", "internalURL":
"http://10.43.2.3:5000/v2.0", "id": "0f0f3cd5070046b3a26f3be5361878e0", "publicURL": "http://10.43.2.3:5000/v2.0"}],
"endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": "shital.patil",
"roles_links": [], "id": "8b953f04ca3f40248f16497a8685b695", "roles": [{"name": "_member_"},
{"name": "Member"}], "name": "shital.patil"}, "metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
"293ac6c460064389af2063ab46691c71"]}}}

Please have a look at this stack trace that I had sent in previous reply as well. I have specified
http://10.43.2.3:5000/v2.0/ as endpoint but it has made a GET request to http://10.43.2.3:8774/v2/8c8b7bed01954c40a9dc35e82fe81b10/images/detail
(you can see this is admin URL as shown in curl command's output above and tenant id is attached
to the request) and this request failed causing exception

org.jclouds.rest.
AuthorizationException: {"unauthorized": {"message": "This server could not verify that you
are authorized to access the document you requested. Either you supplied the wrong credentials
(e.g., bad password), or your browser does not understand how to supply the credentials required.",
"code": 401}}

    at org.jclouds.openstack.nova.v2_0.handlers.NovaErrorHandler.handleError(NovaErrorHandler.java:98)
    at org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:69)
    at org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:182)
    at org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:152)
    at org.jclouds.rest.internal.InvokeSyncToAsyncHttpMethod.invoke(InvokeSyncToAsyncHttpMethod.java:133)
    at org.jclouds.rest.internal.InvokeSyncToAsyncHttpMethod.apply(InvokeSyncToAsyncHttpMethod.java:99)
    at org.jclouds.rest.internal.InvokeSyncToAsyncHttpMethod.apply(InvokeSyncToAsyncHttpMethod.java:60)
    at org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:119)
    at com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:70)
    at com.sun.proxy.$Proxy68.listInDetail(Unknown Source)
    at org.jclouds.examples.compute.basics.JCloudsOpenStack.listImages(JCloudsOpenStack.java:64)
    at org.jclouds.examples.compute.basics.JCloudsOpenStack.main(JCloudsOpenStack.java:29)
Caused by: org.jclouds.http.HttpResponseException: command: GET http://10.43.2.3:8774/v2/8c8b7bed01954c40a9dc35e82fe81b10/images/detail
HTTP/1.1 failed with response: HTTP/1.1 401 Unauthorized; content: [{"unauthorized": {"message":
"This server could not verify that you are authorized to access the document you requested.
Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand
how to supply the credentials required.", "code": 401}}]
    at org.jclouds.openstack.nova.v2_0.handlers.NovaErrorHandler.handleError(NovaErrorHandler.java:83)
    ... 11 more



On Wed, Feb 5, 2014 at 7:36 PM, Everett Toews <everett.toews@rackspace.com<mailto:everett.toews@rackspace.com>>
wrote:
In you’re curl command you’re using tenantId. jclouds uses the tenantName. Try your curl
command like this.

curl -s -X POST http://10.43.2.3:5000/v2.0/tokens -d '{"auth": {"passwordCredentials": {"username":"shital.patil",
"password":"shital123"}, "tenantName":"Shital Patil"}}' -H "Content-type: application/json”

If that doesn’t work, your tenantName probably isn’t what you think it is.

HTH,
Everett


On Feb 5, 2014, at 12:23 AM, Shital Patil <shital.patil@gslab.com<mailto:shital.patil@gslab.com>>
wrote:

Hi Everett,

Thank you for such a kind help you are offering
----------------------------------------------------------------------------------------------------------------------
Curl command I am sending and its output -

curl -k -X 'POST' -v http://10.43.2.3:5000/v2.0/tokens -d'{"auth":{"passwordCredentials":{"username":
"shital.patil", "password":"shital123"}, "tenantId":"8c8b7bed01954c40a9dc35e82fe81b10"}}'
-H 'Content-type: application/json'



"tenant": {"description": "", "enabled": true, "id": "8c8b7bed01954c40a9dc35e82fe81b10", "name":
"Shital Patil"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://10.43.2.3:8774/v2/8c8b7bed01954c40a9dc35e82fe81b10",
"region": "RegionOne", "internalURL": "http://10.43.2.3:8774/v2/8c8b7bed01954c40a9dc35e82fe81b10",
"id": "6149c25bc2954b41b1766fcd1117eb3f", "publicURL": "http://10.43.2.3:8774/v2/8c8b7bed01954c40a9dc35e82fe81b10"}],
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://10.43.2.3:9696/",
"region": "RegionOne", "internalURL": "http://10.43.2.3:9696/", "id": "1e050ea2e99c4e24a763a22481002add",
"publicURL": "http://10.43.2.3:9696/"}], "endpoints_links": [], "type": "network", "name":
"quantum"}, {"endpoints": [{"adminURL": "http://10.43.2.15:9292/v2", "region": "RegionOne",
"internalURL": "http://10.43.2.15:9292/v2", "id": "c90930778fdb4084a7c142491484fb07", "publicURL":
"http://10.43.2.15:9292/v2"}], "endpoints_links": [], "type": "image", "name": "glance"},
{"endpoints": [{"adminURL": "http://10.43.2.3:8776/v1/8c8b7bed01954c40a9dc35e82fe81b10", "region":
"RegionOne", "internalURL": "http://10.43.2.3:8776/v1/8c8b7bed01954c40a9dc35e82fe81b10", "id":
"1312aca71aab4a5ab2f1f9014c006289", "publicURL": "http://10.43.2.3:8776/v1/8c8b7bed01954c40a9dc35e82fe81b10"}],
"endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints":* Connection #0 to
host 10.43.2.3 left intact
* Closing connection #0
 [{"adminURL": "http://10.43.2.3:8773/services/Admin", "region": "RegionOne", "internalURL":
"http://10.43.2.3:8773/services/Cloud", "id": "10bd0d9efea549a7a6c36ad039745a14", "publicURL":
"http://10.43.2.3:8773/services/Cloud"}], "endpoints_links": [], "type": "ec2", "name": "ec2"},
{"endpoints": [{"adminURL": "http://10.43.2.3:35357/v2.0", "region": "RegionOne", "internalURL":
"http://10.43.2.3:5000/v2.0", "id": "0f0f3cd5070046b3a26f3be5361878e0", "publicURL": "http://10.43.2.3:5000/v2.0"}],
"endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": "shital.patil",
"roles_links": [], "id": "8b953f04ca3f40248f16497a8685b695", "roles": [{"name": "_member_"},
{"name": "Member"}], "name": "shital.patil"}, "metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
"293ac6c460064389af2063ab46691c71"]}}}
-------------------------------------------------------------------------------------------------------------------
Json object that was displayed on console with exception stack trace -
[{"auth":{"passwordCredentials":{"username":"shital.patil","password":"shital123"},"tenantName":"Shital
Patil"}}]
-----------------------------------------------------------------------------------------------------------------
I just rebuilt the code and now getting the same exception but in different form

Calling listImages for RegionOne:
org.jclouds.rest.AuthorizationException: {"unauthorized": {"message": "This server could not
verify that you are authorized to access the document you requested. Either you supplied the
wrong credentials (e.g., bad password), or your browser does not understand how to supply
the credentials required.", "code": 401}}
    at org.jclouds.openstack.nova.v2_0.handlers.NovaErrorHandler.handleError(NovaErrorHandler.java:98)
    at org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:69)
    at org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:182)
    at org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:152)
    at org.jclouds.rest.internal.InvokeSyncToAsyncHttpMethod.invoke(InvokeSyncToAsyncHttpMethod.java:133)
    at org.jclouds.rest.internal.InvokeSyncToAsyncHttpMethod.apply(InvokeSyncToAsyncHttpMethod.java:99)
    at org.jclouds.rest.internal.InvokeSyncToAsyncHttpMethod.apply(InvokeSyncToAsyncHttpMethod.java:60)
    at org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:119)
    at com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:70)
    at com.sun.proxy.$Proxy68.listInDetail(Unknown Source)
    at org.jclouds.examples.compute.basics.JCloudsOpenStack.listImages(JCloudsOpenStack.java:64)
    at org.jclouds.examples.compute.basics.JCloudsOpenStack.main(JCloudsOpenStack.java:29)
Caused by: org.jclouds.http.HttpResponseException: command: GET http://10.43.2.3:8774/v2/8c8b7bed01954c40a9dc35e82fe81b10/images/detail
HTTP/1.1 failed with response: HTTP/1.1 401 Unauthorized; content: [{"unauthorized": {"message":
"This server could not verify that you are authorized to access the document you requested.
Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand
how to supply the credentials required.", "code": 401}}]
    at org.jclouds.openstack.nova.v2_0.handlers.NovaErrorHandler.handleError(NovaErrorHandler.java:83)
    ... 11 more
-----------------------------------------------------------------------------------------------------------------------


On Tue, Feb 4, 2014 at 9:05 PM, Everett Toews <everett.toews@rackspace.com<mailto:everett.toews@rackspace.com>>
wrote:
On Feb 3, 2014, at 9:23 PM, Shital Patil <shital.patil@gslab.com<mailto:shital.patil@gslab.com>>
wrote:

> 4- I am able to access openstack using curl

Can you show us exactly the curl command you’re using to auth?

e.g.

curl -s -X POST http://xxx.xxx.xxx.xxx:5000/v2.0/tokens -d ‘json goes here' -H "Content-type:
application/json”

Can you show us the exact log output from jclouds?

e.g.

>> "{"auth":{"passwordCredentials":{"username":"shital.patil","password":"shital123"},"tenantName":"Shital
Patil"}}"
>> POST http://xxx.xxx.xxx.xxx:5000/v2.0/tokens HTTP/1.1
>> Accept: application/json
>> Content-Type: application/json
>> Content-Length: 111

> I have noticed that json object sent to openstack through java code using jclouds for
authentication is same as one sent using curl. Am I missing some jars? or should I try any
newer build of examples?

I’ve done my best to reproduce the problem. I created a user and tenant exactly as you have
in your cloud. I’m using OpenStack Havana and jclouds 1.7.0.

Connecting via curl works.

curl -s -X POST http://xxx.xxx.xxx.xxx:5000/v2.0/tokens -d '{"auth": {"passwordCredentials":
{"username":"shital.patil", "password":"shital123"}, "tenantName":"Shital Patil"}}' -H "Content-type:
application/json”

Connecting via jclouds works (logging turned on).

>> "{"auth":{"passwordCredentials":{"username":"shital.patil","password":"shital123"},"tenantName":"Shital
Patil"}}"
>> POST http://xxx.xxx.xxx.xxx:5000/v2.0/tokens HTTP/1.1
>> Accept: application/json
>> Content-Type: application/json
>> Content-Length: 111

If you’re JSON matches exactly like mine does above, it should work for you too.

HTH,
Everett







Mime
View raw message